summaryrefslogtreecommitdiff
path: root/npc/034-1/yetiSpawn.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/034-1/yetiSpawn.txt')
-rw-r--r--npc/034-1/yetiSpawn.txt58
1 files changed, 58 insertions, 0 deletions
diff --git a/npc/034-1/yetiSpawn.txt b/npc/034-1/yetiSpawn.txt
new file mode 100644
index 00000000..c8668101
--- /dev/null
+++ b/npc/034-1/yetiSpawn.txt
@@ -0,0 +1,58 @@
+
+034-1,79,98,0 script #Yerrnk_YetiTrigger NPC32767,1,3,{
+ @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
+ if (@state != 7)
+ end;
+
+ if ($@Yerrnk_Yeti_Active != 0)
+ end;
+ $@Yerrnk_Yetifighter_ID = getcharid(3);
+ $@Yerrnk_Yeti_Active = 1;
+ donpcevent "#Yerrnk_Yeti::OnYeti";
+ end;
+}
+
+034-1,78,98,0 script #Yerrnk_Yeti NPC32767,{
+end;
+
+OnYeti:
+ if (attachrid($@Yerrnk_Yetifighter_ID) == 0)
+ goto L_Abort;
+
+ message strcharinfo(0), "There is the Yeti!";
+ areamonster "034-1", 67, 93, 74, 102, "", 1072, 1, "#Yerrnk_Yeti::OnYetiDeath";
+ end;
+
+L_Abort:
+ $@Yerrnk_Yeti_Active = 0;
+ $@Yerrnk_Yetifighter_ID = 0;
+ end;
+
+OnYetiDeath:
+ @mobId = 1072;
+
+ @state = ((QUEST_Barbarians & $@Q_Barbarians_MASK) >> $@Q_Barbarians_SHIFT);
+ if (@state != 7)
+ goto L_NonQuestKill;
+ @state = 8;
+ callsub S_Update_Mask;
+ BOSS_POINTS = BOSS_POINTS + 40;
+ message strcharinfo(0), "You defeated the Yeti and gain 40 Boss Points giving you a total of " + BOSS_POINTS + ".";
+ goto L_End;
+
+L_End:
+ $@Yerrnk_Yeti_Active = 0;
+ $@Yerrnk_Yetifighter_ID = 0;
+ end;
+
+L_NonQuestKill:
+ message strcharinfo(0), "The dying Yeti takes you along to the other side.";
+ heal -Hp, 0;
+ goto L_End;
+
+S_Update_Mask:
+ set QUEST_Barbarians,
+ (QUEST_Barbarians & ~($@Q_Barbarians_MASK))
+ | (@state << $@Q_Barbarians_SHIFT);
+ return;
+}