summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-22 16:04:46 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-22 16:04:46 -0300
commite4830b178bab603f24a1eb60cf805ca5e04c4138 (patch)
treecb6993d8291e04b61c6e2a35546efae324de1046 /npc/functions
parenta46872842d4fdeb67b38f02764154098693c9e00 (diff)
downloadserverdata-e4830b178bab603f24a1eb60cf805ca5e04c4138.tar.gz
serverdata-e4830b178bab603f24a1eb60cf805ca5e04c4138.tar.bz2
serverdata-e4830b178bab603f24a1eb60cf805ca5e04c4138.tar.xz
serverdata-e4830b178bab603f24a1eb60cf805ca5e04c4138.zip
Guild Weekly Login Bonus.
Every 20 average levels give you a bonus coin (capped at Lv 100) Every 5 guild levels give you a bonus coin (capped at Lv 50)
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/daily.txt15
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;
+}
+