From 27fe76b6a48cf51aa87346094845fb0ed6333304 Mon Sep 17 00:00:00 2001 From: mekolat Date: Tue, 21 Apr 2015 00:30:19 -0400 Subject: make PCtoNPCRange smarter --- world/map/npc/029-2/barrels_config.txt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'world/map/npc/029-2/barrels_config.txt') diff --git a/world/map/npc/029-2/barrels_config.txt b/world/map/npc/029-2/barrels_config.txt index 1b83d25b..1d356a08 100644 --- a/world/map/npc/029-2/barrels_config.txt +++ b/world/map/npc/029-2/barrels_config.txt @@ -20,7 +20,7 @@ function|script|CountBarrels set @count_tmp, 0; goto L_Loop; -L_Loop: +L_Loop: if (STARTAREA & $@BarrelBits[@barrel_count]) goto L_AddOne; goto L_LoopAgain; @@ -40,9 +40,8 @@ L_BarrelTally: } function|script|CheckBarrel { + set @npc_distance, 2; callfunc "PCtoNPCRange"; - if (@npc_check) - goto L_Range; if (!(QL_ZEGAS == 2)) goto L_NoI; if (STARTAREA & $@BarrelBits[@barrel]) @@ -58,10 +57,6 @@ function|script|CheckBarrel goto L_Spawn; goto L_Reward; -L_Range: - message strcharinfo(0), "You'll need to get closer."; - goto L_Return; - L_NoI: message strcharinfo(0), "Nothing interesting here."; goto L_Return; @@ -79,7 +74,9 @@ L_QuestReward: L_Spawn: message strcharinfo(0), "Uck, More Maggots!"; - areamonster getmap() + "", @npc_loc[0], @npc_loc[1], (@npc_loc[0] + 1), (@npc_loc[1] + 1), $@BarrelSpawnName$, $@BarrelSpawnId, $@BarrelSpawnCnt, "Barrel#0::OnMaggotDeath"; + setarray @npc_loc, getnpcx(), getnpcy(); + areamonster getmap(), @npc_loc[0], @npc_loc[1], (@npc_loc[0] + 1), (@npc_loc[1] + 1), $@BarrelSpawnName$, $@BarrelSpawnId, $@BarrelSpawnCnt, "Barrel#0::OnMaggotDeath"; + cleararray @npc_loc, 0, 2; goto L_Return; L_Reward: -- cgit v1.2.3-70-g09d2