summaryrefslogtreecommitdiff
path: root/world/map/npc/029-2/barrels_config.txt
diff options
context:
space:
mode:
authormekolat <mekolat@gmail.com>2015-04-21 00:30:19 -0400
committermekolat <mekolat@users.noreply.github.com>2015-04-30 02:06:42 -0400
commit27fe76b6a48cf51aa87346094845fb0ed6333304 (patch)
tree4f88cae1c5ce996adaa41de52f0e72830e2fd497 /world/map/npc/029-2/barrels_config.txt
parentb28709f705abf9ca0fff5bf79f95d0599722fdff (diff)
downloadserverdata-27fe76b6a48cf51aa87346094845fb0ed6333304.tar.gz
serverdata-27fe76b6a48cf51aa87346094845fb0ed6333304.tar.bz2
serverdata-27fe76b6a48cf51aa87346094845fb0ed6333304.tar.xz
serverdata-27fe76b6a48cf51aa87346094845fb0ed6333304.zip
make PCtoNPCRange smarter
Diffstat (limited to 'world/map/npc/029-2/barrels_config.txt')
-rw-r--r--world/map/npc/029-2/barrels_config.txt13
1 files changed, 5 insertions, 8 deletions
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: