From 7b1f6f59b0781188c967b896a62c6ecc05df84e4 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 29 Apr 2019 09:51:25 -0300 Subject: Fix pipeline and other minor improvements --- npc/functions/siege.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'npc/functions/siege.txt') diff --git a/npc/functions/siege.txt b/npc/functions/siege.txt index 72566549e..9149cfaa4 100644 --- a/npc/functions/siege.txt +++ b/npc/functions/siege.txt @@ -26,25 +26,26 @@ function script siege_calcdiff { .@highest=getarg(1, false); .@c = getunits(BL_PC, .@players, false, getarg(0)); for (.@i = 0; .@i < .@c; .@i++) { - .@b=;readparam(BaseLevel, .@players[.@i]) + .@b=readparam(BaseLevel, .@players[.@i]); .@bsum+=.@b; if (.@b > .@highest) .@highest=.@b; } + debugmes "calcdiff: Total %d Average %d Highest %d", .@bsum, (.@bsum/.@c), .@highest; if (getarg(1,false)) return .@highest; else return (.@bsum/.@c); } -// push to $@SIEGE_TMPMOBS the if their level is within a 20 level range +// push to $@SIEGE_TMPMOBS the if their level is within a 15 levels range // above or below // siege_push ( mobID, level ) function script siege_push { .@mi=getarg(0); .@lv=getarg(1,0); - if (is_between(.@lv-20, .@lv+20, atoi(strmobinfo(3, .@mi)) ) ) + if ( is_between(.@lv-15, .@lv+15, strmobinfo(3, .@mi)) ) array_push($@SIEGE_TMPMOBS, .@mi); return; } -- cgit v1.2.3-60-g2f50