From e6488a8be673bd2f607934ba5c621cc5316eb1af Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 29 Apr 2019 09:27:45 -0300 Subject: Siege milestone with util functions for variable difficulty. It is weird if siege happens at multiple places at once. Experimental and unfinished, siege still happens immediately. --- npc/functions/siege.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'npc/functions') diff --git a/npc/functions/siege.txt b/npc/functions/siege.txt index 6fe15287c..72566549e 100644 --- a/npc/functions/siege.txt +++ b/npc/functions/siege.txt @@ -37,7 +37,7 @@ function script siege_calcdiff { return (.@bsum/.@c); } -// push to @mobs the if their level is within a 20 level range +// push to $@SIEGE_TMPMOBS the if their level is within a 20 level range // above or below // siege_push ( mobID, level ) function script siege_push { @@ -45,7 +45,7 @@ function script siege_push { .@lv=getarg(1,0); if (is_between(.@lv-20, .@lv+20, atoi(strmobinfo(3, .@mi)) ) ) - array_push(@mobs, .@mi); + array_push($@SIEGE_TMPMOBS, .@mi); return; } @@ -55,7 +55,7 @@ function script siege_push { // TP_HURNS and TP_NIVAL are supported. You can use them with the "|" operand, eg., // TP_TULIM | TP_HURNS. // -// It currently only creates @mobs, you need to use any_of() manually. +// It currently only creates $@SIEGE_TMPMOBS, you need to use any_of() manually. // siege_selectmob ( blvl, difficulty{, tp_mask} ) function script siege_selectmob { .@blv=getarg(0); @@ -65,9 +65,9 @@ function script siege_selectmob { // We don't need .@dif, so we convert difficulty to levels .@blv+=.@dif*3; - deletearray @mobs; - setarray @mobs, ManaGhost, CandiedSlime, Bif; - // Now we must select mobs, using array_push() to @mobs + deletearray $@SIEGE_TMPMOBS; + setarray $@SIEGE_TMPMOBS, ManaGhost, CandiedSlime, Bif; + // Now we must select mobs, using array_push() to $@SIEGE_TMPMOBS // First, mobs on all envs siege_push(BlackScorpion, .@blv); siege_push(GreenSlime, .@blv); -- cgit v1.2.3-70-g09d2