diff options
Diffstat (limited to 'npc')
-rw-r--r-- | npc/003-3/malindou.txt | 3 | ||||
-rw-r--r-- | npc/functions/daily.txt | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt index 38eb11483..750a50ab4 100644 --- a/npc/003-3/malindou.txt +++ b/npc/003-3/malindou.txt @@ -720,6 +720,9 @@ OnPCLoginEvent: // Daily rewards (The first with dialog interactions) daily_login_bonus_handler(); + // Guild Weekly Login Bonus + guild_login_bonus(); + // Thanksgiving Event sThanksgiving(); end; diff --git a/npc/functions/daily.txt b/npc/functions/daily.txt index 13997ba56..23dfc00b5 100644 --- a/npc/functions/daily.txt +++ b/npc/functions/daily.txt @@ -198,3 +198,18 @@ function script daily_login_bonus_handler { return; } +// Gives you guild coins, but weekly (based on Guild Level) +function script guild_login_bonus { + .@g=getcharid(2); + if (.@g < 1) + return; + + .@c=min(5, getguildavg(.@g)/20)+limit(1, getguildlvl(.@g)/5, 10); + if (#LOGIN_GUILD_WEEK != gettimeparam(GETTIME_WEEKDAY)) { + #LOGIN_GUILD_WEEK=gettimeparam(GETTIME_WEEKDAY); + getitem GuildCoin, .@c; + dispbottom l("##2Guild's Weekly login bonus: ##B%d %s##b", .@c, getitemlink(GuildCoin)); + } + return; +} + |