diff options
Diffstat (limited to 'npc/functions/daily.txt')
-rw-r--r-- | npc/functions/daily.txt | 15 |
1 files changed, 15 insertions, 0 deletions
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; +} + |