From cef1801380fbe2eb3cdf1920d2e82cd950ad1149 Mon Sep 17 00:00:00 2001 From: Jessica Tölke Date: Fri, 2 Sep 2011 13:07:33 +0200 Subject: barbarians: some work on the wolvern quest removed the sweets part from birrod and added dialogue for the wolvern quest added start of wolvern ambushs on 034-1 --- world/map/npc/034-1/ambushs.txt | 95 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 world/map/npc/034-1/ambushs.txt (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 new file mode 100644 index 00000000..ff01993b --- /dev/null +++ b/world/map/npc/034-1/ambushs.txt @@ -0,0 +1,95 @@ +// This file belongs to the wolvern hunting quest given by 033-1/birrod.txt +// Author: Jenalya +// TODO: add more ambushs all over the map + +034-1.gat,118,59,0|script|#Ambush0Trigger|45,1,1,{ + 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) + end; + if (rand(50) > wolvern_count) // TODO: eventally use different argument for rand + end; + set $@Ambush0VictimID, getcharid(3); + if ($@Ambush0_Active != 0) + end; + set $@Ambush0_Active, 1; + donpcevent "#Ambush0::OnAmbush"; + end; +} + +034-1.gat,119,60,0|script|#Ambush0|45,{ +end; + +OnAmbush: + attachrid($@Ambush0VictimID); + set @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, "", 1089, $@Ambush0_Spawn, "#Ambush0::OnWolvernDeath"; + set $@Ambush0VictimID, 0; + end; + +OnWolvernDeath: + set @MobID, 1089; // TODO: adapt + + 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 (wolvern_count >= @wolvern_amount) + message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + end; +} + +034-1.gat,94,91,0|script|#Ambush1Trigger|45,1,1,{ + 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) + end; + if (rand(50) > wolvern_count) + end; + set $@Ambush1VictimID, getcharid(3); + if ($@Ambush1_Active != 0) + end; + set $@Ambush1_Active, 1; + donpcevent "#Ambush1::OnAmbush"; + end; +} + +034-1.gat,94,92,0|script|#Ambush1|45,{ +end; + +OnAmbush: + attachrid($@Ambush1VictimID); + set @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, "", 1089, $@Ambush1_Spawn, "#Ambush1::OnWolvernDeath"; + set $@Ambush1VictimID, 0; + end; + +OnWolvernDeath: + set @MobID, 1089; // TODO: adapt + + 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 (wolvern_count >= @wolvern_amount) + message strcharinfo(0), "You've hunted down a lot of Wolverns. Maybe you should talk to Birrod?"; + end; +} -- cgit v1.2.3-70-g09d2