diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-08-20 14:02:13 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-08-20 14:02:13 -0300 |
commit | 81bdb90dce2b92d4402c3b34ac18e528ba457d44 (patch) | |
tree | d91c0f54c09c375bfdfc7478483010d645686db1 | |
parent | 5629260b874fe11c31914d3f8dea2dc224b12aa7 (diff) | |
download | serverdata-81bdb90dce2b92d4402c3b34ac18e528ba457d44.tar.gz serverdata-81bdb90dce2b92d4402c3b34ac18e528ba457d44.tar.bz2 serverdata-81bdb90dce2b92d4402c3b34ac18e528ba457d44.tar.xz serverdata-81bdb90dce2b92d4402c3b34ac18e528ba457d44.zip |
Fix a bug on anyloot() function
-rw-r--r-- | npc/017-10/dispatcher.txt | 10 | ||||
-rw-r--r-- | npc/functions/util.txt | 3 |
2 files changed, 6 insertions, 7 deletions
diff --git a/npc/017-10/dispatcher.txt b/npc/017-10/dispatcher.txt index 49bff36a4..10868f743 100644 --- a/npc/017-10/dispatcher.txt +++ b/npc/017-10/dispatcher.txt @@ -327,14 +327,14 @@ function lootField { .@val+=800; anyloot(MaggotSlime, .@lv, 10000, Arrow, .@lv, 9000, - IronArrow, .@lv, 4000, + IronArrow, .@lv, 4000, TreasureKey, max(1, .@lv/10), 6000, CactusDrink, limit(1, .@lv/10, 3), 4000, - CoinBag, limit(1, .@lv/8, 5), 4000, + CoinBag, limit(1, .@lv/8, 5), 4000, CasinoCoins, limit(1, .@lv/6, 10), 3200, - Coal, limit(1, .@lv/10, 3), 3000, - Dagger, limit(1, .@lv/15, 3), 3000, - Candy, limit(1, .@lv/5, 6), 2000, + Coal, limit(1, .@lv/10, 3), 3000, + Dagger, limit(1, .@lv/15, 3), 3000, + Candy, limit(1, .@lv/5, 6), 2000, ChocolateBar, limit(1, .@lv/20, 3), 1000, Milk, 1, 200, IcedBottle, 1, 60); diff --git a/npc/functions/util.txt b/npc/functions/util.txt index 21abcd1f2..0a25f2649 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -743,10 +743,9 @@ function script anyloot { return Exception("Faulty anyloot skill command invoked - error"); // Get Items - for (.@i=0;.@i < getargcount(); .@i++) { + for (.@i=0;.@i < getargcount(); .@i+=2) { if (rand2(10000) < getarg(.@i+2)) getitem getarg(.@i), rand2(1, getarg(.@i+1)); - .@i++; } return true; } |