summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-02 02:42:59 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-02 02:42:59 -0300
commitfae2c31992c2be878ab9f0c3eed509ecdf4beb55 (patch)
tree16b508907a266f21d3191a5216729cae3830eda6 /npc
parent74a89b8b3accc2d88fca0d2f568d28a3de29ca70 (diff)
downloadserverdata-fae2c31992c2be878ab9f0c3eed509ecdf4beb55.tar.gz
serverdata-fae2c31992c2be878ab9f0c3eed509ecdf4beb55.tar.bz2
serverdata-fae2c31992c2be878ab9f0c3eed509ecdf4beb55.tar.xz
serverdata-fae2c31992c2be878ab9f0c3eed509ecdf4beb55.zip
Katazuli now regains power based on guild member count
Diffstat (limited to 'npc')
-rw-r--r--npc/042-10/ctrl.txt28
1 files changed, 26 insertions, 2 deletions
diff --git a/npc/042-10/ctrl.txt b/npc/042-10/ctrl.txt
index d1abd2585..c65a0ebbb 100644
--- a/npc/042-10/ctrl.txt
+++ b/npc/042-10/ctrl.txt
@@ -241,9 +241,21 @@ OnInstanceInit:
// Every minute, recover some energy
OnTimer60000:
+ explode(.@map$, .map$, "@");
+ .@g=atoi(.@map$[1]);
+ if (.@g < 1) {
+ debugmes "[ERROR] [KAMELOT] Unable to recharge katazuli for Kamelot %s", .map$;
+ .@g=0;
+ }
+
+ // Estimate
+ .@pc=$KAMELOT_PC[.@g]+1;
+ .@pow=rand2(.@pc);
+
+ // Recover energy
.@id=.kataId;
.@m$=instance_mapname("042-10");
- .@power=min(0, getd("$@GTEMP_"+.@id+"_"+.@m$)-rand2(5));
+ .@power=min(0, getd("$@GTEMP_"+.@id+"_"+.@m$)-.@pow);
setd("$@GTEMP_"+.@id+"_"+.@m$, .@power);
initnpctimer;
end;
@@ -297,9 +309,21 @@ OnInstanceInit:
// Every minute, recover some energy
OnTimer60000:
+ explode(.@map$, .map$, "@");
+ .@g=atoi(.@map$[1]);
+ if (.@g < 1) {
+ debugmes "[ERROR] [KAMELOT] Unable to recharge katazuli for Kamelot %s", .map$;
+ .@g=0;
+ }
+
+ // Estimate
+ .@pc=$KAMELOT_PC[.@g]+1;
+ .@pow=rand2(.@pc);
+
+ // Recover energy
.@id=.kataId;
.@m$=instance_mapname("042-10");
- .@power=min(0, getd("$@GTEMP_"+.@id+"_"+.@m$)-rand2(5));
+ .@power=min(0, getd("$@GTEMP_"+.@id+"_"+.@m$)-.@pow);
setd("$@GTEMP_"+.@id+"_"+.@m$, .@power);
initnpctimer;
end;