summaryrefslogtreecommitdiff
path: root/npc/008-3-2/boss.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/008-3-2/boss.txt')
-rw-r--r--npc/008-3-2/boss.txt65
1 files changed, 65 insertions, 0 deletions
diff --git a/npc/008-3-2/boss.txt b/npc/008-3-2/boss.txt
new file mode 100644
index 00000000..5a296ce9
--- /dev/null
+++ b/npc/008-3-2/boss.txt
@@ -0,0 +1,65 @@
+// Evol Script
+// Author:
+// Jesusalva
+// Description:
+// Controls the boss on 008-3-2 and the Master Book Learning
+// see npc/items/master_skillbook.txt for explanation about variables
+
+008-3-2,0,0,0 script #BossCtrl_008-3-2 NPC_HIDDEN,{
+ end;
+
+// Test server: 15 minutes only
+OnTimer900000:
+ if (!debug)
+ end;
+
+// Otherwise, respawn every hour
+OnTimer3600000:
+ stopnpctimer;
+OnInit:
+ $@MB_00832=0;
+ monster "008-3-2", 67, 30, strmobinfo(1, SpiderQueen), SpiderQueen, 1, "#BossCtrl_008-3-2::OnBossDeath";
+ end;
+
+OnBossDeath:
+ initnpctimer;
+ // Only the party which defeated the boss can learn the skill
+ getmapxy(.@m$, .@x, .@y, 0);
+ .@party=getcharid(1);
+ if (.@party > 0)
+ {
+ $@MB_00832=.@party;
+ areatimer("008-3-2", .@x-15, .@y-15, .@x+15, .@y+15, 10, "#BossCtrl_008-3-2::OnBossCheck");
+ mapannounce "008-3-2", "Boss deafeated by Party: " + getpartyname(.@party), bc_all;
+ }
+ else
+ {
+ $@MB_00832=-2;
+ areatimer("008-3-2", .@x-15, .@y-15, .@x+15, .@y+15, 10, "#BossCtrl_008-3-2::OnBossCheck");
+ addtimer(20, "#BossCtrl_008-3-2::OnBegin");
+ mapannounce "008-3-2", "Boss deafeated by: " + strcharinfo(0), bc_all;
+ }
+ end;
+
+OnBossCheck:
+ @mb_BossId=-1;
+ // TODO: Check if you really fought or was just lurking
+ // Check if party is correct
+ if (getcharid(1) != $@MB_00832)
+ end;
+OnBegin:
+ @mb_BossId=SpiderQueen;
+ @mb_SkillId=TF_POISON;
+ @mb_ItemId=MagicFeather; // Placeholder
+ @mb_ItemAm=1;
+ addtimer(15000, "#BossCtrl_008-3-2::OnFinish");
+ end;
+
+OnFinish:
+ @mb_BossId=0;
+ @mb_SkillId=0;
+ @mb_ItemId=0;
+ @mb_ItemAm=0;
+ end;
+
+}