summaryrefslogtreecommitdiff
path: root/npc/functions/main.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-09 22:45:54 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-09 22:45:54 -0300
commita9cb0b4cf5273d5d84669dd916deb3e9a1e64b7a (patch)
tree08bbf43bd8f3da79c2d5d9134c6719de7ceac26b /npc/functions/main.txt
parentbe9506a97555280ce08ff4b7000d95508e1e3dbf (diff)
downloadserverdata-a9cb0b4cf5273d5d84669dd916deb3e9a1e64b7a.tar.gz
serverdata-a9cb0b4cf5273d5d84669dd916deb3e9a1e64b7a.tar.bz2
serverdata-a9cb0b4cf5273d5d84669dd916deb3e9a1e64b7a.tar.xz
serverdata-a9cb0b4cf5273d5d84669dd916deb3e9a1e64b7a.zip
Fix area timers
Diffstat (limited to 'npc/functions/main.txt')
-rw-r--r--npc/functions/main.txt15
1 files changed, 13 insertions, 2 deletions
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index c6b90043..bbd119e0 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -609,9 +609,20 @@ function script maptimer {
// areatimer("<map>", <x1>, <y1>, <x2>, <y2>, <tick>, "<npc>::<event>")
function script areatimer {
- .@c = getunits(BL_PC, .@players, false, getarg(0), getarg(1), getarg(2), getarg(3), getarg(4));
+ // Legacy
+ if (getargcount() > 7)
+ .@ox=1;
+ // Variables
+ .@m$=getarg(.@ox); .@ox+=1;
+ .@x1=getarg(.@ox); .@ox+=1;
+ .@y1=getarg(.@ox); .@ox+=1;
+ .@x2=getarg(.@ox); .@ox+=1;
+ .@y2=getarg(.@ox); .@ox+=1;
+ .@tk=getarg(.@ox); .@ox+=1;
+ .@e$=getarg(.@ox); .@ox+=1;
+ .@c = getunits(BL_PC, .@players, false, .@m$, .@x1, .@y1, .@x2, .@y2);
for (.@i = 0; .@i < .@c; .@i++) {
- addtimer(getarg(5), getarg(6), .@players[.@i]);
+ addtimer(.@tk, .@e$, .@players[.@i]);
}
return .@i;
}