From af937c6f932cdea5b56f0ee7c4976c7706e986a8 Mon Sep 17 00:00:00 2001 From: Stefan Dombrowski Date: Mon, 16 Jan 2012 22:12:16 +0100 Subject: Some fixes to the Barbarian quests --- world/map/npc/034-1/ambushs.txt | 210 ++++++++++++++++++++++++++-------------- 1 file changed, 135 insertions(+), 75 deletions(-) (limited to 'world/map/npc/034-1/ambushs.txt') diff --git a/world/map/npc/034-1/ambushs.txt b/world/map/npc/034-1/ambushs.txt index 8bcd9ecc..7bb9462f 100644 --- a/world/map/npc/034-1/ambushs.txt +++ b/world/map/npc/034-1/ambushs.txt @@ -29,7 +29,6 @@ OnAmbush: set $@Ambush0_Spawn, 4 + rand(3); message strcharinfo(0), "An ambush!"; areamonster "034-1.gat", 113, 55, 122, 63, "", 1090, $@Ambush0_Spawn, "#Ambush0::OnWolvernDeath"; - set $@Ambush0VictimID, 0; end; L_Abort: @@ -43,15 +42,20 @@ OnWolvernDeath: set @Q_Barbarians_MASK, NIBBLE_0_MASK; set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT); - if (@state == 4) - set wolvern_count, wolvern_count + 1; set $@Ambush0_Spawn, $@Ambush0_Spawn - 1; - if ($@Ambush0_Spawn == 0) - set $@Ambush0_Active, 0; + if ($@Ambush0VictimID != getcharid(3)) + end; + if (@state != 4) + end; + + set wolvern_count, wolvern_count + 1; if (wolvern_count >= @wolvern_amount) message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + + if ($@Ambush0_Spawn == 0) + goto L_Abort; end; } @@ -83,7 +87,6 @@ OnAmbush: set $@Ambush1_Spawn, 4 + rand(3); message strcharinfo(0), "An ambush!"; areamonster "034-1.gat", 91, 89, 98, 94, "", 1090, $@Ambush1_Spawn, "#Ambush1::OnWolvernDeath"; - set $@Ambush1VictimID, 0; end; L_Abort: @@ -97,15 +100,20 @@ OnWolvernDeath: set @Q_Barbarians_MASK, NIBBLE_0_MASK; set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT); - if (@state == 4) - set wolvern_count, wolvern_count + 1; set $@Ambush1_Spawn, $@Ambush1_Spawn - 1; - if ($@Ambush1_Spawn == 0) - set $@Ambush1_Active, 0; + if ($@Ambush1VictimID != getcharid(3)) + end; + if (@state != 4) + end; + + set wolvern_count, wolvern_count + 1; if (wolvern_count >= @wolvern_amount) message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + + if ($@Ambush1_Spawn == 0) + goto L_Abort; end; } @@ -137,7 +145,6 @@ OnAmbush: set $@Ambush2_Spawn, 4 + rand(3); message strcharinfo(0), "An ambush!"; areamonster "034-1.gat", 118, 32, 126, 39, "", 1090, $@Ambush2_Spawn, "#Ambush2::OnWolvernDeath"; - set $@Ambush2VictimID, 0; end; L_Abort: @@ -151,15 +158,20 @@ OnWolvernDeath: set @Q_Barbarians_MASK, NIBBLE_0_MASK; set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT); - if (@state == 4) - set wolvern_count, wolvern_count + 1; set $@Ambush2_Spawn, $@Ambush2_Spawn - 1; - if ($@Ambush2_Spawn == 0) - set $@Ambush2_Active, 0; + if ($@Ambush2VictimID != getcharid(3)) + end; + if (@state != 4) + end; + + set wolvern_count, wolvern_count + 1; if (wolvern_count >= @wolvern_amount) message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + + if ($@Ambush2_Spawn == 0) + goto L_Abort; end; } @@ -191,7 +203,6 @@ OnAmbush: set $@Ambush3_Spawn, 4 + rand(3); message strcharinfo(0), "An ambush!"; areamonster "034-1.gat", 79, 41, 86, 47, "", 1090, $@Ambush3_Spawn, "#Ambush3::OnWolvernDeath"; - set $@Ambush3VictimID, 0; end; L_Abort: @@ -205,15 +216,20 @@ OnWolvernDeath: set @Q_Barbarians_MASK, NIBBLE_0_MASK; set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT); - if (@state == 4) - set wolvern_count, wolvern_count + 1; set $@Ambush3_Spawn, $@Ambush3_Spawn - 1; - if ($@Ambush3_Spawn == 0) - set $@Ambush3_Active, 0; + if ($@Ambush3VictimID != getcharid(3)) + end; + if (@state != 4) + end; + + set wolvern_count, wolvern_count + 1; if (wolvern_count >= @wolvern_amount) message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + + if ($@Ambush3_Spawn == 0) + goto L_Abort; end; } @@ -245,7 +261,6 @@ OnAmbush: set $@Ambush4_Spawn, 4 + rand(3); message strcharinfo(0), "An ambush!"; areamonster "034-1.gat", 69, 25, 77, 31, "", 1090, $@Ambush4_Spawn, "#Ambush4::OnWolvernDeath"; - set $@Ambush4VictimID, 0; end; L_Abort: @@ -259,15 +274,20 @@ OnWolvernDeath: set @Q_Barbarians_MASK, NIBBLE_0_MASK; set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT); - if (@state == 4) - set wolvern_count, wolvern_count + 1; set $@Ambush4_Spawn, $@Ambush4_Spawn - 1; - if ($@Ambush4_Spawn == 0) - set $@Ambush4_Active, 0; + if ($@Ambush4VictimID != getcharid(3)) + end; + if (@state != 4) + end; + + set wolvern_count, wolvern_count + 1; if (wolvern_count >= @wolvern_amount) message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + + if ($@Ambush4_Spawn == 0) + goto L_Abort; end; } @@ -299,7 +319,6 @@ OnAmbush: set $@Ambush5_Spawn, 4 + rand(3); message strcharinfo(0), "An ambush!"; areamonster "034-1.gat", 22, 40, 30, 48, "", 1090, $@Ambush5_Spawn, "#Ambush5::OnWolvernDeath"; - set $@Ambush5VictimID, 0; end; L_Abort: @@ -313,15 +332,20 @@ OnWolvernDeath: set @Q_Barbarians_MASK, NIBBLE_0_MASK; set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT); - if (@state == 4) - set wolvern_count, wolvern_count + 1; set $@Ambush5_Spawn, $@Ambush5_Spawn - 1; - if ($@Ambush5_Spawn == 0) - set $@Ambush5_Active, 0; + if ($@Ambush5VictimID != getcharid(3)) + end; + if (@state != 4) + end; + + set wolvern_count, wolvern_count + 1; if (wolvern_count >= @wolvern_amount) message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + + if ($@Ambush5_Spawn == 0) + goto L_Abort; end; } @@ -353,7 +377,6 @@ OnAmbush: set $@Ambush6_Spawn, 4 + rand(3); message strcharinfo(0), "An ambush!"; areamonster "034-1.gat", 46, 45, 54, 50, "", 1090, $@Ambush6_Spawn, "#Ambush6::OnWolvernDeath"; - set $@Ambush6VictimID, 0; end; L_Abort: @@ -367,15 +390,20 @@ OnWolvernDeath: set @Q_Barbarians_MASK, NIBBLE_0_MASK; set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT); - if (@state == 4) - set wolvern_count, wolvern_count + 1; set $@Ambush6_Spawn, $@Ambush6_Spawn - 1; - if ($@Ambush6_Spawn == 0) - set $@Ambush6_Active, 0; + if ($@Ambush6VictimID != getcharid(3)) + end; + if (@state != 4) + end; + + set wolvern_count, wolvern_count + 1; if (wolvern_count >= @wolvern_amount) message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + + if ($@Ambush6_Spawn == 0) + goto L_Abort; end; } @@ -407,7 +435,6 @@ OnAmbush: set $@Ambush7_Spawn, 4 + rand(3); message strcharinfo(0), "An ambush!"; areamonster "034-1.gat", 31, 59, 39, 65, "", 1090, $@Ambush7_Spawn, "#Ambush7::OnWolvernDeath"; - set $@Ambush7VictimID, 0; end; L_Abort: @@ -421,15 +448,20 @@ OnWolvernDeath: set @Q_Barbarians_MASK, NIBBLE_0_MASK; set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT); - if (@state == 4) - set wolvern_count, wolvern_count + 1; set $@Ambush7_Spawn, $@Ambush7_Spawn - 1; - if ($@Ambush7_Spawn == 0) - set $@Ambush7_Active, 0; + if ($@Ambush7VictimID != getcharid(3)) + end; + if (@state != 4) + end; + + set wolvern_count, wolvern_count + 1; if (wolvern_count >= @wolvern_amount) message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + + if ($@Ambush7_Spawn == 0) + goto L_Abort; end; } @@ -461,7 +493,6 @@ OnAmbush: set $@Ambush8_Spawn, 4 + rand(3); message strcharinfo(0), "An ambush!"; areamonster "034-1.gat", 21, 90, 32, 100, "", 1090, $@Ambush8_Spawn, "#Ambush8::OnWolvernDeath"; - set $@Ambush8VictimID, 0; end; L_Abort: @@ -475,15 +506,20 @@ OnWolvernDeath: set @Q_Barbarians_MASK, NIBBLE_0_MASK; set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT); - if (@state == 4) - set wolvern_count, wolvern_count + 1; set $@Ambush8_Spawn, $@Ambush8_Spawn - 1; - if ($@Ambush8_Spawn == 0) - set $@Ambush8_Active, 0; + if ($@Ambush8VictimID != getcharid(3)) + end; + if (@state != 4) + end; + + set wolvern_count, wolvern_count + 1; if (wolvern_count >= @wolvern_amount) message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + + if ($@Ambush8_Spawn == 0) + goto L_Abort; end; } @@ -515,7 +551,6 @@ OnAmbush: set $@Ambush9_Spawn, 4 + rand(3); message strcharinfo(0), "An ambush!"; areamonster "034-1.gat", 52, 88, 61, 96, "", 1090, $@Ambush9_Spawn, "#Ambush9::OnWolvernDeath"; - set $@Ambush9VictimID, 0; end; L_Abort: @@ -529,15 +564,20 @@ OnWolvernDeath: set @Q_Barbarians_MASK, NIBBLE_0_MASK; set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT); - if (@state == 4) - set wolvern_count, wolvern_count + 1; set $@Ambush9_Spawn, $@Ambush9_Spawn - 1; - if ($@Ambush9_Spawn == 0) - set $@Ambush9_Active, 0; + if ($@Ambush9VictimID != getcharid(3)) + end; + if (@state != 4) + end; + + set wolvern_count, wolvern_count + 1; if (wolvern_count >= @wolvern_amount) message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + + if ($@Ambush9_Spawn == 0) + goto L_Abort; end; } @@ -569,7 +609,6 @@ OnAmbush: set $@Ambush10_Spawn, 4 + rand(3); message strcharinfo(0), "An ambush!"; areamonster "034-1.gat", 60, 63, 69, 69, "", 1090, $@Ambush10_Spawn, "#Ambush10::OnWolvernDeath"; - set $@Ambush10VictimID, 0; end; L_Abort: @@ -583,15 +622,20 @@ OnWolvernDeath: set @Q_Barbarians_MASK, NIBBLE_0_MASK; set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT); - if (@state == 4) - set wolvern_count, wolvern_count + 1; set $@Ambush10_Spawn, $@Ambush10_Spawn - 1; - if ($@Ambush10_Spawn == 0) - set $@Ambush10_Active, 0; + if ($@Ambush10VictimID != getcharid(3)) + end; + if (@state != 4) + end; + + set wolvern_count, wolvern_count + 1; if (wolvern_count >= @wolvern_amount) message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + + if ($@Ambush10_Spawn == 0) + goto L_Abort; end; } @@ -623,7 +667,6 @@ OnAmbush: set $@Ambush11_Spawn, 4 + rand(3); message strcharinfo(0), "An ambush!"; areamonster "034-1.gat", 82, 65, 90, 72, "", 1090, $@Ambush11_Spawn, "#Ambush11::OnWolvernDeath"; - set $@Ambush11VictimID, 0; end; L_Abort: @@ -637,15 +680,20 @@ OnWolvernDeath: set @Q_Barbarians_MASK, NIBBLE_0_MASK; set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT); - if (@state == 4) - set wolvern_count, wolvern_count + 1; set $@Ambush11_Spawn, $@Ambush11_Spawn - 1; - if ($@Ambush11_Spawn == 0) - set $@Ambush11_Active, 0; + if ($@Ambush11VictimID != getcharid(3)) + end; + if (@state != 4) + end; + + set wolvern_count, wolvern_count + 1; if (wolvern_count >= @wolvern_amount) message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + + if ($@Ambush11_Spawn == 0) + goto L_Abort; end; } @@ -677,7 +725,6 @@ OnAmbush: set $@Ambush12_Spawn, 4 + rand(3); message strcharinfo(0), "An ambush!"; areamonster "034-1.gat", 98, 76, 104, 81, "", 1090, $@Ambush12_Spawn, "#Ambush12::OnWolvernDeath"; - set $@Ambush12VictimID, 0; end; L_Abort: @@ -691,15 +738,20 @@ OnWolvernDeath: set @Q_Barbarians_MASK, NIBBLE_0_MASK; set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT); - if (@state == 4) - set wolvern_count, wolvern_count + 1; set $@Ambush12_Spawn, $@Ambush12_Spawn - 1; - if ($@Ambush12_Spawn == 0) - set $@Ambush12_Active, 0; + if ($@Ambush12VictimID != getcharid(3)) + end; + if (@state != 4) + end; + + set wolvern_count, wolvern_count + 1; if (wolvern_count >= @wolvern_amount) message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + + if ($@Ambush12_Spawn == 0) + goto L_Abort; end; } @@ -731,7 +783,6 @@ OnAmbush: set $@Ambush13_Spawn, 4 + rand(3); message strcharinfo(0), "An ambush!"; areamonster "034-1.gat", 120, 86, 127, 90, "", 1090, $@Ambush13_Spawn, "#Ambush13::OnWolvernDeath"; - set $@Ambush13VictimID, 0; end; L_Abort: @@ -745,15 +796,20 @@ OnWolvernDeath: set @Q_Barbarians_MASK, NIBBLE_0_MASK; set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT); - if (@state == 4) - set wolvern_count, wolvern_count + 1; set $@Ambush13_Spawn, $@Ambush13_Spawn - 1; - if ($@Ambush13_Spawn == 0) - set $@Ambush13_Active, 0; + if ($@Ambush13VictimID != getcharid(3)) + end; + if (@state != 4) + end; + + set wolvern_count, wolvern_count + 1; if (wolvern_count >= @wolvern_amount) message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + + if ($@Ambush13_Spawn == 0) + goto L_Abort; end; } @@ -785,7 +841,6 @@ OnAmbush: set $@Ambush14_Spawn, 4 + rand(3); message strcharinfo(0), "An ambush!"; areamonster "034-1.gat", 114, 100, 120, 106, "", 1090, $@Ambush14_Spawn, "#Ambush14::OnWolvernDeath"; - set $@Ambush14VictimID, 0; end; L_Abort: @@ -799,14 +854,19 @@ OnWolvernDeath: set @Q_Barbarians_MASK, NIBBLE_0_MASK; set @Q_Barbarians_SHIFT, NIBBLE_0_SHIFT; set @state, ((QUEST_Barbarians & @Q_Barbarians_MASK) >> @Q_Barbarians_SHIFT); - if (@state == 4) - set wolvern_count, wolvern_count + 1; set $@Ambush14_Spawn, $@Ambush14_Spawn - 1; - if ($@Ambush14_Spawn == 0) - set $@Ambush14_Active, 0; + if ($@Ambush14VictimID != getcharid(3)) + end; + if (@state != 4) + end; + + set wolvern_count, wolvern_count + 1; if (wolvern_count >= @wolvern_amount) message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + + if ($@Ambush14_Spawn == 0) + goto L_Abort; end; } -- cgit v1.2.3-60-g2f50