diff options
-rw-r--r-- | npc/functions/daily.txt | 8 | ||||
-rw-r--r-- | npc/functions/event.txt | 22 | ||||
-rw-r--r-- | npc/functions/mobpoint.txt | 1 |
3 files changed, 31 insertions, 0 deletions
diff --git a/npc/functions/daily.txt b/npc/functions/daily.txt index 03b70ffa5..bdca3178b 100644 --- a/npc/functions/daily.txt +++ b/npc/functions/daily.txt @@ -189,6 +189,14 @@ function script daily_login_bonus_handler { dispbottom "##B##2"+l("It's International Chocolate Day!")+"##b "+l("All monsters may drop chocolate during this period. And here is one for you!")+"##0"; } } + if (gettime(6) == AUGUST) { + if (#TMW2_LOGINBONUS != gettime(GETTIME_YEAR) && ( + gettime(5) == 1 || gettime(5) == 10)) { + #TMW2_LOGINBONUS=gettime(GETTIME_YEAR); + getitem CasinoCoins, 1; + dispbottom "##B##2"+l("It's Moubootaur Legends' Gambling Day!")+"##b "+l("In permanent celebration of the 19.2 update, all monsters may drop casino coins during this period.")+"##0"; + } + } if (gettime(6) == SEPTEMBER) { if (#TMW2_LOGINBONUS != gettime(GETTIME_YEAR) && gettime(5) == 9) { #TMW2_LOGINBONUS=gettime(GETTIME_YEAR); diff --git a/npc/functions/event.txt b/npc/functions/event.txt index e46041780..75ff9d64b 100644 --- a/npc/functions/event.txt +++ b/npc/functions/event.txt @@ -425,6 +425,28 @@ function script CoffeeDay { return; } +// GamblingDay() +function script GamblingDay { + if (!playerattached()) + return; + + // Date check + if (gettime(6) != AUGUST) + return; + if (gettime(5) != 1 && gettime(5) != 10) + return; + + // Max. 24% chances, 0.1% per monster level + .@lv=min(200, getmonsterinfo(killedrid, MOB_LV)); + if (rand2(10000) < (.@lv*12)) { + getmapxy(.@m$, .@x, .@y, 0); + .@x+=rand2(-1,1); + .@y+=rand2(-1,1); + makeitem(CasinoCoins, 1, .@m$, .@x, .@y); + } + return; +} + // FSFDay() function script FSFDay { if (!playerattached()) diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt index f7d6b7880..98ca54d3c 100644 --- a/npc/functions/mobpoint.txt +++ b/npc/functions/mobpoint.txt @@ -116,6 +116,7 @@ OnNPCKillEvent: callfunc "AuroraMobkill"; callfunc "ChocolateDay"; callfunc "CoffeeDay"; + callfunc "GamblingDay"; callfunc "FSFDay"; callfunc "CraftmasterDay"; callfunc "CadisQuestCheck"; |