From 0dcd250c2f53e9cb65f1b9fefd2b3d1aedc9ae80 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 11 Jul 2023 23:12:54 -0300 Subject: Update daily login bonus (now it only gives money) --- npc/functions/daily.txt | 134 ++---------------------------------------------- 1 file changed, 3 insertions(+), 131 deletions(-) diff --git a/npc/functions/daily.txt b/npc/functions/daily.txt index 2c7ff08..747b90b 100644 --- a/npc/functions/daily.txt +++ b/npc/functions/daily.txt @@ -18,18 +18,6 @@ function script daily_login_bonus_handler { // Number of times you claimed the top prize (27 days streak) //debugmes "DLBH"; - // GMs can receive Strange Coins - if (GSET_AUTORECEIVE_COINS) { - if (is_gm()) { - if (#GMEVENT_T <= gettimetick(2)) { - #GMEVENT_T=gettimetick(2)+(60*60*24); - getitem StrangeCoin, 30; - } - } else { - GSET_AUTORECEIVE_COINS=false; - } - } - if (#LOGIN_DAY != gettime(5)) { // demure check: Are you on a start area? getmapxy(.@m$,.@x,.@y,0); @@ -53,117 +41,14 @@ function script daily_login_bonus_handler { // Handle rewards: Streaks first, daily later. Streak reward prevail over daily reward. if ($@NOUPDATES) { dispbottom col(l("Updates were disabled"), 1); - } else if (#LOGIN_STREAK > 27) { - getitem StrangeCoin, 2; - getitem CasinoCoins, 1; - dispbottom l("##2 %d Days login bonus: ##B2x %s, 1x %s##b", #LOGIN_STREAK, getitemlink(StrangeCoin), getitemlink(CasinoCoins)); - } else if (#LOGIN_STREAK == 27) { - #LOGIN_ALLTIME+=1; - .@am=1; - switch (#LOGIN_ALLTIME % 12) { - case 1: - if (#LOGIN_ALLTIME == 1) - .@prize=RightEyePatch; - else - .@prize=SilverGift; - break; - case 2: - .@prize=ArcmageBoxset; break; - case 3: - .@prize=MercBoxC; break; - case 4: - .@prize=AncientBlueprint; break; - case 5: - .@prize=StrangeCoin; .@am=120; break; - case 6: - if (#LOGIN_ALLTIME == 6) { - dispbottom l("CONGRATULATIONS! For a semester worth of logins, you're getting a pet!"); - .@prize=PiouEgg; .@am=0; - makepet Piou; - } else { - .@prize=GoldenGift; - } - break; - case 7: - .@prize=GoldenGift; break; - case 8: - .@prize=MercBoxD; break; - case 9: - .@prize=PrismGift; break; - case 10: - .@prize=StrangeCoin; .@am=150; break; - case 11: - .@prize=MercBoxE; break; - case 0: - .@prize=MysteriousFruit; break; - default: - .@prize=ElixirOfLife; break; - } - - if (.@am) - getitem .@prize, .@am; - dispbottom l("##2 27 Days login bonus: ##B1x %s##b", getitemlink(.@prize)); - } else if (#LOGIN_STREAK == 21) { - getitem BronzeGift, 1; - dispbottom l("##2 21 Days login bonus: ##B1x %s##b", getitemlink(BronzeGift)); - } else if (#LOGIN_STREAK == 14) { - getitem BronzeGift, 1; - dispbottom l("##2 14 Days login bonus: ##B1x %s##b", getitemlink(BronzeGift)); - } else if (#LOGIN_STREAK == 7) { - getitem StrangeCoin, 3; - dispbottom l("##2 7 Days login bonus: ##B3x %s##b", getitemlink(StrangeCoin)); - } else if (#LOGIN_STREAK == 3) { - getitem StrangeCoin, 1; - dispbottom l("##2 3 Days login bonus: ##B1x %s##b", getitemlink(StrangeCoin)); - } else if (#LOGIN_STREAK % 3 == 0) { + } else { .@value=max(20, rand2(#LOGIN_STREAK, #LOGIN_STREAK*2)); .@value+=(BaseLevel*5/2)+rand2(JobLevel, JobLevel*7/20); .@value=.@value * 5 / 4; // Bonus 25% Zeny=Zeny+.@value; dispbottom l("##2Daily login bonus: ##B%d GP##b", .@value); - } else if (#LOGIN_STREAK % 3 == 2) { - .@value=max(5, rand2(0, (#LOGIN_STREAK/4))); - .@value+=(BaseLevel**2); - .@value=(.@value*3/4)+#LOGIN_STREAK; // 50% → 75% - getexp .@value, 0; - dispbottom l("##2Daily login bonus: ##B%d EXP##b", .@value); - } else { - .@value=max(5, rand2(0, (#LOGIN_STREAK/4))); - .@value+=(JobLevel**2); - .@value=(.@value/2)+#LOGIN_STREAK; // 33% → 50% - getexp 0, .@value; - dispbottom l("##2Daily login bonus: ##B%d Job Exp.##b", .@value); } - // Handle event login bonus - if (gettime(6) == JANUARY) { - if (#TMW2_LOGINBONUS != gettime(GETTIME_YEAR) && gettime(5) == 13) { - #TMW2_LOGINBONUS=gettime(GETTIME_YEAR); - getitem StrangeCoin, 10; - // TMW2 Anniversary is project, not server. - // Therefore, contributors get an extra reward - .@m=htget($@CONTRIBUTORS, strtolower(strcharinfo(0)), 0); - if (.@m) - getitem StrangeCoin, min(9, .@m/100)+1; - dispbottom "##B##2"+l("It's TMW2 Project anniversary!")+" "+l("We thank every developer which helped this project thus far!")+"##b##0"; - } - } - if (gettime(6) == MARCH) { - if (#TMW2_LOGINBONUS != gettime(GETTIME_YEAR) && gettime(5) == 2) { - #TMW2_LOGINBONUS=gettime(GETTIME_YEAR); - getitem MercBoxC, 1; - // TMW2 Day is server, not project. - // Therefore, players get extra reward - dispbottom "##B##2"+l("It's TMW2 Server anniversary!")+" "+l("We thank every player, because without them, this would be nothing!")+"##b##0"; - } - } - if (gettime(6) == JUNE) { - if (#TMW2_LOGINBONUS != gettime(GETTIME_YEAR) && gettime(5) == 21) { - #TMW2_LOGINBONUS=gettime(GETTIME_YEAR); - getitem DungeonMap, 1; - dispbottom "##B##2"+l("It's Jesusalva's anniversary!")+" "+l("Also, Summer just started. Why not taking this opportunity to go Treasure Hunting?!")+"##b##0"; - } - } if (gettime(6) == JULY) { if (#TMW2_LOGINBONUS != gettime(GETTIME_YEAR) && gettime(5) == 7) { #TMW2_LOGINBONUS=gettime(GETTIME_YEAR); @@ -175,7 +60,7 @@ function script daily_login_bonus_handler { if (#TMW2_LOGINBONUS != gettime(GETTIME_YEAR) && gettime(5) == 9) { #TMW2_LOGINBONUS=gettime(GETTIME_YEAR); getitem any(ScentGrenade, Grenade, SmokeGrenade), 2; - dispbottom "##B##2"+l("It's the Free Software Day!")+" "+l("Licensing was one of the worst hassle we had, but just today, all mobs may drop Ancient Blueprints. Enjoy!")+"##b##0"; + dispbottom "##B##2"+l("It's the Free Software Day!")+" "+l("Licensing was one of the worst hassle we had. Enjoy!")+"##b##0"; } } if (gettime(6) == OCTOBER) { @@ -189,24 +74,11 @@ function script daily_login_bonus_handler { if (gettime(6) == DECEMBER) { if (!#XMAS_LOGINBONUS && gettime(5) >= 24 && gettime(5) <= 26) { #XMAS_LOGINBONUS=1; - getitem XmasGift, 1; + Zeny+=1500; dispbottom "##B##2"+l("Merry Christmas!")+" "+l("You have gained a special login bonus!")+"##b##0"; } } - // We're almost done with daily logins, just the optional User Interface - if (!GSET_DAILYREWARD_SILENT) { - setnpcdialogtitle l("Daily Login Rewards"); - setskin "daily_"+#LOGIN_STREAK; - mes "Please keep your ManaPlus updated."; - //mes "This is a debug message. Your manaplus version is wrong."; - //mes "You should not be reading this. I'll call you a cheater."; - //mes "I hope you report this (if a bug). Reading source code?"; - //mes "4144 will hear about this. You are NOT amazing by the way."; - select("Ok"); - setskin ""; - closeclientdialog; - } } //debugmes "[DLBH] Finished: "+#LOGIN_DAY+" ok"; -- cgit v1.2.3-60-g2f50