summaryrefslogtreecommitdiff
path: root/world/map/npc
diff options
context:
space:
mode:
authorJessica Tölke <jtoelke@mail.upb.de>2012-01-17 20:23:02 +0100
committerJessica Tölke <jtoelke@mail.upb.de>2012-01-17 20:25:09 +0100
commitb9c76c51e9ba9c84a0bee23466901c6166569a67 (patch)
tree8c747da1c21467e7aad8d62002287a97da527b15 /world/map/npc
parentaf937c6f932cdea5b56f0ee7c4976c7706e986a8 (diff)
downloadserverdata-b9c76c51e9ba9c84a0bee23466901c6166569a67.tar.gz
serverdata-b9c76c51e9ba9c84a0bee23466901c6166569a67.tar.bz2
serverdata-b9c76c51e9ba9c84a0bee23466901c6166569a67.tar.xz
serverdata-b9c76c51e9ba9c84a0bee23466901c6166569a67.zip
Barbarian quest: change some variables that are used as constants to global and put them in an init NPC
Diffstat (limited to 'world/map/npc')
-rw-r--r--world/map/npc/033-1/_import.txt1
-rw-r--r--world/map/npc/033-1/barbarianinit.txt6
-rw-r--r--world/map/npc/033-1/birrod.txt15
-rw-r--r--world/map/npc/033-1/kimarr.txt15
-rw-r--r--world/map/npc/033-1/yerrnk.txt11
-rw-r--r--world/map/npc/034-1/ambushs.txt180
-rw-r--r--world/map/npc/034-1/yetiSpawn.txt12
7 files changed, 82 insertions, 158 deletions
diff --git a/world/map/npc/033-1/_import.txt b/world/map/npc/033-1/_import.txt
index 39d37f0a..01328819 100644
--- a/world/map/npc/033-1/_import.txt
+++ b/world/map/npc/033-1/_import.txt
@@ -3,6 +3,7 @@
map: 033-1.gat
npc: npc/033-1/_mobs.txt
npc: npc/033-1/_warps.txt
+npc: npc/033-1/barbarianinit.txt
npc: npc/033-1/birrod.txt
npc: npc/033-1/debug.txt
npc: npc/033-1/kimarr.txt
diff --git a/world/map/npc/033-1/barbarianinit.txt b/world/map/npc/033-1/barbarianinit.txt
new file mode 100644
index 00000000..a8543356
--- /dev/null
+++ b/world/map/npc/033-1/barbarianinit.txt
@@ -0,0 +1,6 @@
+-|script|#barbarian033_1init|-1,{
+OnInit:
+ set $@Q_Barbarians_MASK, NIBBLE_0_MASK;
+ set $@Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
+ set $@Q_Barbarians_wolvern_amount, 10;
+}
diff --git a/world/map/npc/033-1/birrod.txt b/world/map/npc/033-1/birrod.txt
index 5bcd4f96..52c04d8a 100644
--- a/world/map/npc/033-1/birrod.txt
+++ b/world/map/npc/033-1/birrod.txt
@@ -1,12 +1,8 @@
033-1.gat,72,27,0|script|Birrod|217,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
-
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
set @wolvern_level, 40; // minimum level to do the wolvern hunting
- set @wolvern_amount, 10; // number of script spawned wolverns to kill
set @wolvern_exp, 5000;
set @minigame_exp, 5000;
@@ -48,7 +44,7 @@ L_Hunting:
mes "\"I noticed some groups of wolverns in the forest west of here which are unusually aggressive.";
mes "This makes it dangerous for all the small people from the town nearby to go there.\"";
next;
- mes "\"To prove your skills, go to the forest and hunt down " + @wolvern_amount + " of the very aggressive wolverns.\"";
+ mes "\"To prove your skills, go to the forest and hunt down " + $@Q_Barbarians_wolvern_amount + " of the very aggressive wolverns.\"";
next;
mes "\"There are also some wolverns that behave normally and attack you only when you come too close to them.";
mes "Those are not the ones I mean, but those that seek the battle themselves.\"";
@@ -57,7 +53,7 @@ L_Hunting:
goto L_Close;
L_Wolverns:
- if (wolvern_count >= @wolvern_amount)
+ if (wolvern_count >= $@Q_Barbarians_wolvern_amount)
goto L_Wolverns_Done;
mes "[Birrod]";
mes "\"Greetings, my friend.";
@@ -235,17 +231,14 @@ L_Weak:
goto L_Close;
L_Close:
- set @Q_Barbarians_MASK, 0;
- set @Q_Barbarians_SHIFT, 0;
set @state, 0;
set @wolvern_level, 0;
- set @wolvern_amount, 0;
set @wolvern_exp, 0;
set @minigame_exp, 0;
close;
S_Update_Mask:
set QUEST_Barbarians,
- (QUEST_Barbarians & ~(@Q_Barbarians_MASK)) | (@state << @Q_Barbarians_SHIFT);
+ (QUEST_Barbarians & ~($@Q_Barbarians_MASK)) | (@state << $@Q_Barbarians_SHIFT);
return;
}
diff --git a/world/map/npc/033-1/kimarr.txt b/world/map/npc/033-1/kimarr.txt
index 0070089c..c8924df8 100644
--- a/world/map/npc/033-1/kimarr.txt
+++ b/world/map/npc/033-1/kimarr.txt
@@ -37,10 +37,7 @@
if ($@Fluffy_FighterID == getcharid(3))
goto L_Attention;
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
-
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state >= 3) goto L_Again;
if (@state == 2) goto L_Reward;
@@ -103,9 +100,7 @@ L_AlreadyGotReward:
goto L_Close;
L_Reward1:
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state >= 2)
goto L_AlreadyGotReward;
@@ -344,8 +339,6 @@ S_Clean:
killmonster "033-1.gat", "Kimarr::OnWolvernDeath";
killmonster "033-1.gat", "Kimarr::OnYetiDeath";
killmonster "033-1.gat", "Kimarr::OnFluffyDeath";
- set @Q_Barbarians_MASK, 0;
- set @Q_Barbarians_SHIFT, 0;
set @state, 0;
return;
@@ -420,12 +413,12 @@ L_Close:
// still, I think it's a good precent to ALWAYS exit via L_Close
set @loop, 0;
- // if you unset @state, @Q_Barbarians_MASK or @Q_Barbarians_SHIFT, it might break the script
+ // if you unset @state, it might break the script
// If only we had the concept of "local constants" ...
close;
S_Update_Mask:
set QUEST_Barbarians,
- (QUEST_Barbarians & ~(@Q_Barbarians_MASK)) | (@state << @Q_Barbarians_SHIFT);
+ (QUEST_Barbarians & ~($@Q_Barbarians_MASK)) | (@state << $@Q_Barbarians_SHIFT);
return;
}
diff --git a/world/map/npc/033-1/yerrnk.txt b/world/map/npc/033-1/yerrnk.txt
index 749350af..0ea375da 100644
--- a/world/map/npc/033-1/yerrnk.txt
+++ b/world/map/npc/033-1/yerrnk.txt
@@ -1,8 +1,5 @@
033-1.gat,66,28,0|script|Yerrnk|216,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
-
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
set @yeti_level, 70;
@@ -168,15 +165,13 @@ L_Done:
goto L_Close;
L_Close:
- set @Q_Barbarians_MASK, 0;
- set @Q_Barbarians_SHIFT, 0;
set @state, 0;
set @yeti_level, 0;
close;
S_Update_Mask:
set QUEST_Barbarians,
- (QUEST_Barbarians & ~(@Q_Barbarians_MASK))
- | (@state << @Q_Barbarians_SHIFT);
+ (QUEST_Barbarians & ~($@Q_Barbarians_MASK))
+ | (@state << $@Q_Barbarians_SHIFT);
return;
}
diff --git a/world/map/npc/034-1/ambushs.txt b/world/map/npc/034-1/ambushs.txt
index 7bb9462f..78084764 100644
--- a/world/map/npc/034-1/ambushs.txt
+++ b/world/map/npc/034-1/ambushs.txt
@@ -2,9 +2,7 @@
// Author: Jenalya
034-1.gat,118,59,0|script|#Ambush0Trigger|32767,2,2,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state != 4)
end;
@@ -25,7 +23,7 @@ end;
OnAmbush:
if (attachrid($@Ambush0VictimID) == 0)
goto L_Abort;
- set @wolvern_amount, 10; // has to be same value as in birrod.txt
+ set $@Q_Barbarians_wolvern_amount, 10; // has to be same value as in birrod.txt
set $@Ambush0_Spawn, 4 + rand(3);
message strcharinfo(0), "An ambush!";
areamonster "034-1.gat", 113, 55, 122, 63, "", 1090, $@Ambush0_Spawn, "#Ambush0::OnWolvernDeath";
@@ -39,9 +37,7 @@ L_Abort:
OnWolvernDeath:
set @MobID, 1090;
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
set $@Ambush0_Spawn, $@Ambush0_Spawn - 1;
@@ -51,7 +47,7 @@ OnWolvernDeath:
end;
set wolvern_count, wolvern_count + 1;
- if (wolvern_count >= @wolvern_amount)
+ if (wolvern_count >= $@Q_Barbarians_wolvern_amount)
message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?";
if ($@Ambush0_Spawn == 0)
@@ -60,9 +56,7 @@ OnWolvernDeath:
}
034-1.gat,94,91,0|script|#Ambush1Trigger|32767,2,2,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state != 4)
end;
@@ -83,7 +77,7 @@ end;
OnAmbush:
if (attachrid($@Ambush1VictimID) == 0)
end;
- set @wolvern_amount, 10; // has to be same value as in birrod.txt
+ set $@Q_Barbarians_wolvern_amount, 10; // has to be same value as in birrod.txt
set $@Ambush1_Spawn, 4 + rand(3);
message strcharinfo(0), "An ambush!";
areamonster "034-1.gat", 91, 89, 98, 94, "", 1090, $@Ambush1_Spawn, "#Ambush1::OnWolvernDeath";
@@ -97,9 +91,7 @@ L_Abort:
OnWolvernDeath:
set @MobID, 1090;
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
set $@Ambush1_Spawn, $@Ambush1_Spawn - 1;
@@ -109,7 +101,7 @@ OnWolvernDeath:
end;
set wolvern_count, wolvern_count + 1;
- if (wolvern_count >= @wolvern_amount)
+ if (wolvern_count >= $@Q_Barbarians_wolvern_amount)
message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?";
if ($@Ambush1_Spawn == 0)
@@ -118,9 +110,7 @@ OnWolvernDeath:
}
034-1.gat,122,35,0|script|#Ambush2Trigger|32767,2,2,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state != 4)
end;
@@ -141,7 +131,7 @@ end;
OnAmbush:
if (attachrid($@Ambush2VictimID) == 0)
goto L_Abort;
- set @wolvern_amount, 10; // has to be same value as in birrod.txt
+ set $@Q_Barbarians_wolvern_amount, 10; // has to be same value as in birrod.txt
set $@Ambush2_Spawn, 4 + rand(3);
message strcharinfo(0), "An ambush!";
areamonster "034-1.gat", 118, 32, 126, 39, "", 1090, $@Ambush2_Spawn, "#Ambush2::OnWolvernDeath";
@@ -155,9 +145,7 @@ L_Abort:
OnWolvernDeath:
set @MobID, 1090;
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
set $@Ambush2_Spawn, $@Ambush2_Spawn - 1;
@@ -167,7 +155,7 @@ OnWolvernDeath:
end;
set wolvern_count, wolvern_count + 1;
- if (wolvern_count >= @wolvern_amount)
+ if (wolvern_count >= $@Q_Barbarians_wolvern_amount)
message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?";
if ($@Ambush2_Spawn == 0)
@@ -176,9 +164,7 @@ OnWolvernDeath:
}
034-1.gat,83,44,0|script|#Ambush3Trigger|32767,2,2,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state != 4)
end;
@@ -199,7 +185,7 @@ end;
OnAmbush:
if (attachrid($@Ambush3VictimID) == 0)
goto L_Abort;
- set @wolvern_amount, 10; // has to be same value as in birrod.txt
+ set $@Q_Barbarians_wolvern_amount, 10; // has to be same value as in birrod.txt
set $@Ambush3_Spawn, 4 + rand(3);
message strcharinfo(0), "An ambush!";
areamonster "034-1.gat", 79, 41, 86, 47, "", 1090, $@Ambush3_Spawn, "#Ambush3::OnWolvernDeath";
@@ -213,9 +199,7 @@ L_Abort:
OnWolvernDeath:
set @MobID, 1090;
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
set $@Ambush3_Spawn, $@Ambush3_Spawn - 1;
@@ -225,7 +209,7 @@ OnWolvernDeath:
end;
set wolvern_count, wolvern_count + 1;
- if (wolvern_count >= @wolvern_amount)
+ if (wolvern_count >= $@Q_Barbarians_wolvern_amount)
message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?";
if ($@Ambush3_Spawn == 0)
@@ -234,9 +218,7 @@ OnWolvernDeath:
}
034-1.gat,74,28,0|script|#Ambush4Trigger|32767,2,2,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state != 4)
end;
@@ -257,7 +239,7 @@ end;
OnAmbush:
if (attachrid($@Ambush4VictimID) == 0)
goto L_Abort;
- set @wolvern_amount, 10; // has to be same value as in birrod.txt
+ set $@Q_Barbarians_wolvern_amount, 10; // has to be same value as in birrod.txt
set $@Ambush4_Spawn, 4 + rand(3);
message strcharinfo(0), "An ambush!";
areamonster "034-1.gat", 69, 25, 77, 31, "", 1090, $@Ambush4_Spawn, "#Ambush4::OnWolvernDeath";
@@ -271,9 +253,7 @@ L_Abort:
OnWolvernDeath:
set @MobID, 1090;
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
set $@Ambush4_Spawn, $@Ambush4_Spawn - 1;
@@ -283,7 +263,7 @@ OnWolvernDeath:
end;
set wolvern_count, wolvern_count + 1;
- if (wolvern_count >= @wolvern_amount)
+ if (wolvern_count >= $@Q_Barbarians_wolvern_amount)
message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?";
if ($@Ambush4_Spawn == 0)
@@ -292,9 +272,7 @@ OnWolvernDeath:
}
034-1.gat,26,44,0|script|#Ambush5Trigger|32767,2,2,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state != 4)
end;
@@ -315,7 +293,7 @@ end;
OnAmbush:
if (attachrid($@Ambush5VictimID) == 0)
goto L_Abort;
- set @wolvern_amount, 10; // has to be same value as in birrod.txt
+ set $@Q_Barbarians_wolvern_amount, 10; // has to be same value as in birrod.txt
set $@Ambush5_Spawn, 4 + rand(3);
message strcharinfo(0), "An ambush!";
areamonster "034-1.gat", 22, 40, 30, 48, "", 1090, $@Ambush5_Spawn, "#Ambush5::OnWolvernDeath";
@@ -329,9 +307,7 @@ L_Abort:
OnWolvernDeath:
set @MobID, 1090;
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
set $@Ambush5_Spawn, $@Ambush5_Spawn - 1;
@@ -341,7 +317,7 @@ OnWolvernDeath:
end;
set wolvern_count, wolvern_count + 1;
- if (wolvern_count >= @wolvern_amount)
+ if (wolvern_count >= $@Q_Barbarians_wolvern_amount)
message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?";
if ($@Ambush5_Spawn == 0)
@@ -350,9 +326,7 @@ OnWolvernDeath:
}
034-1.gat,50,47,0|script|#Ambush6Trigger|32767,2,2,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state != 4)
end;
@@ -373,7 +347,7 @@ end;
OnAmbush:
if (attachrid($@Ambush6VictimID) == 0)
goto L_Abort;
- set @wolvern_amount, 10; // has to be same value as in birrod.txt
+ set $@Q_Barbarians_wolvern_amount, 10; // has to be same value as in birrod.txt
set $@Ambush6_Spawn, 4 + rand(3);
message strcharinfo(0), "An ambush!";
areamonster "034-1.gat", 46, 45, 54, 50, "", 1090, $@Ambush6_Spawn, "#Ambush6::OnWolvernDeath";
@@ -387,9 +361,7 @@ L_Abort:
OnWolvernDeath:
set @MobID, 1090;
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
set $@Ambush6_Spawn, $@Ambush6_Spawn - 1;
@@ -399,7 +371,7 @@ OnWolvernDeath:
end;
set wolvern_count, wolvern_count + 1;
- if (wolvern_count >= @wolvern_amount)
+ if (wolvern_count >= $@Q_Barbarians_wolvern_amount)
message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?";
if ($@Ambush6_Spawn == 0)
@@ -408,9 +380,7 @@ OnWolvernDeath:
}
034-1.gat,36,62,0|script|#Ambush7Trigger|32767,2,2,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state != 4)
end;
@@ -431,7 +401,7 @@ end;
OnAmbush:
if (attachrid($@Ambush7VictimID) == 0)
goto L_Abort;
- set @wolvern_amount, 10; // has to be same value as in birrod.txt
+ set $@Q_Barbarians_wolvern_amount, 10; // has to be same value as in birrod.txt
set $@Ambush7_Spawn, 4 + rand(3);
message strcharinfo(0), "An ambush!";
areamonster "034-1.gat", 31, 59, 39, 65, "", 1090, $@Ambush7_Spawn, "#Ambush7::OnWolvernDeath";
@@ -445,9 +415,7 @@ L_Abort:
OnWolvernDeath:
set @MobID, 1090;
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
set $@Ambush7_Spawn, $@Ambush7_Spawn - 1;
@@ -457,7 +425,7 @@ OnWolvernDeath:
end;
set wolvern_count, wolvern_count + 1;
- if (wolvern_count >= @wolvern_amount)
+ if (wolvern_count >= $@Q_Barbarians_wolvern_amount)
message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?";
if ($@Ambush7_Spawn == 0)
@@ -466,9 +434,7 @@ OnWolvernDeath:
}
034-1.gat,26,95,0|script|#Ambush8Trigger|32767,2,2,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state != 4)
end;
@@ -489,7 +455,7 @@ end;
OnAmbush:
if (attachrid($@Ambush8VictimID) == 0)
goto L_Abort;
- set @wolvern_amount, 10; // has to be same value as in birrod.txt
+ set $@Q_Barbarians_wolvern_amount, 10; // has to be same value as in birrod.txt
set $@Ambush8_Spawn, 4 + rand(3);
message strcharinfo(0), "An ambush!";
areamonster "034-1.gat", 21, 90, 32, 100, "", 1090, $@Ambush8_Spawn, "#Ambush8::OnWolvernDeath";
@@ -503,9 +469,7 @@ L_Abort:
OnWolvernDeath:
set @MobID, 1090;
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
set $@Ambush8_Spawn, $@Ambush8_Spawn - 1;
@@ -515,7 +479,7 @@ OnWolvernDeath:
end;
set wolvern_count, wolvern_count + 1;
- if (wolvern_count >= @wolvern_amount)
+ if (wolvern_count >= $@Q_Barbarians_wolvern_amount)
message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?";
if ($@Ambush8_Spawn == 0)
@@ -524,9 +488,7 @@ OnWolvernDeath:
}
034-1.gat,56,91,0|script|#Ambush9Trigger|32767,2,2,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state != 4)
end;
@@ -547,7 +509,7 @@ end;
OnAmbush:
if (attachrid($@Ambush9VictimID) == 0)
goto L_Abort;
- set @wolvern_amount, 10; // has to be same value as in birrod.txt
+ set $@Q_Barbarians_wolvern_amount, 10; // has to be same value as in birrod.txt
set $@Ambush9_Spawn, 4 + rand(3);
message strcharinfo(0), "An ambush!";
areamonster "034-1.gat", 52, 88, 61, 96, "", 1090, $@Ambush9_Spawn, "#Ambush9::OnWolvernDeath";
@@ -561,9 +523,7 @@ L_Abort:
OnWolvernDeath:
set @MobID, 1090;
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
set $@Ambush9_Spawn, $@Ambush9_Spawn - 1;
@@ -573,7 +533,7 @@ OnWolvernDeath:
end;
set wolvern_count, wolvern_count + 1;
- if (wolvern_count >= @wolvern_amount)
+ if (wolvern_count >= $@Q_Barbarians_wolvern_amount)
message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?";
if ($@Ambush9_Spawn == 0)
@@ -582,9 +542,7 @@ OnWolvernDeath:
}
034-1.gat,65,66,0|script|#Ambush10Trigger|32767,2,2,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state != 4)
end;
@@ -605,7 +563,7 @@ end;
OnAmbush:
if (attachrid($@Ambush10VictimID) == 0)
goto L_Abort;
- set @wolvern_amount, 10; // has to be same value as in birrod.txt
+ set $@Q_Barbarians_wolvern_amount, 10; // has to be same value as in birrod.txt
set $@Ambush10_Spawn, 4 + rand(3);
message strcharinfo(0), "An ambush!";
areamonster "034-1.gat", 60, 63, 69, 69, "", 1090, $@Ambush10_Spawn, "#Ambush10::OnWolvernDeath";
@@ -619,9 +577,7 @@ L_Abort:
OnWolvernDeath:
set @MobID, 1090;
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
set $@Ambush10_Spawn, $@Ambush10_Spawn - 1;
@@ -631,7 +587,7 @@ OnWolvernDeath:
end;
set wolvern_count, wolvern_count + 1;
- if (wolvern_count >= @wolvern_amount)
+ if (wolvern_count >= $@Q_Barbarians_wolvern_amount)
message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?";
if ($@Ambush10_Spawn == 0)
@@ -640,9 +596,7 @@ OnWolvernDeath:
}
034-1.gat,86,68,0|script|#Ambush11Trigger|32767,2,2,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state != 4)
end;
@@ -663,7 +617,7 @@ end;
OnAmbush:
if (attachrid($@Ambush11VictimID) == 0)
goto L_Abort;
- set @wolvern_amount, 10; // has to be same value as in birrod.txt
+ set $@Q_Barbarians_wolvern_amount, 10; // has to be same value as in birrod.txt
set $@Ambush11_Spawn, 4 + rand(3);
message strcharinfo(0), "An ambush!";
areamonster "034-1.gat", 82, 65, 90, 72, "", 1090, $@Ambush11_Spawn, "#Ambush11::OnWolvernDeath";
@@ -677,9 +631,7 @@ L_Abort:
OnWolvernDeath:
set @MobID, 1090;
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
set $@Ambush11_Spawn, $@Ambush11_Spawn - 1;
@@ -689,7 +641,7 @@ OnWolvernDeath:
end;
set wolvern_count, wolvern_count + 1;
- if (wolvern_count >= @wolvern_amount)
+ if (wolvern_count >= $@Q_Barbarians_wolvern_amount)
message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?";
if ($@Ambush11_Spawn == 0)
@@ -698,9 +650,7 @@ OnWolvernDeath:
}
034-1.gat,101,79,0|script|#Ambush12Trigger|32767,2,2,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state != 4)
end;
@@ -721,7 +671,7 @@ end;
OnAmbush:
if (attachrid($@Ambush12VictimID) == 0)
goto L_Abort;
- set @wolvern_amount, 10; // has to be same value as in birrod.txt
+ set $@Q_Barbarians_wolvern_amount, 10; // has to be same value as in birrod.txt
set $@Ambush12_Spawn, 4 + rand(3);
message strcharinfo(0), "An ambush!";
areamonster "034-1.gat", 98, 76, 104, 81, "", 1090, $@Ambush12_Spawn, "#Ambush12::OnWolvernDeath";
@@ -735,9 +685,7 @@ L_Abort:
OnWolvernDeath:
set @MobID, 1090;
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
set $@Ambush12_Spawn, $@Ambush12_Spawn - 1;
@@ -747,7 +695,7 @@ OnWolvernDeath:
end;
set wolvern_count, wolvern_count + 1;
- if (wolvern_count >= @wolvern_amount)
+ if (wolvern_count >= $@Q_Barbarians_wolvern_amount)
message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?";
if ($@Ambush12_Spawn == 0)
@@ -756,9 +704,7 @@ OnWolvernDeath:
}
034-1.gat,124,88,0|script|#Ambush13Trigger|32767,2,2,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state != 4)
end;
@@ -779,7 +725,7 @@ end;
OnAmbush:
if (attachrid($@Ambush13VictimID) == 0)
goto L_Abort;
- set @wolvern_amount, 10; // has to be same value as in birrod.txt
+ set $@Q_Barbarians_wolvern_amount, 10; // has to be same value as in birrod.txt
set $@Ambush13_Spawn, 4 + rand(3);
message strcharinfo(0), "An ambush!";
areamonster "034-1.gat", 120, 86, 127, 90, "", 1090, $@Ambush13_Spawn, "#Ambush13::OnWolvernDeath";
@@ -793,9 +739,7 @@ L_Abort:
OnWolvernDeath:
set @MobID, 1090;
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
set $@Ambush13_Spawn, $@Ambush13_Spawn - 1;
@@ -805,7 +749,7 @@ OnWolvernDeath:
end;
set wolvern_count, wolvern_count + 1;
- if (wolvern_count >= @wolvern_amount)
+ if (wolvern_count >= $@Q_Barbarians_wolvern_amount)
message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?";
if ($@Ambush13_Spawn == 0)
@@ -814,9 +758,7 @@ OnWolvernDeath:
}
034-1.gat,117,103,0|script|#Ambush14Trigger|32767,2,2,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state != 4)
end;
@@ -837,7 +779,7 @@ end;
OnAmbush:
if (attachrid($@Ambush14VictimID) == 0)
goto L_Abort;
- set @wolvern_amount, 10; // has to be same value as in birrod.txt
+ set $@Q_Barbarians_wolvern_amount, 10; // has to be same value as in birrod.txt
set $@Ambush14_Spawn, 4 + rand(3);
message strcharinfo(0), "An ambush!";
areamonster "034-1.gat", 114, 100, 120, 106, "", 1090, $@Ambush14_Spawn, "#Ambush14::OnWolvernDeath";
@@ -851,9 +793,7 @@ L_Abort:
OnWolvernDeath:
set @MobID, 1090;
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
set $@Ambush14_Spawn, $@Ambush14_Spawn - 1;
@@ -863,7 +803,7 @@ OnWolvernDeath:
end;
set wolvern_count, wolvern_count + 1;
- if (wolvern_count >= @wolvern_amount)
+ if (wolvern_count >= $@Q_Barbarians_wolvern_amount)
message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?";
if ($@Ambush14_Spawn == 0)
diff --git a/world/map/npc/034-1/yetiSpawn.txt b/world/map/npc/034-1/yetiSpawn.txt
index f18e78be..7182c1af 100644
--- a/world/map/npc/034-1/yetiSpawn.txt
+++ b/world/map/npc/034-1/yetiSpawn.txt
@@ -2,9 +2,7 @@
// Author: Jenalya
034-1.gat,79,98,0|script|#Yerrnk_YetiTrigger|32767,1,3,{
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state != 7)
end;
@@ -35,9 +33,7 @@ L_Abort:
OnYetiDeath:
set @MobID, 1072;
- set @Q_Barbarians_MASK, NIBBLE_0_MASK;
- set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT;
- set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT);
+ set @state, ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
if (@state != 7)
goto L_End;
set @state, 8;
@@ -51,7 +47,7 @@ L_End:
S_Update_Mask:
set QUEST_Barbarians,
- (QUEST_Barbarians & ~(@Q_Barbarians_MASK))
- | (@state << @Q_Barbarians_SHIFT);
+ (QUEST_Barbarians & ~($@Q_Barbarians_MASK))
+ | (@state << $@Q_Barbarians_SHIFT);
return;
}