summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/099-2/logic.txt28
-rw-r--r--npc/099-5/boss.txt295
-rw-r--r--npc/functions/main.txt9
-rw-r--r--npc/functions/weather.txt1
4 files changed, 184 insertions, 149 deletions
diff --git a/npc/099-2/logic.txt b/npc/099-2/logic.txt
index 4154a9ac..7875df67 100644
--- a/npc/099-2/logic.txt
+++ b/npc/099-2/logic.txt
@@ -1,22 +1,10 @@
-
-- script #099-2_CMD NPC32767,{
- end;
-
-OnStorage:
- if ($DOOMSDAY != 3)
- end;
- if (getmapname() != "099-5" && getmapname() != "099-4" && getmapname() != "099-3")
- end;
- if ($@DD5_STATUS != 1 && $@DD5_STATUS != 2 && $@DD5_STATUS != 4 && $@DD5_STATUS != 6 && getmapname() != "099-3")
- end;
- openstorage;
- end;
-
-OnInit:
- // Register commands (FIXME: Move to map zone, add override?)
- //registercmd "#storage", strnpcinfo(0)+"::OnStorage";
- end;
-}
+// Evol script
+// Author:
+// Jesusalva
+// Description:
+// 099-2 and 099-6 KESHLAM ADVENTURER GUILD QUARTERS
+// Controls gimmicks in 099-3 as well
+/////////////////////////////////////////////////////////////////////////////////
099-2,0,0,0 script #099-2_Prestart NPC32767,{
end;
@@ -1022,7 +1010,7 @@ L_UseLens:
mes "Could it be that attack speed is overridden during the fight?!";
mes "";
mes "However, potions will still work, hmm.";
- mes "There is also a spell here: \"##B#storage##b\".";
+ mes "There is also a spell here: \"##B@storage##b\".";
mes "I assume it only works at specific times.";
close;
}
diff --git a/npc/099-5/boss.txt b/npc/099-5/boss.txt
index cb4d9dac..cb9f32d5 100644
--- a/npc/099-5/boss.txt
+++ b/npc/099-5/boss.txt
@@ -51,7 +51,7 @@
// 3 - Immune to potion'ed attackers (#D55E00 BROWN)
// 4 - Vulnerable only when wet (#56B4E9 CYAN)
// 5 - Vulnerable only to melee (#999999 GRAY)
-// 6 - Vulnerable to Bone Knife/Bone Arrow (#FFFFFF WHITE)
+// 6 - Vulnerable to Bone Knife/Bone Arrow (#FFFFFF W.@hitE)
// 7 - Regenerate from melee (#009E7E GREEN)
// 8 - Requires 10 GP per Damage (#F0E442 YELLOW)
// 9 - (#0072B2 BLUE)
@@ -70,35 +70,54 @@
// Tally will not be conducted on Vanilla mode.
///////////////////////////////////////////////////////////////////
// mapmask
-// 1 - Show tiles
-// 2 - Epilogue Mode
-// 4 - DEFCON 1 INVENCIBLE
-// 8 - DEFCON 2 DOUBLE DEFENSE
-// 16 - DEFCON 3 POTION IMMUNITY
-// 32 - DEFCON 4 WATER VULNERABLE
-// 64 - DEFCON 5 RANGED INVULNERABILITY
-// 128 - DEFCON 6 BONE VULNERABLE
-// 256 - DEFCON 7 MELEE REGEN
-// 512 - DEFCON 8 GP COST
-// 1024 - DEFCON
+// 1 - Show tiles
+// 128 - Epilogue Mode
+// 256 - DEFCON 1 INVENCIBLE
+// 512 - DEFCON 2 DOUBLE DEFENSE
+// 1024 - DEFCON 3 POTION IMMUNITY
+// 2048 - DEFCON 4 WATER VULNERABLE
+// 4096 - DEFCON 5 RANGED INVULNERABILITY
+// 8192 - DEFCON 6 BONE VULNERABLE
+// 16384 - DEFCON 7 MELEE REGEN
+// 32768 - DEFCON 8 GP COST
// NOTE: Personal score overflows at 214,000 points
-099-5 mapflag nosave 009-1,52,40
+099-5 mapflag nosave 099-4,50,49
//099-5 mapflag resave 009-1,52,40
099-4 mapflag nosave 009-1,52,40
//099-4 mapflag resave 009-1,52,40
-099-3 mapflag nosave 099-7,75,36
-//099-3 mapflag resave 099-7,75,36
-099-2 mapflag nosave 099-7,75,36
-//099-2 mapflag resave 099-7,75,36
-099-1 mapflag nosave 099-7,75,36
-//099-1 mapflag resave 099-7,75,36
+099-6 mapflag nosave 099-7,95,52
+//099-6 mapflag resave 099-7,95,52
+099-3 mapflag nosave 099-7,95,52
+//099-3 mapflag resave 099-7,95,52
+099-2 mapflag nosave 099-7,95,52
+//099-2 mapflag resave 099-7,95,52
+099-1 mapflag nosave 099-7,95,52
+//099-1 mapflag resave 099-7,95,52
+
+/* The Dooomsday Mapzone inheirs MMO and allows @storage */
+099-6 mapflag zone Doomsday
+099-5 mapflag zone Doomsday
+099-4 mapflag zone Doomsday
+099-3 mapflag zone Doomsday
+099-2 mapflag zone Doomsday
+099-1 mapflag zone Doomsday
099-5,0,0,0 script #TMWFinalExam NPC32767,{
// Main script
end;
+OnZax:
+ debugmes "OnZax";
+ callfunc "FinalExamAttack", "Zax";
+ end;
+
+OnXak:
+ debugmes "OnXak";
+ callfunc "FinalExamAttack", "Xak";
+ end;
+
OnAbort:
stopnpctimer;
$@DD5_STATUS = 0;
@@ -116,6 +135,8 @@ OnAbort:
$@DD5_ATK=false;
killmonster "099-5", "all";
killmonster "099-4", "all";
+ setmapmask "099-4", 1;
+ setmapmask "099-5", 1;
disablenpc "Gema III";
disablenpc "Flying Ship";
disablenpc "Jande#0";
@@ -138,7 +159,7 @@ OnMTChallenge:
end;
OnMTWarpTo0:
- message strcharinfo(0), "Your party was defeated.";
+ message strcharinfo(0), l("Your party was defeated.");
warp "009-1", 54, 40;
end;
@@ -150,7 +171,7 @@ OnMTReward50:
@dd5_share = 10000*@dd5_score/$@DD5_PTS;
if (!@dd5_share)
end;
- getexp @dd5_share*100, @dd5_share;
+ getexp @dd5_share*50, @dd5_share;
Zeny = Zeny + @dd5_share;
BOSS_POINTS = BOSS_POINTS + @dd5_share/200;
message strcharinfo(0), "Gained "+(@dd5_share/200)+" boss points!";
@@ -170,7 +191,7 @@ OnMTReward51:
@dd5_share = 10000*@dd5_score/$@DD5_PTS;
if (!@dd5_share)
end;
- getexp @dd5_share*200, @dd5_share*2;
+ getexp @dd5_share*100, @dd5_share*3/2;
Zeny = Zeny + (@dd5_share*2);
BOSS_POINTS = BOSS_POINTS + @dd5_share/100;
message strcharinfo(0), "Gained "+(@dd5_share/100)+" boss points!";
@@ -190,20 +211,20 @@ OnMTReward52:
@dd5_share = 10000*@dd5_score/$@DD5_PTS;
if (!@dd5_share)
end;
- getexp @dd5_share*500, @dd5_share*5;
+ getexp @dd5_share*250, @dd5_share*5/2;
Zeny = Zeny + (@dd5_share*5);
BOSS_POINTS = BOSS_POINTS + @dd5_share/50;
message strcharinfo(0), "Gained "+(@dd5_share/50)+" boss points!";
changemusic "099-5","ghoulish-fun.ogg";
- mapmask 1;
+ mapmask 1; // Reset map mask for you
// Dispose dead bodies (BUG, should not happen)
if (ispcdead())
goto OnMTDispose;
// Tally rewards
- // FIXME TODO Use a bitwise to save space, this is TMWA
- if (!#DD5_TALLY && !$DOOMSDAY_VANILLA)
+ // FIXME TODO Use a bitwise to save space? Or a quest state.
+ if (!#DD5_TALLY)
goto OnTally;
goto OnEpilogue1;
@@ -223,8 +244,8 @@ OnMTReward42:
warp "099-5", rand(53, 59), rand(37, 41);
// Tally rewards
- // FIXME TODO Use a bitwise to save space, this is TMWA
- if (!#DD5_TALLY && !$DOOMSDAY_VANILLA)
+ // FIXME TODO Use a bitwise to save space? See above
+ if (!#DD5_TALLY)
goto OnTally;
goto OnEpilogue1;
@@ -245,24 +266,28 @@ OnMTFourthFall:
OnFourthFall:
//debugmes "FOURTH FALL";
+ // NOTE: Fourth Fall DOES NOT affects the SCs given by Kirin
+ // aka. SC_INCMHPRATE and SC_INCMSPRATE
- // FIXME SC IDs changed
// High Damage
- if (sc_check(sc_raiseattackspeed0))
+ if (sc_check(SC_ATTHASTE_POTION1))
heal -300, -100;
- if (sc_check(sc_raiseattackstrength))
+ if (sc_check(SC_PLUSATTACKPOWER))
heal -300, -100;
// Medium Damage
- if (sc_check(SC_PHYS_SHIELD))
+ if (sc_check(SC_INCDEFRATE))
heal -250, -50;
- if (sc_check(SC_MBARRIER))
+ if (sc_check(SC_PHYSICAL_SHIELD))
+ heal -250, -50;
+
+ if (sc_check(SC_MDEFSET))
heal -250, -50;
// Low Damage
- if (sc_check(SC_FLYING_BACKPACK))
+ if (sc_check(SC_S_LIFEPOTION))
heal -125, -25;
if (sc_check(SC_SLOWPOISON))
@@ -278,29 +303,31 @@ OnMTBlissOblivion:
// Poison
sc_start SC_POISON, 1, 80;
// Adjust Map Mask
+ // WARNING: FIXME - Removes weather effects
if ($@DD5_DEFCON == 0)
- mapmask 1;
+ setmapmask "099-5", 1;
if ($@DD5_DEFCON == 1)
- mapmask 1 | 4;
+ setmapmask "099-5", 1 | 256;
if ($@DD5_DEFCON == 2)
- mapmask 1 | 8;
+ setmapmask "099-5", 1 | 512;
if ($@DD5_DEFCON == 3)
- mapmask 1 | 16;
+ setmapmask "099-5", 1 | 1024;
if ($@DD5_DEFCON == 4)
- mapmask 1 | 32;
+ setmapmask "099-5", 1 | 2048;
if ($@DD5_DEFCON == 5)
- mapmask 1 | 64;
+ setmapmask "099-5", 1 | 4096;
if ($@DD5_DEFCON == 6)
- mapmask 1 | 128;
+ setmapmask "099-5", 1 | 8192;
if ($@DD5_DEFCON == 7)
- mapmask 1 | 256;
+ setmapmask "099-5", 1 | 16384;
if ($@DD5_DEFCON == 8)
- mapmask 1 | 512;
+ setmapmask "099-5", 1 | 32768;
end;
OnBlissOblivion:
- killmonster "099-5", "All";
- killmonster "099-4", "All";
+ killmonster "099-5", "all";
+ killmonster "099-4", "all";
+ spawndummy("099-5", 50, 49, Kage, "Zax De'Kagen", "#TMWFinalExam::OnZax");
$@DD5_DEFCON = rand(0, 8);
// Keep a few tricks under the sleeve initially
if ($@DD5_HP > 100000 && $@DD5_DEFCON < 4)
@@ -332,7 +359,7 @@ OnWarn0:
$@DD5_STATUS = 1;
$@DD5_PTS = 0;
// FIXME DEBUG DEBUG DEBUG FIXME
- if (debug)
+ if (debug || $@GM_OVERRIDE)
addnpctimer 15000, "#TMWFinalExam::OnBegin";
else
addnpctimer 90000, "#TMWFinalExam::OnWarn1";
@@ -361,31 +388,32 @@ OnBegin:
OnPrologue1:
// set the sprite (implies enablenpc)
// FIXME - Can we still use mobid here? Also: fakenpcname() deprecated!
+ enablenpc "Zax De'Kagen#0";
mapannounce "099-5", "Zax De'Kagen : What is that, a bunch of Talpans in my domains?" , 0;
mapannounce "099-4", "Zax De'Kagen : What is that, a bunch of Talpans in my domains?" , 0;
- npctalk "Zax De'Kagen#0", "What is that, a bunch of Talpans in my domains?";
+ npctalk "What is that, a bunch of Talpans in my domains?", "Zax De'Kagen#0";
addnpctimer 5000, "#TMWFinalExam::OnPrologue2";
end;
OnPrologue2:
mapannounce "099-5", "Zax De'Kagen : Don't make me laugh. Do you really think you have what it takes to stop ME?!" , 0;
mapannounce "099-4", "Zax De'Kagen : Don't make me laugh. Do you really think you have what it takes to stop ME?!" , 0;
- npctalk "Zax De'Kagen#0", "Don't make me laugh. Do you really think you have what it takes to stop ME?!";
+ npctalk "Don't make me laugh. Do you really think you have what it takes to stop ME?!", "Zax De'Kagen#0";
addnpctimer 10000, "#TMWFinalExam::OnPrologue3";
end;
OnPrologue3:
mapannounce "099-5", "Zax De'Kagen : Hmpf! We will see about that. Therefore..." , 0;
mapannounce "099-4", "Zax De'Kagen : Hmpf! We will see about that. Therefore..." , 0;
- npctalk "Zax De'Kagen#0", "Hmpf! We will see about that. Therefore...";
+ npctalk "Hmpf! We will see about that. Therefore...", "Zax De'Kagen#0";
addnpctimer 5000, "#TMWFinalExam::OnPrologue4";
end;
OnPrologue4:
mapannounce "099-5", "Zax De'Kagen : Catch me if you can!" , 0;
mapannounce "099-4", "Zax De'Kagen : Catch me if you can!" , 0;
- npctalk "Zax De'Kagen#0", "Catch me if you can!";
- spawndummy("099-5", 50, 49, Kage, "Zax De'Kagen", strnpcinfo(0)+"::OnMain");
+ npctalk "Catch me if you can!", "Zax De'Kagen#0";
+ spawndummy("099-5", 50, 49, Kage, "Zax De'Kagen", "#TMWFinalExam::OnZax");
$@DD5_ATK=true;
$@DD5_STATUS = 3;
$@DD5_HP = 20000+(getmapusers("099-5")*100);
@@ -421,14 +449,14 @@ OnWarmedUp0:
stopnpctimer;
$@DD5_STATUS = 4;
$@DD5_HP = 0;
- killmonster "099-5", "All";
- killmonster "099-4", "All";
+ killmonster "099-5", "all";
+ killmonster "099-4", "all";
areatimer 0, "099-5", 20, 20, 75, 75, 10, "#TMWFinalExam::OnMTReward50";
areatimer 0, "099-4", 20, 20, 75, 75, 10, "#TMWFinalExam::OnMTReward40";
mapannounce "099-5", "Zax De'Kagen : Hahaha! Not bad, not bad at all!" , 0;
mapannounce "099-4", "Zax De'Kagen : Hahaha! Not bad, not bad at all!" , 0;
- npctalk "Zax De'Kagen#0", "Hahaha! Not bad, not bad at all!";
+ npctalk "Hahaha! Not bad, not bad at all!", "Zax De'Kagen#0";
addnpctimer 5000, "#TMWFinalExam::OnWarmedUp1";
donpcevent "Zax De'Kagen#0::OnDisable";
@@ -437,7 +465,7 @@ OnWarmedUp0:
OnWarmedUp1:
mapannounce "099-5", "Zax De'Kagen : However..." , 0;
mapannounce "099-4", "Zax De'Kagen : However..." , 0;
- npctalk "Zax De'Kagen#0", "However...";
+ npctalk "However...", "Zax De'Kagen#0";
addnpctimer 5000, "#TMWFinalExam::OnWarmedUp2";
end;
@@ -445,7 +473,7 @@ OnWarmedUp1:
OnWarmedUp2:
mapannounce "099-5", "Zax De'Kagen : This was only warm up!" , 0;
mapannounce "099-4", "Zax De'Kagen : This was only warm up!" , 0;
- npctalk "Zax De'Kagen#0", "This was only warm up!";
+ npctalk "This was only warm up!", "Zax De'Kagen#0";
addnpctimer 10000, "#TMWFinalExam::OnWarmedUp3";
end;
@@ -453,7 +481,7 @@ OnWarmedUp2:
OnWarmedUp3:
mapannounce "099-5", "Zax De'Kagen : Look and behold, the form I took on this rewrite..." , 0;
mapannounce "099-4", "Zax De'Kagen : Look and behold, the form I took on this rewrite..." , 0;
- npctalk "Zax De'Kagen#0", "Look and behold, the form I took on this rewrite...";
+ npctalk "Look and behold, the form I took on this rewrite...", "Zax De'Kagen#0";
addnpctimer 10000, "#TMWFinalExam::OnWarmedUp4";
end;
@@ -461,17 +489,19 @@ OnWarmedUp3:
OnWarmedUp4:
mapannounce "099-5", "Zax De'Kagen : The name which I am known is..." , 0;
mapannounce "099-4", "Zax De'Kagen : The name which I am known is..." , 0;
- npctalk "Zax De'Kagen#0", "The name which I am known is...";
+ npctalk "The name which I am known is...", "Zax De'Kagen#0";
addnpctimer 10000, "#TMWFinalExam::OnWarmedUp5";
end;
OnWarmedUp5:
disablenpc "Zax De'Kagen#0";
- fakenpcname "Xakelbael the Dark#0", "Xakelbael the Dark#0", 1161;
+ enablenpc "Xakelbael the Dark#0";
+ // FIXME
+ //fakenpcname "Xakelbael the Dark#0", "Xakelbael the Dark#0", 1161;
mapannounce "099-5", "Xakelbael the Dark : ...Xakelbael the Dark! PERISH!" , 0;
mapannounce "099-4", "Xakelbael the Dark : ...Xakelbael the Dark! PERISH!" , 0;
- npctalk "Xakelbael the Dark#0", "...Xakelbael the Dark! PERISH!";
+ npctalk "...Xakelbael the Dark! PERISH!", "Xakelbael the Dark#0";
addnpctimer 3000, "#TMWFinalExam::OnWarmedUp6";
end;
@@ -482,7 +512,8 @@ OnWarmedUp6:
$@DD5_PRIMARY = 1+getmapusers("099-5")*15/10;
$@DD5_SUPPORT = 1+getmapusers("099-4")*15/10;
$@DD5_TOTALPC = $@DD5_PRIMARY+$@DD5_SUPPORT;
- spawndummy("099-5", 50, 49, Kage, "Xakelbael the Dark", strnpcinfo(0)+"::OnMain");
+ spawndummy("099-5", 50, 49, Xakelbael, "Xakelbael the Dark", "#TMWFinalExam::OnXak");
+ disablenpc "Xakelbael the Dark#0";
$@DD5_ATK=true;
// Spawn second wave
areamonster "099-5", 20, 20, 75, 75, "", any($@DD5MB_AVERAGE), $@DD5_PRIMARY, "#TMWFinalExam::OnKillAverage";
@@ -498,8 +529,8 @@ OnShowdown0:
stopnpctimer;
$@DD5_STATUS = 6;
$@DD5_HP = 0;
- killmonster "099-5", "All";
- killmonster "099-4", "All";
+ killmonster "099-5", "all";
+ killmonster "099-4", "all";
areatimer 0, "099-5", 20, 20, 75, 75, 10, "#TMWFinalExam::OnMTReward51";
areatimer 0, "099-4", 20, 20, 75, 75, 10, "#TMWFinalExam::OnMTReward41";
disablenpc "Xakelbael the Dark#0";
@@ -507,7 +538,7 @@ OnShowdown0:
mapannounce "099-5", "Zax De'Kagen : Hah...! That was a good workout!" , 0;
mapannounce "099-4", "Zax De'Kagen : Hah...! That was a good workout!" , 0;
- npctalk "Zax De'Kagen#0", "Hah...! That was a good workout!";
+ npctalk2 "Zax De'Kagen#0", "Hah...! That was a good workout!";
addnpctimer 5000, "#TMWFinalExam::OnShowdown1";
donpcevent "Xakelbael the Dark#0::OnDisable";
@@ -516,7 +547,7 @@ OnShowdown0:
OnShowdown1:
mapannounce "099-5", "Zax De'Kagen : It was totally worth it! I was incredibly bored!" , 0;
mapannounce "099-4", "Zax De'Kagen : It was totally worth it! I was incredibly bored!" , 0;
- npctalk "Zax De'Kagen#0", "It was totally worth it! I was incredibly bored!";
+ npctalk2 "Zax De'Kagen#0", "It was totally worth it! I was incredibly bored!";
addnpctimer 5000, "#TMWFinalExam::OnShowdown2";
end;
@@ -527,7 +558,7 @@ OnShowdown2:
// FIXME: Use FuzzyTime()
mapannounce "099-5", "Zax De'Kagen : Well, we still have time! Only "+$@DD5_TSPENT$+" passed!" , 0;
mapannounce "099-4", "Zax De'Kagen : Well, we still have time! Only "+$@DD5_TSPENT$+" passed!" , 0;
- npctalk "Zax De'Kagen#0", "Well, we still have time! Only "+$@DD5_TSPENT$+" passed!";
+ npctalk2 "Zax De'Kagen#0", "Well, we still have time! Only "+$@DD5_TSPENT$+" passed!";
$@DD5_TPASSED = 0;
$@DD5_TSPENT$ = "";
@@ -537,7 +568,7 @@ OnShowdown2:
OnShowdown3:
mapannounce "099-5", "Zax De'Kagen : I will now acknowledge your strength and fight for realz." , 0;
mapannounce "099-4", "Zax De'Kagen : I will now acknowledge your strength and fight for realz." , 0;
- npctalk "Zax De'Kagen#0", "I will now acknowledge your strength and fight for realz.";
+ npctalk2 "Zax De'Kagen#0", "I will now acknowledge your strength and fight for realz.";
addnpctimer 10000, "#TMWFinalExam::OnShowdown4";
end;
@@ -545,7 +576,7 @@ OnShowdown3:
OnShowdown4:
mapannounce "099-5", "Zax De'Kagen : Don't blame me if you die!" , 0;
mapannounce "099-4", "Zax De'Kagen : Don't blame me if you die!" , 0;
- npctalk "Zax De'Kagen#0", "Don't blame me if you die!";
+ npctalk2 "Zax De'Kagen#0", "Don't blame me if you die!";
addnpctimer 10000, "#TMWFinalExam::OnShowdown5";
end;
@@ -553,7 +584,7 @@ OnShowdown4:
OnShowdown5:
mapannounce "099-5", "Zax De'Kagen : Do your best to entretain me!" , 0;
mapannounce "099-4", "Zax De'Kagen : Do your best to entretain me!" , 0;
- npctalk "Zax De'Kagen#0", "Do your best to entretain me!";
+ npctalk2 "Zax De'Kagen#0", "Do your best to entretain me!";
addnpctimer 3000, "#TMWFinalExam::OnShowdown6";
end;
@@ -565,7 +596,7 @@ OnShowdown6:
$@DD5_SUPPORT = 3+getmapusers("099-4")*15/10;
$@DD5_TOTALPC = $@DD5_PRIMARY+$@DD5_SUPPORT-2;
$@DD5_ATK=true;
- spawndummy("099-5", 50, 49, Kage, "Zax De'Kagen", strnpcinfo(0)+"::OnMain");
+ spawndummy("099-5", 50, 49, Kage, "Zax De'Kagen", "#TMWFinalExam::OnZax");
areamonster "099-5", 20, 20, 75, 75, "", any($@DD5MB_WEAK), $@DD5_PRIMARY, "#TMWFinalExam::OnKillWeak";
initnpctimer;
$@DD5_DEFCON = rand(4, 8);
@@ -577,8 +608,8 @@ OnEpilogue0:
stopnpctimer;
$@DD5_STATUS = 8;
$@DD5_HP = 0;
- killmonster "099-5", "All";
- killmonster "099-4", "All";
+ killmonster "099-5", "all";
+ killmonster "099-4", "all";
areatimer 0, "099-5", 20, 20, 75, 75, 10, "#TMWFinalExam::OnMTReward52";
areatimer 0, "099-4", 20, 20, 75, 75, 10, "#TMWFinalExam::OnMTReward42";
enablenpc "Flying Ship";
@@ -709,7 +740,7 @@ OnEpilogue1e:
OnEpilogue2:
mapannounce "099-5", "Zax De'Kagen : Now that I know where Nu'Rem is burried, nothing can stop me." , 0;
- npctalk "Zax De'Kagen#0", "Now that I know where Nu'Rem is burried, nothing can stop me.";
+ npctalk2 "Zax De'Kagen#0", "Now that I know where Nu'Rem is burried, nothing can stop me.";
// FIXME DEBUG DEBUG DEBUG FIXME
if (debug)
@@ -720,14 +751,14 @@ OnEpilogue2:
OnEpilogue3:
mapannounce "099-5", "Zax De'Kagen : Good bye, mortal adventurers." , 0;
- npctalk "Zax De'Kagen#0", "Good bye, mortal adventurers.";
+ npctalk2 "Zax De'Kagen#0", "Good bye, mortal adventurers.";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue4";
end;
OnEpilogue4:
mapannounce "099-5", "Zax De'Kagen : Heh, not like I wasn't one too, back then..." , 0;
- npctalk "Zax De'Kagen#0", "Heh, not like I wasn't one too, back then...";
+ npctalk2 "Zax De'Kagen#0", "Heh, not like I wasn't one too, back then...";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue5";
end;
@@ -744,7 +775,7 @@ OnEpilogue6:
enablenpc "Tal#0";
enablenpc "Anon";
mapannounce "099-5", "Jande : With Zax gone, I could finally arrive here." , 0;
- npctalk "Jande#0", "With Zax gone, I could finally arrive here.";
+ npctalk2 "Jande#0", "With Zax gone, I could finally arrive here.";
// FIXME DEBUG DEBUG DEBUG FIXME
if (debug)
@@ -755,49 +786,49 @@ OnEpilogue6:
OnEpilogue7:
mapannounce "099-5", "Tal : I believe some introductions are in order. I am Tal, the Great Dragon of Water." , 0;
- npctalk "Tal#0", "Tal : I believe some introductions are in order. I am Tal, the Great Dragon of Water.";
+ npctalk2 "Tal#0", "Tal : I believe some introductions are in order. I am Tal, the Great Dragon of Water.";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue8";
end;
OnEpilogue8:
mapannounce "099-5", "Tal : I also consider myself the creator of the Tritan race. Jande called me to help." , 0;
- npctalk "Tal#0", "Tal : I also consider myself the creator of the Tritan race. Jande called me to help.";
+ npctalk2 "Tal#0", "Tal : I also consider myself the creator of the Tritan race. Jande called me to help.";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue9";
end;
OnEpilogue9:
mapannounce "099-5", "Tal : While I do not like this idea myself, we have an enemy in common." , 0;
- npctalk "Tal#0", "Tal : While I do not like this idea myself, we have an enemy in common.";
+ npctalk2 "Tal#0", "Tal : While I do not like this idea myself, we have an enemy in common.";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue10";
end;
OnEpilogue10:
mapannounce "099-5", "Anon : We prepared another ship, Gema III. This ship will bring you to the damned island." , 0;
- npctalk "Anon", "We prepared another ship, Gema III. This ship will bring you to the damned island.";
+ npctalk2 "Anon", "We prepared another ship, Gema III. This ship will bring you to the damned island.";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue11";
end;
OnEpilogue11:
mapannounce "099-5", "Anon : Be careful, though. It is the final resting place of the Great Dragon of Air." , 0;
- npctalk "Anon", "Be careful, though. It is the final resting place of the Great Dragon of Air.";
+ npctalk2 "Anon", "Be careful, though. It is the final resting place of the Great Dragon of Air.";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue12";
end;
OnEpilogue12:
mapannounce "099-5", "Anon : There is no telling on the horrors you'll find there." , 0;
- npctalk "Anon", "There is no telling on the horrors you'll find there.";
+ npctalk2 "Anon", "There is no telling on the horrors you'll find there.";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue13";
end;
OnEpilogue13:
mapannounce "099-5", "Jande : A ship is not so fast as a flying one, but I am sure you can make in time." , 0;
- npctalk "Jande#0", "A ship is not so fast a flying one, but I am sure you can make in time.";
+ npctalk2 "Jande#0", "A ship is not so fast a flying one, but I am sure you can make in time.";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue14";
end;
OnEpilogue14:
mapannounce "099-5", "Jande : Whatever happens, DO NOT let Zax De'Kagen reach the great dragon body. Remember: Zax is wounded!" , 0;
- npctalk "Jande#0", "Whatever happens, DO NOT let Zax De'Kagen reach the great dragon body. Remember: Zax is wounded!";
+ npctalk2 "Jande#0", "Whatever happens, DO NOT let Zax De'Kagen reach the great dragon body. Remember: Zax is wounded!";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue15";
end;
@@ -814,44 +845,44 @@ OnEpilogue15:
OnEpilogue16:
- npctalk "Jande#0", "(*whisper* Tal, do you think they'll make it?)";
+ npctalk2 "Jande#0", "(*whisper* Tal, do you think they'll make it?)";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue17";
end;
OnEpilogue17:
- npctalk "Tal#0", "Tal : (*whisper* I would be surprised if they survived the trip alone.)";
+ npctalk2 "Tal#0", "Tal : (*whisper* I would be surprised if they survived the trip alone.)";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue18";
end;
OnEpilogue18:
- npctalk "Jande#0", "(*whisper* For now, let's hope for the best. I don't want another rewrite...)";
+ npctalk2 "Jande#0", "(*whisper* For now, let's hope for the best. I don't want another rewrite...)";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue19";
end;
OnEpilogue19:
- npctalk "Tal#0", "Tal : (*whisper* You worry too much. Di'Tal already put measures in place.)";
+ npctalk2 "Tal#0", "Tal : (*whisper* You worry too much. Di'Tal already put measures in place.)";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue20";
end;
OnEpilogue20:
- npctalk "Tal#0", "Tal : (*whisper* The same incident from years ago will not repeat itself.)";
+ npctalk2 "Tal#0", "Tal : (*whisper* The same incident from years ago will not repeat itself.)";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue21";
end;
OnEpilogue21:
- npctalk "Tal#0", "Tal : (*whisper* Besides, shall they fail - they won't remember any of this.)";
+ npctalk2 "Tal#0", "Tal : (*whisper* Besides, shall they fail - they won't remember any of this.)";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue22";
end;
OnEpilogue22:
- npctalk "Jande#0", "(*whisper* We will have a good room to maneuver undercover, then.)";
+ npctalk2 "Jande#0", "(*whisper* We will have a good room to maneuver undercover, then.)";
addnpctimer 15000, "#TMWFinalExam::OnEpilogue23";
end;
OnEpilogue23:
- npctalk "Anon", "What are you waiting for? You're running against the clock.";
+ npctalk2 "Anon", "What are you waiting for? You're running against the clock.";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue24";
end;
OnEpilogue24:
- npctalk "Anon", "You know Jande and Tal cannot get close to that... that thing.";
+ npctalk2 "Anon", "You know Jande and Tal cannot get close to that... that thing.";
addnpctimer 5000, "#TMWFinalExam::OnEpilogue25";
end;
OnEpilogue25:
- npctalk "Anon", "We will do what we can to support you from sidelines. Now go!";
+ npctalk2 "Anon", "We will do what we can to support you from sidelines. Now go!";
end;
S_DD5PrimarySpawn:
@@ -929,16 +960,19 @@ OnTimer120000:
end;
OnKillWeak:
+ if (!playerattached()) end;
@dd5_score = @dd5_score+1;
$@DD5_PTS = $@DD5_PTS+1;
end;
OnKillAverage:
+ if (!playerattached()) end;
@dd5_score = @dd5_score+10;
$@DD5_PTS = $@DD5_PTS+10;
end;
OnKillStrong:
+ if (!playerattached()) end;
@dd5_score = @dd5_score+25;
$@DD5_PTS = $@DD5_PTS+25;
end;
@@ -991,7 +1025,8 @@ function script DD5RainCheck {
}
function script DD5DEFCONCheck {
- // Shearing magic is active?
+ .@atkrange=readparam2(UDT_ATKRANGE);
+ // Shearing magic is active? FIXME
if (@chipchipspell[2] > 0)
goto L_Shear;
goto L_Loop;
@@ -1038,9 +1073,9 @@ L_DEFCON2:
goto L_Return;
L_DEFCON3:
- if (sc_check(sc_raiseattackspeed0))
+ if (sc_check(SC_ATTHASTE_POTION1))
@dd5_dmg = 0;
- if (sc_check(sc_raiseattackstrength))
+ if (sc_check(SC_PLUSATTACKPOWER))
@dd5_dmg = 0;
goto L_Return;
@@ -1049,7 +1084,7 @@ L_DEFCON4:
goto L_Return;
L_DEFCON5:
- if (ATTACKRANGE > 2)
+ if (.@atkrange > 2)
@dd5_dmg = 0;
goto L_Return;
@@ -1058,22 +1093,22 @@ L_DEFCON6:
if (@dd5_shear)
goto L_Return;
// Not using the allowed equips
- if (getequipid(equip_arrow) != 1282 && getequipid(equip_hand1) != 570)
+ if (!isequippedcnt(BoneArrows, BoneKnife, BoneDarts))
@dd5_dmg = 0;
// Lame check for bows because I'm lazy
- if (getequipid(equip_arrow) == 1282 && ATTACKRANGE < 4)
+ if (isequipped(BoneArrows) && .@atkrange < 4)
@dd5_dmg = 0;
goto L_Return;
L_DEFCON7:
- if (ATTACKRANGE < 3)
+ if (.@atkrange < 3)
@dd5_dmg = 0-(@dd5_dmg);
goto L_Return;
L_DEFCON8:
- if (Zeny < @dd5_dmg*10)
+ if (Zeny < @dd5_dmg*5)
@dd5_dmg = 0;
- Zeny = Zeny-(@dd5_dmg*10);
+ Zeny = Zeny-(@dd5_dmg*5);
goto L_Return;
L_Return:
@@ -1104,23 +1139,28 @@ function script FinalExamAttack {
if (gettimetick(0) < @dd5_timer)
goto L_Return;
+ // Set variables
+ .@atkrange=readparam2(UDT_ATKRANGE);
+ .@crit=readparam2(UDT_CRIT);
+ .@hit=readparam2(UDT_HIT);
+
// Verify range
- if (!(isin("099-5", 50-ATTACKRANGE, 49-ATTACKRANGE, 50+ATTACKRANGE, 49+ATTACKRANGE)))
+ if (!(isin("099-5", 50-.@atkrange, 49-.@atkrange, 50+.@atkrange, 49+.@atkrange)))
goto L_Return;
// Assign attack speed delay - 300ms with pots, 600ms without
- @dd5_timer = if_then_else(sc_check(sc_raiseattackspeed0), gettimetick(0)+300, gettimetick(0)+600);
+ @dd5_timer = if_then_else(sc_check(SC_ATTHASTE_POTION1), gettimetick(0)+300, gettimetick(0)+600);
- // Calculate HIT and CRIT rate
- @dd5_crit = (rand(10000) < CRIT);
- if (rand(400) > HIT && !@dd5_crit)
+ // Calculate .@hit and .@crit rate
+ @dd5_crit = (rand(10000) < .@crit);
+ if (.@hit < rand(350) && !@dd5_crit)
goto L_Miss;
// Calculate damage
- @dd5_dmg = ATK1+BASE_ATK;
+ @dd5_dmg = rand2(readparam2(UDT_ATKMIN), readparam2(UDT_ATKMAX)+1);
// Strength Potion - DMG +50%
- if (sc_check(sc_raiseattackstrength))
+ if (sc_check(SC_PLUSATTACKPOWER))
@dd5_dmg = @dd5_dmg*15/10;
// Boss defense
@@ -1176,19 +1216,22 @@ L_Miss:
L_Slain:
@dd5_score = @dd5_score+100;
$@DD5_PTS = $@DD5_PTS+100;
- BOSS_POINTS = BOSS_POINTS + 25;
+ BOSS_POINTS = BOSS_POINTS + ($@DD5_STATUS * 5);
if ($@DD5_STATUS == 3)
donpcevent "#TMWFinalExam::OnWarmedUp0";
if ($@DD5_STATUS == 5)
donpcevent "#TMWFinalExam::OnShowdown0";
if ($@DD5_STATUS == 7)
donpcevent "#TMWFinalExam::OnEpilogue0";
- message strcharinfo(0), "You gained 25 Boss Points!";
+ message strcharinfo(0), l("You gained %d Boss Points!", ($@DD5_STATUS * 5));
$@DD5_ATK=false;
return;
L_Return:
- spawndummy("099-5", 50, 49, Kage, strnpcinfo(2), strnpcinfo(0)+"::OnMain");
+ .@s$=getarg(0);
+ .@n$=(.@s$ == "Zax" ? "Zax De'Kagen" : "Xakelbael the Dark");
+ .@id=(.@s$ == "Zax" ? Kage : Xakelbael);
+ spawndummy("099-5", 50, 49, .@id, .@n$, "#TMWFinalExam::On"+.@s$);
return;
}
@@ -1229,25 +1272,27 @@ OnInit:
goto L_TooEarly;
if (@dd5_cutscene)
end;
- mes "##1Embark on Gema III in pursuit?##0";
- mes "You may be unable to return here!";
+ mesc l("Embark on Gema III in pursuit?");
+ mes l("You may be unable to return here!");
next;
menu
- "Yes",L_Yes,
- "No",L_No;
+ l("Yes"),L_Yes,
+ l("No"),L_No;
L_No:
+ closeclientdialog;
close;
L_Yes:
@dd5_cutscene = 1;
- // Stop rendering the map and Embark
- mapmask 1 | 2;
+ // Stop rendering the map and Embark - Player effect only
+ mapmask 1 | 128;
changemusic "099-5","epilogue.ogg";
if (debug)
addtimer 5000, "Gema III::OnDebugPrompt";
if (!debug)
addtimer 300, "Gema III::OnStart";
+ closeclientdialog;
close;
OnStart:
@@ -1415,8 +1460,6 @@ OnInit:
end;
}
099-5,50,49,0 script Xakelbael the Dark#0 NPC400,{
-OnMain:
- callfunc "FinalExamAttack";
end;
OnInit:
disablenpc "Xakelbael the Dark#0";
@@ -1441,8 +1484,6 @@ OnDisable:
}
099-5,50,49,0 script Zax De'Kagen#0 NPC400,{
-OnMain:
- callfunc "FinalExamAttack";
end;
OnInit:
disablenpc "Zax De'Kagen#0";
@@ -1451,18 +1492,16 @@ OnInit:
OnTimer18000:
if ($@DD5_STATUS != 3)
end;
- enablenpc strnpcinfo(0); // FIXME
$@DD5_ATK=true;
- killmonster("099-5", strnpcinfo(0)+"::OnMain");
- spawndummy("099-5", 50, 49, Kage, strnpcinfo(2), strnpcinfo(0)+"::OnMain");
+ killmonster("099-5", "#TMWFinalExam::OnZax");
+ spawndummy("099-5", 50, 49, Kage, strnpcinfo(1), "#TMWFinalExam::OnZax");
end;
OnTimer24000:
if ($@DD5_STATUS != 3)
end;
initnpctimer;
- disablenpc strnpcinfo(0); // FIXME
$@DD5_ATK=false;
- killmonster("099-5", strnpcinfo(0)+"::OnMain");
+ killmonster("099-5", "#TMWFinalExam::OnZax");
end;
OnTimer90000:
if ($@DD5_STATUS != 7)
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index f9ec439d..06b12a30 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -747,6 +747,11 @@ function script updateskill {
return;
}
+function script npctalk2 {
+ npctalk getarg(1), getarg(0);
+ return;
+}
+
function script learnskill {
if (getskilllv(getarg(0)) < getarg(1, 1))
skill getarg(0), getarg(1, 1), 0;
@@ -764,8 +769,10 @@ function script spawndummy {
// Create monster, with optional event
if (.@e$ == "")
.@u=monster(.@m$, .@x, .@y, .@n$, .@id, 1);
- else
+ else {
.@u=monster(.@m$, .@x, .@y, .@n$, .@id, 1, .@e$);
+ debugmes "SPAWNDUMMY %s", .@e$;
+ }
// Reset unit data for script use
setunitdata(.@u, UDT_LEVEL, 1);
setunitdata(.@u, UDT_HP, 1);
diff --git a/npc/functions/weather.txt b/npc/functions/weather.txt
index 75605749..dacbd984 100644
--- a/npc/functions/weather.txt
+++ b/npc/functions/weather.txt
@@ -59,6 +59,7 @@ OnInit:
htput(.wcore, "052-1", CLIMATE_MODERATE);
htput(.wcore, "055-1", CLIMATE_MODERATE);
htput(.wcore, "057-1", CLIMATE_MODERATE);
+ htput(.wcore, "099-5", CLIMATE_MODERATE); // Doomsday Boss Room
// Icelands
htput(.wcore, "019-1", CLIMATE_ICELAND);