summaryrefslogtreecommitdiff
path: root/world/map/npc/029-2/barrels_config.txt
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/029-2/barrels_config.txt')
-rw-r--r--world/map/npc/029-2/barrels_config.txt34
1 files changed, 9 insertions, 25 deletions
diff --git a/world/map/npc/029-2/barrels_config.txt b/world/map/npc/029-2/barrels_config.txt
index 665903fb..8ad1cfd5 100644
--- a/world/map/npc/029-2/barrels_config.txt
+++ b/world/map/npc/029-2/barrels_config.txt
@@ -1,7 +1,7 @@
// Barrels
// Author: Wushin
029-2,33,88,24,7|monster|HouseMaggot|1050,2,100000ms,30000ms,Barrel#0::OnMaggotDeath
--|script|#BarrelConfig|-1
+-|script|#BarrelConfig|32767
{
end;
@@ -14,25 +14,13 @@ OnInit:
set $@BarrelMax, getarraysize($@BarrelBits);
end;
}
-function|script|SetBarrelMask
-{
- set STARTAREA, (STARTAREA & ~(NIBBLE_4_MASK) | (@barrel_tmp << NIBBLE_4_SHIFT));
- set @barrel_tmp, 0;
- return;
-}
-function|script|CheckBarrelQuest
-{
- callfunc "CountBarrels";
- set @barrel_quest, ((STARTAREA & NIBBLE_4_MASK) >> NIBBLE_4_SHIFT);
- return;
-}
function|script|CountBarrels
{
set @barrel_count, 0;
set @count_tmp, 0;
goto L_Loop;
-L_Loop:
+L_Loop:
if (STARTAREA & $@BarrelBits[@barrel_count])
goto L_AddOne;
goto L_LoopAgain;
@@ -52,11 +40,10 @@ L_BarrelTally:
}
function|script|CheckBarrel
{
+ set @npc_distance, 2;
callfunc "PCtoNPCRange";
- if (@npc_check)
- goto L_Range;
- callfunc "CheckBarrelQuest";
- if (!(@barrel_quest == 2))
+ if(@npc_check) goto L_Return;
+ if (!(QL_ZEGAS == 2))
goto L_NoI;
if (STARTAREA & $@BarrelBits[@barrel])
goto L_Empty;
@@ -71,10 +58,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;
@@ -86,14 +69,15 @@ L_Empty:
L_QuestReward:
message strcharinfo(0), "You found the bug bomb.";
misceffect 33;
- set @barrel_tmp, 3;
- callfunc "SetBarrelMask";
+ set QL_ZEGAS, 3;
killmonster getmap() + "", "Barrel#0::OnMaggotDeath";
goto L_Return;
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: