summaryrefslogtreecommitdiff
path: root/npc/018-6-3/main.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-09-01 15:14:24 -0300
committerJesusaves <cpntb1@ymail.com>2019-09-01 15:14:24 -0300
commit62e2f7afb625ee54512fab96e9523159b1696e59 (patch)
tree4733e206e4054f7c0ae7ecb30aece9e73a94b129 /npc/018-6-3/main.txt
parenta83780fc2b1beebe894cf4f5bcce6b35586aa94c (diff)
downloadserverdata-62e2f7afb625ee54512fab96e9523159b1696e59.tar.gz
serverdata-62e2f7afb625ee54512fab96e9523159b1696e59.tar.bz2
serverdata-62e2f7afb625ee54512fab96e9523159b1696e59.tar.xz
serverdata-62e2f7afb625ee54512fab96e9523159b1696e59.zip
Prepare the battle functions (not the internal warp system) from Forgotten Shrine
(missing file)
Diffstat (limited to 'npc/018-6-3/main.txt')
-rw-r--r--npc/018-6-3/main.txt81
1 files changed, 81 insertions, 0 deletions
diff --git a/npc/018-6-3/main.txt b/npc/018-6-3/main.txt
new file mode 100644
index 000000000..e0c8ffdc4
--- /dev/null
+++ b/npc/018-6-3/main.txt
@@ -0,0 +1,81 @@
+// TMW2 Scripts
+// Author:
+// Jesusalva
+// Description:
+// Controls Forgotten Shrine
+
+// 01863_RelevanceCheck ( Room ID )
+function script 01863_RelevanceCheck {
+ .@id=getarg(0);
+ .@q=getq(LoFQuest_Barbara);
+ .@q2=getq2(LoFQuest_Barbara);
+ .@q3=getq3(LoFQuest_Barbara);
+ if (.@q < 3)
+ Exception("INVALID QUEST STATE, REVCHECK", RB_DEFAULT|RB_ISFATAL);
+ if (.@q != 3)
+ return false;
+ if (.@q3 & .@id)
+ return false;
+ return true;
+}
+
+// Main Controller for Instanced maps
+018-6-3,0,0,0 script #01863_InstCtrl NPC_HIDDEN,{
+ end;
+
+// Map, x1, y1, x2, y2, mob, amount
+function AreaMonsterB {
+ .@m$=getarg(0);
+ .@x1=getarg(1);
+ .@x2=getarg(3);
+ .@y1=getarg(2);
+ .@y2=getarg(4);
+ .@mi=getarg(5);
+ .@am=getarg(6);
+ if (!.@am)
+ return;
+ areamonster(.@m$, .@x1, .@y1, .@x2, .@y2, strmobinfo(1, .@mi), .@mi, .@am);
+ //, instance_npcname(.name$)+"::OnKill"+.@mi);
+ return;
+}
+
+// Map, x1, y1, x2, y2, mob, amount, bossID
+function AreaMonsterBoss {
+ .@m$=getarg(0);
+ .@x1=getarg(1);
+ .@x2=getarg(3);
+ .@y1=getarg(2);
+ .@y2=getarg(4);
+ .@mi=getarg(5);
+ .@am=getarg(6);
+ .@id=getarg(7);
+ areamonster(.@m$, .@x1, .@y1, .@x2, .@y2, strmobinfo(1, .@mi), .@mi, .@am, instance_npcname(.name$)+"::OnKill"+.@id);
+ return;
+}
+
+OnRoomA:
+ // True: Must spawn boss, False: Allow to use warps
+ if (01863_RelevanceCheck(1)) {
+ mapannounce getmap(), l("BOSS FIGHT!"), bc_map|bc_pc;
+ AreaMonsterBoss(getmap(), 62, 41, 121, 58, any(HolyPixie, NulityPixie, VanityPixie, TerraniteProtector, GoboBear, Centaur), 1, 1); // Aggressive: 33%
+ // 6~12 support units
+ AreaMonsterB(getmap(), 62, 41, 121, 58, BlackSlime, rand2(3,5));
+ AreaMonsterB(getmap(), 62, 41, 121, 58, DarkLizard, rand2(2,3));
+ AreaMonsterB(getmap(), 62, 41, 121, 58, BlackScorpion, rand2(1,2));
+ // 620ms, AD18, tk710 hp 8.7
+ AreaMonsterB(getmap(), 62, 41, 121, 58, Archant, rand2(0,1));
+ // 200ms, AD21, tk630 hp 6.4
+ AreaMonsterB(getmap(), 62, 41, 121, 58, HoodedNinja, any(0,0,1));
+ }
+ end;
+
+// Kill boss will use setq3 and also erase any remaining monster
+OnKill1:
+ .@q3=getq3(LoFQuest_Barbara);
+ setq3 LoFQuest_Barbara, .@q3|1;
+ killmonsterall(getmap());
+ end;
+
+}
+
+