summaryrefslogtreecommitdiff
path: root/world/map
diff options
context:
space:
mode:
authorJesusaves <jesusalva@themanaworld.org>2020-04-06 23:23:22 -0300
committerGitHub <noreply@github.com>2020-04-07 02:23:22 +0000
commit9ddcd23a2964afba0ec7e83d1ce458c77f4666bc (patch)
treef85ed24a326d0b08f33677e83a287af4c8b02d28 /world/map
parent8423eebd492280369d3e0dd7d0b94b06514ae589 (diff)
downloadserverdata-9ddcd23a2964afba0ec7e83d1ce458c77f4666bc.tar.gz
serverdata-9ddcd23a2964afba0ec7e83d1ce458c77f4666bc.tar.bz2
serverdata-9ddcd23a2964afba0ec7e83d1ce458c77f4666bc.tar.xz
serverdata-9ddcd23a2964afba0ec7e83d1ce458c77f4666bc.zip
Doomsday Framework (#551)
Contains code for Act 3 and Act 4. Also provides assets for Act 5, but they are not yet ready. Act 5 assets are provided for cases of extreme need only.
Diffstat (limited to 'world/map')
-rw-r--r--world/map/db/item_db_head.txt2
-rw-r--r--world/map/db/item_db_weapon.txt4
-rw-r--r--world/map/db/mob_db_over_100.txt14
-rw-r--r--world/map/db/mob_skill_db.txt8
-rw-r--r--world/map/npc/009-8/celestia.txt6
-rw-r--r--world/map/npc/functions/doomsday.txt706
-rw-r--r--world/map/npc/functions/mob_points.txt10
-rw-r--r--world/map/npc/magic/_import.txt1
-rw-r--r--world/map/npc/magic/event-summon-managuardian.txt58
9 files changed, 791 insertions, 18 deletions
diff --git a/world/map/db/item_db_head.txt b/world/map/db/item_db_head.txt
index 33b2d561..5700de2a 100644
--- a/world/map/db/item_db_head.txt
+++ b/world/map/db/item_db_head.txt
@@ -41,7 +41,7 @@
751, PinkieHat, 5, 5000, 1000, 5, 0, 1, 0, 1, 0, 2, 256, 0, 0, 0, {}, {}
752, FluffyHat, 5, 7000, 2000, 10, 0, 2, 0, -5, 0, 2, 256, 0, 0, 0, {}, {}
759, PaladinsHelmet, 5, 0, 0, 0, 0, 19, 0, 0, 0, 2, 256, 0, 0, 0, {}, {}
-760, OverlordsHelmet, 5, 0, 0, 0, 0, 20, 0, 0, 0, 2, 256, 0, 0, 0, {}, {}
+760, OverlordsHelmet, 5, 0, 0, 0, 0, 50, 0, 0, 0, 2, 256, 0, 0, 0, {}, {}
761, DesertHelmet, 5, 0, 0, 0, 0, 21, 0, 0, 0, 2, 256, 0, 0, 0, {}, {}
764, SailorHat, 5, 0, 0, 0, 0, 5, 0, 0, 0, 2, 256, 0, 0, 0, {}, {}
765, CaptainsHat, 5, 0, 0, 0, 0, 15, 0, 0, 0, 2, 256, 0, 0, 0, {}, {}
diff --git a/world/map/db/item_db_weapon.txt b/world/map/db/item_db_weapon.txt
index 61700b6a..6a0e5935 100644
--- a/world/map/db/item_db_weapon.txt
+++ b/world/map/db/item_db_weapon.txt
@@ -19,7 +19,7 @@
575, DesertBow, 4, 8000, 4000, 1200, 100, 0, 1, 0, 0, 2, 34, 1, 1, 11, {}, {callfunc "UnreleasedItem";set @LauncherType, AMMO_BOW; callfunc "CheckLauncher";}
576, Beheader, 4, 8000, 4000, 2000, 100, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {callfunc "UnreleasedItem";}
577, BoneDarts, 4, 8000, 4000, 300, 100, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {callfunc "UnreleasedItem"; }
-578, SandCutter, 4, 30000, 15000, 1500, 130, 0, 1, 0, 0, 2, 2, 1, 1, 10, {}, {bonus bDoubleAddRate, 5;}
+578, SandCutter, 4, 30000, 15000, 1500, 140, 0, 1, 0, 0, 2, 2, 1, 80, 10, {}, {bonus bDoubleAddRate, 5;}
579, RockKnife, 4, 15000, 7500, 500, 110, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {bonus bVit, 3;}
//ID, Name___________________, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript}
580, StaffOfLife, 4, 8000, 4000, 1500, 100, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {callfunc "UnreleasedItem";}
@@ -50,7 +50,7 @@
758, WoodenStaff, 4, 4000, 2000, 1000, 50, 0, 1, 10, 0, 2, 34, 1, 1, 10, {}, {set @bStat, Int;set @minbStatVal, 60;callfunc "RequireStat";}
//ID, Name___________________, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript}
1171, Wand, 4, 400, 200, 100, 1, 0, 1, 5, 0, 2, 2, 1, 1, 1, {}, {set @bStat, Int;set @minbStatVal, 5;callfunc "RequireStat";}
-762, TerraniteArrow, 10, 80, 20, 1, 50, 0, 0, 0, 0, 2, 32768, 0, 0, 0, {}, {bonus bCritical, 10;set @AmmoType, AMMO_BOW; callfunc "CheckAmmo";}
+762, TerraniteArrow, 10, 80, 20, 1, 50, 0, 0, 0, 0, 2, 32768, 0, 0, 0, {}, {bonus bCritical, 20;set @AmmoType, AMMO_BOW; callfunc "CheckAmmo";}
867, IceGladius, 4, 2000, 1000, 1000, 110, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {bonus bLuk, 1;}
878, BansheeBow, 4, 101000, 40000, 900, 140, 0, 6, 0, 0, 2, 34, 1, 90, 11, {}, {set @bStat, Dex;set @minbStatVal, 80;callfunc "RequireStat"; bonus2 bHPDrainRate, 100, -2; bonus bAspdRate, 20; bonus bMaxHP, -150; bonus bSpeedAddRate, 10; bonus bDefRate, -40; bonus bDef2Rate, -35;set @LauncherType, AMMO_BOW; callfunc "CheckLauncher";}
903, SlingShot, 4, 500, 50, 10, 5, 0, 3, 0, 0, 2, 34, 1, 1, 11, {}, {set @LauncherType, AMMO_SLING; callfunc "CheckLauncher";}
diff --git a/world/map/db/mob_db_over_100.txt b/world/map/db/mob_db_over_100.txt
index 6c10000a..47e98272 100644
--- a/world/map/db/mob_db_over_100.txt
+++ b/world/map/db/mob_db_over_100.txt
@@ -5,7 +5,7 @@
1013, EvilMushroom, EvilMushroom, 110, 650, 0, 0, 35, 1, 65, 80, 4, 6, 16, 12, 10, 10, 35, 10, 1, 1, 1, 3, 22, 137, 800, 1800, 672, 480, 535, 500, 540, 10, 534, 100, 566, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 60
1014, PinkFlower, PinkFlower, 115, 700, 0, 0, 40, 2, 70, 75, 0, 5, 16, 12, 20, 20, 20, 50, 2, 2, 1, 3, 22, 128, 800, 800, 672, 480, 535, 100, 540, 10, 1199, 100, 526, 400, 565, 1000, 565, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 50
1015, SantaSlime, SantaSlime, 120, 750, 0, 0, 58, 1, 75, 80, 2, 7, 1, 20, 1, 0, 30, 30, 1, 1, 1, 0, 21, 161, 1500, 1872, 672, 480, 512, 800, 513, 700, 514, 600, 519, 500, 527, 400, 538, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 10
-1022, JackO, JackO, 180, 10000, 0, 18130, 1241, 2, 100, 500, 40, 20, 105, 40, 85, 75, 105, 100, 1, 1, 1, 0, 20, 133, 250, 1500, 672, 480, 617, 300, 622, 400, 624, 400, 620, 400, 615, 300, 1203, 400, 1198, 10000, 616, 600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
+1022, JackO, JackO, 175, 10000, 0, 18130, 1241, 2, 100, 500, 40, 20, 105, 40, 85, 75, 105, 95, 1, 1, 1, 0, 20, 133, 250, 1500, 672, 480, 617, 300, 622, 400, 624, 400, 620, 400, 615, 300, 1203, 400, 1198, 10000, 616, 600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
1023, FireSkull, FireSkull, 170, 5000, 0, 0, 721, 2, 75, 175, 35, 15, 40, 30, 30, 30, 35, 70, 1, 1, 1, 3, 23, 175, 600, 1600, 672, 480, 631, 1000, 701, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
1024, PoisonSkull, PoisonSkull, 170, 5000, 0, 0, 721, 2, 75, 175, 35, 15, 40, 30, 30, 30, 35, 70, 1, 1, 1, 3, 25, 175, 600, 1600, 672, 480, 631, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 20
1026, MountainSnake, MountainSnake, 130, 900, 0, 0, 63, 1, 80, 125, 4, 6, 20, 40, 10, 10, 35, 45, 1, 1, 1, 0, 20, 133, 1000, 1500, 672, 480, 532, 20, 641, 350, 715, 400, 715, 400, 711, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 30
@@ -39,8 +39,12 @@
1134, SUSAN, SUSAN, 255, 696969, 0, 69000, 1400, 1, 0, 0, 69, 69, 69, 69, 69, 69, 69, 69, 1, 1, 1, 0, 29, 161, 1500, 1872, 672, 480, 838, 6000, 839, 6000, 840, 6000, 1229, 200, 1230, 500, 1231, 500, 1232, 500, 1281, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
1135, LovelyMaggot, LovelyMaggot, 1, 50, 0, 1, 1, 1, 69, 6969, 0, 5, 5, 5, 1, 0, 6, 5, 1, 1, 1, 3, 21, 133, 200, 1872, 672, 480, 505, 400, 501, 70, 518, 200, 533, 75, 502, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1136, LesserGhost, LesserGhost, 1, 1, 0, 1, 1, 0, 150, 300, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 1, 29, 131, 340, 1800, 672, 950, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 20
-1137, Tormenta, Tormenta, 200, 18000, 60, 500000, 5000, 5, 360, 374, 48, 90, 1, 32, 60, 255, 255, 255, 31, 30, 1, 0, 69, 181, 210, 1200, 672, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+1137, Tormenta, Tormenta, 200, 18000, 60, 500000, 5000, 5, 360, 374, 48, 90, 1, 32, 60, 255, 255, 255, 31, 30, 1, 0, 69, 181, 210, 1200, 672, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
//ID, Name, Jname, LV, HP, SP, EXP, JEXP, Range1, ATK1, ATK2, DEF, MDEF, STR, AGI, VIT, INT, DEX, LUK, Range2, Range3, Scale, Race, Element,Mode, Speed, Adelay, Amotion,Dmotion,Drop1id,Drop1per,Drop2id,Drop2%, Drop3id,Drop3%, Drop4id,Drop4%, Drop5id,Drop5%, Drop6id,Drop6%, Drop7id,Drop7%, Drop8id,Drop8%, Item1, Item2, MEXP, ExpPer, MVP1id, MVP1per,MVP2id, MVP2per,MVP3id, MVP3per,mutationcount,mutationstrength
-1138, ManaGuard, ManaGuardian, 180, 20000, 280, 21750, 5000, 2, 360, 374, 22, 70, 31, 22, 90, 127, 255, 95, 31, 30, 1, 0, 69, 181, 210, 1200, 672, 50, 759, 1, 5237, 20, 1253, 5, 720, 100, 825, 500, 868, 20, 1172, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-1139, Virus, Virus, 170, 5000, 0, 0, 721, 6, 45, 75, 37, 12, 30, 30, 20, 20, 25, 60, 1, 1, 1, 3, 25, 175, 600, 1872, 672, 480, 787, 500, 743, 1100, 5236, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 20
-
+1138, ManaGuard, ManaGuardian, 180, 20000, 280, 27000, 5000, 2, 280, 324, 22, 67, 31, 22, 90, 127, 255, 95, 31, 30, 1, 0, 69, 181, 210, 1200, 672, 50, 759, 1, 5237, 20, 1253, 5, 720, 100, 825, 500, 868, 20, 1172, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+1139, Virus, Virus, 170, 5000, 0, 0, 721, 6, 45, 75, 37, 12, 30, 30, 20, 20, 25, 60, 1, 1, 1, 3, 25, 175, 600, 1872, 672, 480, 787, 500, 743, 1100, 5236, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 20
+1140, Tengu, Tengu, 180, 24000, 280, 45000, 5000, 2, 180, 224, 67, 9, 31, 22, 90, 97, 255, 95, 31, 30, 1, 0, 69, 181, 310, 1200, 672, 50, 653, 1, 4024, 300, 862, 800, 4005, 25, 4029, 10, 5237, 20, 758, 3, 825, 6000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+1141, Sasquatch, Sasquatch, 180, 24000, 280, 45000, 5000, 1, 420, 444, 12, 27, 31, 22, 90, 97, 255, 95, 31, 30, 1, 0, 69, 181, 310, 1200, 672, 50, 650, 1, 763, 500, 862, 800, 640, 1000, 4029, 10, 5237, 20, 758, 3, 825, 6000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+1142, Kage, ZaxDeKagen, 180, 29999, 280, 999999, 99999, 9, 90, 124, 62, 62, 199, 2, 199, 197, 255, 95, 31, 30, 1, 0, 69, 181, 210, 672, 672, 50, 760, 10000, 666, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+1143, ManaSlayer, ManaSlayer, 180, 24000, 280, 42000, 5000, 2, 260, 274, 22, 67, 31, 22, 90, 127, 255, 95, 31, 30, 1, 0, 69, 181, 210, 1200, 672, 50, 759, 1, 828, 2400, 862, 800, 4007, 35, 4029, 10, 5237, 20, 758, 3, 825, 6000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+1144, Dragon, GreatDragon, 250, 29999, 280, 1, 1, 3, 60, 90, 40, 40, 199, 2, 199, 197, 255, 95, 31, 30, 1, 0, 69, 181, 210, 1200, 672, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
diff --git a/world/map/db/mob_skill_db.txt b/world/map/db/mob_skill_db.txt
index 0cd9107e..129c814d 100644
--- a/world/map/db/mob_skill_db.txt
+++ b/world/map/db/mob_skill_db.txt
@@ -88,3 +88,11 @@
1137,Tormenta@NPC_SUMMONSLAVE_demonicspiritX2,any,198,2,10000,10,15000,no,self,slavelt,7,1101,0,0,0,0,
1137,Tormenta@NPC_SUMMONSLAVE_demonicspiritX1,any,198,1,10000,10,32000,no,self,slavelt,64,1101,0,0,0,0,
1137,Tormenta@NPC_POISON,attack,178,10,300,0,500,yes,target,always,0,0,10,0,0,0,
+
+// Zax De'Kagen skills
+// I believe I'll make his fight script controlled. Or not.
+1142,Kage@NPC_SUMMONSLAVE_skelX2,any,198,2,10000,1000,30000,no,self,slavelt,12,1043,0,0,0,0,
+1142,Kage@NPC_SUMMONSLAVE_tenguX1,any,198,1,10000,1000,150000,no,self,slavelt,32,1140,0,0,0,0,
+1142,Kage@NPC_SUMMONSLAVE_sasquatchX1,any,198,1,10000,1000,150000,no,self,slavelt,32,1141,0,0,0,0,
+1142,Kage@NPC_SUMMONSLAVE_slayerX1,any,198,1,10000,1000,120000,no,self,slavelt,32,1143,0,0,0,0,
+
diff --git a/world/map/npc/009-8/celestia.txt b/world/map/npc/009-8/celestia.txt
index 67aa9366..4fbe6609 100644
--- a/world/map/npc/009-8/celestia.txt
+++ b/world/map/npc/009-8/celestia.txt
@@ -311,10 +311,10 @@ function|script|CelestiaState
}
009-8,40,125,0|script|Celestia Basement|32767,0,0
{
- if (countitem(647)||countitem(725)||countitem(1178)||countitem(5131)||countitem(5132)||countitem(5133)||countitem(5134)||countitem(5135)||countitem(5136)||countitem(5137)||countitem(5138)||countitem(5139)||countitem(5140)||(getgmlevel()>=20)||
+ if ($DOOMSDAY == 2||countitem(647)||countitem(725)||countitem(1178)||countitem(5131)||countitem(5132)||countitem(5133)||countitem(5134)||countitem(5135)||countitem(5136)||countitem(5137)||countitem(5138)||countitem(5139)||countitem(5140)||(getgmlevel()>=20)||
strcharinfo(1) == "Celestia's Tea Party")
warp "009-8", 82, 126;
- if (strcharinfo(1) != "Celestia's Tea Party")
+ if (strcharinfo(1) != "Celestia's Tea Party" && $DOOMSDAY != 2)
sendcollision "009-8", 1, 62, 105, 77, 123;
end;
@@ -325,7 +325,7 @@ OnPCLoginEvent:
}
009-8,68,123,0|script|Celestia Interceptor|32767,1,0
{
- if (strcharinfo(1) != "Celestia's Tea Party")
+ if (strcharinfo(1) != "Celestia's Tea Party" && $DOOMSDAY != 2)
goto L_Stomp;
mapmask 1 | 8;
end;
diff --git a/world/map/npc/functions/doomsday.txt b/world/map/npc/functions/doomsday.txt
index 24f648ac..794bcac2 100644
--- a/world/map/npc/functions/doomsday.txt
+++ b/world/map/npc/functions/doomsday.txt
@@ -18,31 +18,137 @@
function|script|DoomsdayDebug
{
mes "$DOOMSDAY: "+$DOOMSDAY; // Event Status
- mes "$DOOMSDAY_CNT: "+$DOOMSDAY_CNT; // Meaning Varies
+ mes "";
+ mes "Act 2:";
+ mes "Amount of slain Mana Guardians:";
+ mes "$DOOMSDAY_CNT: "+$DOOMSDAY_CNT;
+ mes "";
+ mes "Act 3:";
+ mes "Situation of the towns (0 - standing, n - fallen n times)";
+ mes "$DOOMSDAY_TOWN[0] (Tulim): "+$DOOMSDAY_TOWN[0];
+ mes "$DOOMSDAY_TOWN[1] (Hurns): "+$DOOMSDAY_TOWN[1];
+ mes "$DOOMSDAY_TOWN[2] (Nival): "+$DOOMSDAY_TOWN[2];
+ mes "$DOOMSDAY_SCORE: "+$DOOMSDAY_SCORE;
+ mes "";
+ mes "Can players summon Mana Guardians? "+if_then_else($DOOMSDAY_SUMMON, "Yes", "No");
+ mes "Is TMW under Jande's control? "+if_then_else($DOOMSDAY_TAKENOVER, "Yes", "No");
+ //($DOOMSDAY_SUMMON ? "Yes" : "No");
next;
// Only GM 80 and above can modify Doomsday
// ...Yes, G_ADMIN is 80 while G_SYSOP is 99.
if (GM < G_ADMIN) goto L_Close;
mes "Setting $DOOMSDAY event state";
+ mes "[DOOMSDAY][ACT][STATE]";
menu
- "[0] Tormenta's Seal",L_Seal,
- "[1] Jande's Army",L_Army,
+ "[0][1][0] Tormenta's Seal",L_Seal,
+ "[1][2][0] Jande's Army",L_Army,
+ "[1][2][1] Toggle Mana Guardian Skill",L_Summon,
+ "[1][2][2] Surrender TMW to Jande",L_Surrender,
+ "[1][3][0] The Great War - First Wave",L_War,
+ "[2][3][1] The Great War - Additional Wave",L_GreatWar,
+ "[2][4][1] Council - Tulimshar's Guild",L_TulimCouncil,
+ "[2][4][2] Council - Celestia's Residence",L_HurnsCouncil,
+ "[2][4][3] Council - Blue Sage's Residence",L_NivalCouncil,
+ "[3][5][0] Kage's Final Battle",L_Kage,
"[-] Close",L_Close;
L_Close:
return;
+// Act 1: Tormenta's Seal
L_Seal:
set $DOOMSDAY, 0;
donpcevent "Doomsday::OnJanitor";
gmlog strcharinfo(0) + " changed doomsday to Act 1: Tormenta's Seal.";
return;
+// Act 2: Jande's Army
L_Army:
set $DOOMSDAY, 1;
donpcevent "Doomsday::OnJanitor";
gmlog strcharinfo(0) + " changed doomsday to Act 2: Jande's Army.";
return;
+
+L_Summon:
+ set $DOOMSDAY_SUMMON, (!$DOOMSDAY_SUMMON);
+ gmlog strcharinfo(0) + " changed the availability of #jande spell.";
+ return;
+
+L_Surrender:
+ set $DOOMSDAY_TAKENOVER, 1;
+ donpcevent "Doomsday::OnDoomsday2Restart";
+ gmlog strcharinfo(0) + " surrendered The Mana World to Jande.";
+ return;
+
+
+// Act 3: The Great War
+L_War:
+ set $@DOOMSDAY_SKIP, 1; // Skip the next scheduled siege
+ donpcevent "Doomsday::OnDoomsday3First"; // Forces a doomsday to begin now
+ gmlog strcharinfo(0) + " changed doomsday to Act 3: The Great War.";
+ return;
+
+// Act 4: The Great War Council
+L_GreatWar:
+ disablenpc "Wizard#1";
+ disablenpc "Wizard#2";
+ disablenpc "Wizard#3";
+ disablenpc "Wizard#4";
+ disablenpc "Wizard#5";
+ disablenpc "Wizard#6";
+ disablenpc "Wizard#7";
+ disablenpc "Wizard#8";
+ disablenpc "Arch-Wizard#9";
+ set $DOOMSDAY, 2;
+ set $@DOOMSDAY_SKIP, 0;
+ donpcevent "Doomsday::OnJanitor";
+ gmlog strcharinfo(0) + " changed doomsday to Act 4: The Great War Council.";
+ return;
+
+L_CouncilRefusal:
+ mes "##1Cowardly refusing to meet in a town destroyed five times.";
+ next;
+ return;
+
+L_TulimCouncil:
+ if ($DOOMSDAY_TOWN[0] >= 5)
+ goto L_CouncilRefusal;
+
+ enablenpc "Arch-Wizard#_DT";
+ gmlog strcharinfo(0) + " called the Council to Tulimshar.";
+ return;
+
+L_HurnsCouncil:
+ if ($DOOMSDAY_TOWN[1] >= 5)
+ goto L_CouncilRefusal;
+
+ enablenpc "Arch-Wizard#_DH";
+ gmlog strcharinfo(0) + " called the Council to Hurnscald.";
+ return;
+
+L_NivalCouncil:
+ if ($DOOMSDAY_TOWN[2] >= 5)
+ goto L_CouncilRefusal;
+
+ enablenpc "Arch-Wizard#_DN";
+ gmlog strcharinfo(0) + " called the Council to Nivalis.";
+ return;
+
+// Act 5: The Doomsday
+L_Kage:
+ mes "//-- TODO --//";
+ enablenpc "Wizard#1";
+ enablenpc "Wizard#2";
+ enablenpc "Wizard#3";
+ enablenpc "Wizard#4";
+ enablenpc "Wizard#5";
+ enablenpc "Wizard#6";
+ enablenpc "Wizard#7";
+ enablenpc "Wizard#8";
+ enablenpc "Arch-Wizard#9";
+ donpcevent "Doomsday::OnJanitor"; // TODO
+ gmlog strcharinfo(0) + " changed doomsday to Act 5: The Doomsday.";
+ return;
}
// Doomsday script controller
@@ -52,18 +158,55 @@ L_Army:
// Destroy any artifact as doomsday mode changes
OnJanitor:
- // TODO: Kill monsters?
+ // TODO: Act 2: Kill monsters?
+ // Act 3: Clean eventually on-going Doomsday
+ set $@DOOMSDAY_SKIP, 0;
+ set $@DD_NUMWAVES, 0;
+ set $@DoomsdayLoc, 0;
+ set $@DoomsdayMc, 0;
+ set $@DD_LOC$, "";
+ // Act 4: Disable council puppets
+ disablenpc "Sagatha#_DT";
+ disablenpc "Elanore#_DT";
+ disablenpc "Nikolai#_DT";
+ disablenpc "Morgan#_DT";
+ disablenpc "Valia#_DT";
+ disablenpc "Waric#_DT";
+ disablenpc "Golbenez#_DT";
+ disablenpc "Sagatha#_DH";
+ disablenpc "Elanore#_DH";
+ disablenpc "Nikolai#_DH";
+ disablenpc "Morgan#_DH";
+ disablenpc "Valia#_DH";
+ disablenpc "Waric#_DH";
+ disablenpc "Golbenez#_DH";
+ disablenpc "Sagatha#_DN";
+ disablenpc "Elanore#_DN";
+ disablenpc "Nikolai#_DN";
+ disablenpc "Morgan#_DN";
+ disablenpc "Valia#_DN";
+ disablenpc "Waric#_DN";
+ disablenpc "Golbenez#_DN";
+ disablenpc "Arch-Wizard#_DT";
+ disablenpc "Arch-Wizard#_DH";
+ disablenpc "Arch-Wizard#_DN";
+ // TODO: Act 5: Not needed?
+ // Clear timers
setnpctimer 0;
stopnpctimer;
goto OnInit;
// Check for our current doomsday state
OnInit:
+ setarray $@doomsday_mobs, 1140, 1141, 1143, 1140, 1141, 1143, 1140, 1141, 1143;
if ($DOOMSDAY == 1)
goto L_Doomsday1;
+ if ($DOOMSDAY == 2)
+ goto L_Doomsday2;
// goto L_Check2;
end;
+////////////////////////////////////////////////////////////////////////////////
L_Doomsday1:
// 1138 - Mana Guardian
// Argaes Invasion (1)
@@ -113,11 +256,357 @@ L_Doomsday1Respawn:
// goto L_TimerCheck2;
goto L_TimerFinish;
+////////////////////////////////////////////////////////////////////////////////
+// Disable Tulimshar Magic Council
+L_Doomsday2:
+ addnpctimer 1000, "Doomsday::OnDoomsday2Restart";
+ end;
+
+OnDoomsday2Restart:
+ disablenpc "Wizard#1";
+ disablenpc "Wizard#2";
+ disablenpc "Wizard#3";
+ disablenpc "Wizard#4";
+ disablenpc "Wizard#5";
+ disablenpc "Wizard#6";
+ disablenpc "Wizard#7";
+ disablenpc "Wizard#8";
+ disablenpc "Arch-Wizard#9";
+
+ // TODO: Maybe the town was taken over?
+ if (!$DOOMSDAY_TAKENOVER)
+ end;
+
+ fakenpcname "Constable Bob", "Constable Bob#_D", 421;
+ fakenpcname "Inspector#Hurnscald", "Inspector#Hurnscald_D", 420;
+ //fakenpcname "Richard", "Guardian Richard#_D", 420;
+ fakenpcname "Selim", "Guardian Selim#_D", 420;
+ fakenpcname "General Store#hurnscald", "Guardian Store#hurns_D", 420;
+ fakenpcname "General Store#dimond", "Guardian Store#dimond_D", 420;
+ fakenpcname "Sabine", "Mana Tourist#_D", 420;
+ fakenpcname "Apprentice", "Apprentice#_D", 420;
+ fakenpcname "Entertainer", "Entertainer#_D", 420;
+ fakenpcname "Drinker#2", "Drinker#2_D", 420;
+ fakenpcname "Bartender#Duels", "Bartender#Duels_D", 420;
+ fakenpcname "Jerry", "Mana Singer#_D", 420;
+
+ fakenpcname "Constable Perry Graf", "Constable Perry#_D", 420; // Name too long
+ fakenpcname "Guard#school", "Guard#school_D", 420;
+ fakenpcname "Guard#castle", "Guard#castle_D", 420;
+ fakenpcname "Guard#east3", "Guard#east3_D", 420;
+ fakenpcname "Guard#govt_out", "Guard#govtout_D", 420;
+ fakenpcname "Guard#govt_in", "Guard#govtin_D", 420;
+ fakenpcname "Guard#port1", "Guard#port1_D", 420;
+ fakenpcname "Guard#port2", "Guard#port2_D", 420;
+ fakenpcname "Guard#east1", "Guard#east1_D", 420;
+
+ fakenpcname "Mede", "Mana Shopkeeper#_D", 420;
+ fakenpcname "Bracco", "Mana Shopkeeper#2_D", 420;
+ end;
+
+/////// Act 3 sieges
+// Variables:
+// $@DoomsdayLoc / 100 = Town Code (0: Tulim, 1: Hurns, 2: Nivalis)
+
+// Fake label for the first Zax's movement
+OnDoomsday3First:
+ set $@DoomsdayLoc, 1;
+ goto L_Doomsday3;
+
+// Setup a siege
+L_Doomsday3Init:
+ set $@DoomsdayLoc, rand(300) / 100;
+
+ // Announce based on location
+ if ($@DoomsdayLoc == 0)
+ announce "Jande: Zax De'Kagen's army is marching to ##BTULIMSHAR##b in 10 minutes! (Attack by south gate)", 0;
+ if ($@DoomsdayLoc == 1)
+ announce "Jande: Zax De'Kagen's army is marching to ##BHURNSCALD##b in 10 minutes! (Attack by the mines)", 0;
+ if ($@DoomsdayLoc == 2)
+ announce "Jande: Zax De'Kagen's army is marching to ##BNIVALIS##b in 10 minutes! (Attack by east entrance)", 0;
+ end;
+
+// This siege will be skipped
+L_Doomsday3Skip:
+ set $@DOOMSDAY_SKIP, 0;
+ end;
+
+// Operational label, handles sieges
+L_Doomsday3:
+ // At this point it is no longer possible to skip the event.
+ // Based on $@DoomsdayLoc go to a town-specific label
+ // One wave every 5 minutes, until 6 waves were called (~30 min)
+ // Then stop the timer, and check for survivor mobs 45 minutes after
+ // If survivors are found, the town will be overrun
+ set $@DD_NUMWAVES, 0;
+
+ // Set the map for other labels (could use an array but meh)
+ if ($@DoomsdayLoc == 0)
+ set $@DD_LOC$, "002-1";
+ if ($@DoomsdayLoc == 1)
+ set $@DD_LOC$, "018-1";
+ if ($@DoomsdayLoc == 2)
+ set $@DD_LOC$, "031-1";
+
+
+ // Make an extra announce for those whom missed
+ if ($@DoomsdayLoc == 0)
+ announce "Jande: Zax De'Kagen's army reached ##BTULIMSHAR##b! (Attack by south gate)", 0;
+ if ($@DoomsdayLoc == 1)
+ announce "Jande: Zax De'Kagen's army reached ##BHURNSCALD##b! (Attack by the mines)", 0;
+ if ($@DoomsdayLoc == 2)
+ announce "Jande: Zax De'Kagen's army reached ##BNIVALIS##b! (Attack by east entrance)", 0;
+
+ goto L_DDAdvanceWave;
+
+// Advance wave (max. 10->6 waves)
+L_DDAdvanceWave:
+ set $@DD_NUMWAVES, $@DD_NUMWAVES+1;
+ if ($@DD_NUMWAVES > 6)
+ end; // TODO: Maybe a final wave announcement?
+
+ // Spawns
+ if ($@DoomsdayLoc == 0)
+ goto L_DD3Tulim;
+ if ($@DoomsdayLoc == 1)
+ goto L_DD3Hurns;
+ if ($@DoomsdayLoc == 2)
+ goto L_DD3Nival;
+
+ // Fallback
+ debugmes "DOOMSDAY/ACT3: Unrecognized town: "+$@DoomsdayLoc;
+ goto L_DDAdvanceTimers;
+
+// Restart timers and advance wave
+L_DDAdvanceTimers:
+ initnpctimer;
+ if ($@DD_INT < $@DD_UNITS*2)
+ goto L_DDAdvanceTimers2;
+ goto L_DDAdvanceWavePost;
+
+// If we have more users than possible, waves come faster
+L_DDAdvanceTimers2:
+ setnpctimer (($@DD_UNITS*2-$@DD_INT)*500); // ±1 second per player
+ goto L_DDAdvanceWavePost;
+
+// Clear temporary variables and broadcast
+L_DDAdvanceWavePost:
+ set $@DD_IDX, 0;
+ set $@DD_INT, 0;
+ set $@DD_UNITS, 0;
+ // Tell users
+ mapannounce $@DD_LOC$, "Jande : Watch out, another wave! Only "+(6-$@DD_NUMWAVES)+" waves left!", 0;
+ end;
+
+
+
+
+// Tulimshar Siege points
+L_DD3Tulim:
+ set $@DD_INT, 0;
+ set $@DD_UNITS, getmapusers($@DD_LOC$);
+
+ // Compulsory spawns
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "002-1", 98, 75, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "002-1", 97, 86, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ // Non-compulsory spawns
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "002-1", 91, 99, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "002-1", 75, 104, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "002-1", 56, 81, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "002-1", 44, 63, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "002-1", 76, 76, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "002-1", 54, 96, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ // No extra spawns possible
+ goto L_DDAdvanceTimers;
+
+
+
+// Hurnscald Siege points
+L_DD3Hurns:
+ set $@DD_INT, 0;
+ set $@DD_UNITS, getmapusers($@DD_LOC$);
+
+ // Compulsory spawns
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "018-1", 138, 63, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "018-1", 136, 71, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ // Non-compulsory spawns
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "018-1", 133, 79, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "018-1", 111, 74, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "018-1", 94, 75, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "018-1", 79, 64, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "018-1", 67, 82, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "018-1", 88, 90, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ // No extra spawns possible
+ goto L_DDAdvanceTimers;
+
+
+
+// Nivalis Siege points
+L_DD3Nival:
+ set $@DD_INT, 0;
+ set $@DD_UNITS, getmapusers($@DD_LOC$);
+
+ // Compulsory spawns
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "031-1", 44, 55, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "031-1", 62, 49, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ // Non-compulsory spawns
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "031-1", 63, 61, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "031-1", 56, 83, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "031-1", 70, 41, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "031-1", 36, 37, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "031-1", 62, 26, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ if ($@DD_INT >= $@DD_UNITS*2) goto L_DDAdvanceTimers;
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ monster "031-1", 85, 30, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ set $@DD_INT, $@DD_INT+1;
+
+ // No extra spawns possible
+ goto L_DDAdvanceTimers;
+
+
+
+
+// Timer controls (5 minutes between waves);
+// It only fires after first wave
+L_TimerCheck2:
+ if ($@DD_NUMWAVES > 0)
+ goto L_DDAdvanceWave;
+ end;
+
+// Siege one hour condition fully elapsed
+L_Doomsday3Check:
+ set $@DoomsdayMc, mobcount($@DD_LOC$, "Doomsday::OnDeathAct3")+1;
+ if ($@DoomsdayMc > 0)
+ goto L_Doomsday3Defeat;
+ goto L_Doomsday3Victory;
+
+// Town was defeated
+L_Doomsday3Defeat:
+ // Warn players that town is in danger
+ mapannounce $@DD_LOC$, "Jande : Oh noes, "+$@DoomsdayMc+" monsters passed the barricate!!", 0;
+
+ // Move the monsters to town
+ setarray $@DD_IDX, rand(getarraysize($@doomsday_mobs));
+ if ($@DoomsdayLoc == 0)
+ areamonster "001-1", 52, 35, 119, 113, "", $@doomsday_mobs[$@DD_IDX], $@DoomsdayMc;
+ if ($@DoomsdayLoc == 1)
+ areamonster "009-1", 25, 25, 96, 53, "", $@doomsday_mobs[$@DD_IDX], $@DoomsdayMc;
+ if ($@DoomsdayLoc == 2)
+ areamonster "020-1", 24, 32, 99, 96, "", $@doomsday_mobs[$@DD_IDX], $@DoomsdayMc;
+
+ // Update defeat counter and advance
+ set $DOOMSDAY_TOWN[$@DoomsdayLoc], $DOOMSDAY_TOWN[$@DoomsdayLoc]+1;
+ set $@DD_IDX, 0;
+ goto L_Doomsday3Cleanup;
+
+// Siege was cleared up
+L_Doomsday3Victory:
+ mapannounce $@DD_LOC$, "Jande : That was a close call, but we did it! We defended "+$DOOMSDAY_SCORE+" times.", 0;
+ set $DOOMSDAY_SCORE, $DOOMSDAY_SCORE+1;
+ goto L_Doomsday3Cleanup;
+
+// Clean up temporary variables (except skip)
+L_Doomsday3Cleanup:
+ killmonster $@DD_LOC$, "Doomsday::OnDeathAct3";
+ set $@DD_NUMWAVES, 0;
+ set $@DoomsdayLoc, 0;
+ set $@DoomsdayMc, 0;
+ set $@DD_LOC$, "";
+ end;
+
+////////////////////////////////////////////////////////////////////////////////
// Respawn logic (5 minutes)
OnTimer300000:
if ($DOOMSDAY == 1)
goto L_Doomsday1Respawn;
- // goto L_TimerCheck2;
+ if ($DOOMSDAY == 2)
+ goto L_TimerCheck2;
goto L_TimerFinish;
// Once all timer checks are over
@@ -127,6 +616,28 @@ L_TimerFinish:
stopnpctimer;
end;
+// Act 3 clock handlers
+OnClock1750:
+ if ($@DOOMSDAY_SKIP)
+ goto L_Doomsday3Skip;
+ if ($DOOMSDAY == 2)
+ goto L_Doomsday3Init;
+ end;
+
+OnClock1800:
+ if ($@DOOMSDAY_SKIP)
+ goto L_Doomsday3Skip;
+ if ($DOOMSDAY == 2)
+ goto L_Doomsday3;
+ end;
+
+// 19h -> 18h45
+OnClock1845:
+ if ($DOOMSDAY == 2)
+ goto L_Doomsday3Check;
+ end;
+
+////////////////////////////////////////////////////////////////////////////////
// Puppet labels
OnDeathMapname:
if ($DOOMSDAY == 1)
@@ -134,7 +645,192 @@ OnDeathMapname:
startnpctimer;
end;
+OnDeathAct3:
+ end;
+
+}
+
+// Control puppets for Doomsday Council Meetings
+-|script|Doomsday Council|32767
+{
+ if (GM >= G_DEV)
+ mes "["+strnpcinfo(0)+"]";
+ mes "You probably should try talking to them normally.";
+ if (GM >= G_DEV)
+ mes "##9 Use: @npctalk \""+strnpcinfo(0)+"\" \"your message goes here\"##0";
+ close;
+
+OnInit:
+ // Tulimshar room (Doomsday Tulim: _DT)
+ if (puppet("001-2", 99, 22, "Sagatha#_DT", 167) < 1) mapexit;
+ if (puppet("001-2", 92, 24, "Elanore#_DT", 108) < 1) mapexit;
+ if (puppet("001-2", 92, 30, "Nikolai#_DT", 362) < 1) mapexit;
+ if (puppet("001-2", 99, 32, "Morgan#_DT", 355) < 1) mapexit;
+ if (puppet("001-2", 110, 22, "Valia#_DT", 370) < 1) mapexit;
+ if (puppet("001-2", 117, 24, "Waric#_DT", 153) < 1) mapexit;
+ if (puppet("001-2", 117, 30, "Golbenez#_DT", 307) < 1) mapexit;
+
+ // Hurnscald room (Doomsday Hurns: _DH)
+ if (puppet("069-2", 101, 85, "Sagatha#_DH", 167) < 1) mapexit;
+ if (puppet("069-2", 94, 87, "Elanore#_DH", 108) < 1) mapexit;
+ if (puppet("069-2", 94, 93, "Nikolai#_DH", 362) < 1) mapexit;
+ if (puppet("069-2", 101, 95, "Morgan#_DH", 355) < 1) mapexit;
+ if (puppet("069-2", 112, 85, "Valia#_DH", 370) < 1) mapexit;
+ if (puppet("069-2", 119, 87, "Waric#_DH", 153) < 1) mapexit;
+ if (puppet("069-2", 119, 93, "Golbenez#_DH", 307) < 1) mapexit;
+
+ // Nivalis room (Doomsday Nivalis: _DN)
+ if (puppet("048-2", 113, 86, "Sagatha#_DN", 167) < 1) mapexit;
+ if (puppet("048-2", 112, 87, "Elanore#_DN", 108) < 1) mapexit;
+ if (puppet("048-2", 114, 87, "Nikolai#_DN", 362) < 1) mapexit;
+ if (puppet("048-2", 113, 88, "Morgan#_DN", 355) < 1) mapexit;
+ if (puppet("048-2", 118, 85, "Valia#_DN", 370) < 1) mapexit;
+ if (puppet("048-2", 117, 86, "Waric#_DN", 153) < 1) mapexit;
+ if (puppet("048-2", 119, 86, "Golbenez#_DN", 307) < 1) mapexit;
+
+ // Disable puppets
+ disablenpc "Sagatha#_DT";
+ disablenpc "Elanore#_DT";
+ disablenpc "Nikolai#_DT";
+ disablenpc "Morgan#_DT";
+ disablenpc "Valia#_DT";
+ disablenpc "Waric#_DT";
+ disablenpc "Golbenez#_DT";
+
+ disablenpc "Sagatha#_DH";
+ disablenpc "Elanore#_DH";
+ disablenpc "Nikolai#_DH";
+ disablenpc "Morgan#_DH";
+ disablenpc "Valia#_DH";
+ disablenpc "Waric#_DH";
+ disablenpc "Golbenez#_DH";
+
+ disablenpc "Sagatha#_DN";
+ disablenpc "Elanore#_DN";
+ disablenpc "Nikolai#_DN";
+ disablenpc "Morgan#_DN";
+ disablenpc "Valia#_DN";
+ disablenpc "Waric#_DN";
+ disablenpc "Golbenez#_DN";
+ end;
}
+// 114,80
+-|script|Doomsday Council Master|32767
+{
+ mes "The wizard seems to ignore you.";
+ if (GM < G_DEV)
+ close;
+ goto L_Main;
+
+L_Main:
+ explode @n$, strnpcinfo(0), "#";
+ // @n$[1] = _DT/_DH/_DN for dismissal
+ mes "";
+ menu
+ "[GM 40] Enable Sagatha", L_Sagatha,
+ "[GM 40] Enable Elanore", L_Elanore,
+ "[GM 40] Enable Nikolai", L_Nikolai,
+ "[GM 40] Enable Morgan", L_Morgan,
+ "[GM 40] Enable Valia", L_Valia,
+ "[GM 40] Enable Waric", L_Waric,
+ "[GM 40] Enable Golbenez", L_Golbenez,
+ "[GM 40] Disable Sagatha", L_NoSagatha,
+ "[GM 40] Disable Elanore", L_NoElanore,
+ "[GM 40] Disable Nikolai", L_NoNikolai,
+ "[GM 40] Disable Morgan", L_NoMorgan,
+ "[GM 40] Disable Valia", L_NoValia,
+ "[GM 40] Disable Waric", L_NoWaric,
+ "[GM 40] Disable Golbenez", L_NoGolbenez,
+ "[GM 60] Cancel Next Siege", L_SkipSiege,
+ "[GM 80] Dismiss the council", L_Dismiss;
+
+L_Sagatha:
+ enablenpc "Sagatha#"+@n$[1];
+ goto L_Main;
+L_NoSagatha:
+ disablenpc "Sagatha#"+@n$[1];
+ goto L_Main;
+
+L_Elanore:
+ enablenpc "Elanore#"+@n$[1];
+ goto L_Main;
+L_NoElanore:
+ disablenpc "Elanore#"+@n$[1];
+ goto L_Main;
+
+L_Nikolai:
+ enablenpc "Nikolai#"+@n$[1];
+ goto L_Main;
+L_NoNikolai:
+ disablenpc "Nikolai#"+@n$[1];
+ goto L_Main;
+
+L_Morgan:
+ enablenpc "Morgan#"+@n$[1];
+ goto L_Main;
+L_NoMorgan:
+ disablenpc "Morgan#"+@n$[1];
+ goto L_Main;
+
+L_Valia:
+ enablenpc "Valia#"+@n$[1];
+ goto L_Main;
+L_NoValia:
+ disablenpc "Valia#"+@n$[1];
+ goto L_Main;
+
+L_Waric:
+ enablenpc "Waric#"+@n$[1];
+ goto L_Main;
+L_NoWaric:
+ disablenpc "Waric#"+@n$[1];
+ goto L_Main;
+
+L_Golbenez:
+ enablenpc "Golbenez#"+@n$[1];
+ goto L_Main;
+L_NoGolbenez:
+ disablenpc "Golbenez#"+@n$[1];
+ goto L_Main;
+
+L_Dismiss:
+ if (GM < G_ADMIN)
+ mes "Your GM level does not authorizes you to perform this operation.";
+ if (GM < G_ADMIN)
+ close;
+ disablenpc "Sagatha#"+@n$[1];
+ disablenpc "Elanore#"+@n$[1];
+ disablenpc "Nikolai#"+@n$[1];
+ disablenpc "Morgan#"+@n$[1];
+ disablenpc "Valia#"+@n$[1];
+ disablenpc "Waric#"+@n$[1];
+ disablenpc "Golbenez#"+@n$[1];
+ disablenpc "Arch-Wizard#"+@n$[1];
+ gmlog strcharinfo(0) + " dismissed the Council.";
+ close;
+
+L_SkipSiege:
+ if (GM < G_GM)
+ mes "Your GM level does not authorizes you to perform this operation.";
+ if (GM < G_GM)
+ close;
+ set $@DOOMSDAY_SKIP, 1;
+ announce "Jande: I do not believe the enemy army will move this time. We should be safe for now.", 0;
+ gmlog strcharinfo(0) + " cancelled the scheduled doomsday attack.";
+ close;
+
+OnInit:
+ // Tulimshar room (Doomsday Tulim: _DT)
+ if (puppet("001-2", 104, 27, "Arch-Wizard#_DT", 354) < 1) mapexit;
+ if (puppet("069-2", 106, 90, "Arch-Wizard#_DH", 354) < 1) mapexit;
+ if (puppet("048-2", 114, 80, "Arch-Wizard#_DN", 354) < 1) mapexit;
+
+ // Disable puppets
+ disablenpc "Arch-Wizard#_DT";
+ disablenpc "Arch-Wizard#_DH";
+ disablenpc "Arch-Wizard#_DN";
+ end;
+}
diff --git a/world/map/npc/functions/mob_points.txt b/world/map/npc/functions/mob_points.txt
index 995b9a90..28058d07 100644
--- a/world/map/npc/functions/mob_points.txt
+++ b/world/map/npc/functions/mob_points.txt
@@ -145,7 +145,13 @@ function|script|MobPoints
80, // 1135 LovelyMaggot
10, // 1136 LesserGhost
500, // 1137 Tormenta
- 200 // 1138 ManaGuardian
+ 200, // 1138 ManaGuardian
+ 10, // 1139 Virus
+ 200, // 1140 Tengu
+ 200, // 1141 Sasquatch
+ 999, // 1142 ZaxDeKagen
+ 200, // 1143 ManaSlayer
+ 200 // 1144 GreatDragon
;
if ((MPQUEST == 1) && (@mobID < 1129))
@@ -161,7 +167,7 @@ L_Table1:
goto L_PostLoop;
L_Table2:
- set Mobpt, Mobpt + @points_extended[@mobID - 1130];
+ set Mobpt, Mobpt + @points_extended[@mobID - 1129];
goto L_PostLoop;
L_PostLoop:
diff --git a/world/map/npc/magic/_import.txt b/world/map/npc/magic/_import.txt
index e5d40947..5c82ebac 100644
--- a/world/map/npc/magic/_import.txt
+++ b/world/map/npc/magic/_import.txt
@@ -42,3 +42,4 @@ npc: npc/magic/level2-make-short-tanktop.txt
npc: npc/magic/level2-make-tanktop.txt
npc: npc/magic/level2-make-shirt.txt
npc: npc/magic/level3-necromancy.txt
+npc: npc/magic/event-summon-managuardian.txt
diff --git a/world/map/npc/magic/event-summon-managuardian.txt b/world/map/npc/magic/event-summon-managuardian.txt
new file mode 100644
index 00000000..ef1b1f88
--- /dev/null
+++ b/world/map/npc/magic/event-summon-managuardian.txt
@@ -0,0 +1,58 @@
+-|script|summon-jande|32767
+{
+ end;
+
+OnCast:
+ if(call("magic_checks")) end;
+ if (Sp < 100) end;
+ if (getskilllv(SKILL_MAGIC) < .level) end;
+ if (countitem("TinyManaElixir") < 1) end;
+ if (!$DOOMSDAY_SUMMON) end;
+ if (@ddcooldown > gettimetick(2)) goto L_Cooldown;
+ delitem "TinyManaElixir", 1;
+ set @_M_BLOCK, 1; // block casting, until the timer clears it
+ addtimer 60000, "Magic Timer::OnClear"; // set the new debuff
+ callfunc "adjust_spellpower";
+ set Sp, Sp - 100;
+ misceffect FX_MAGIC_MAGGOT_CAST, strcharinfo(0);
+ callfunc "magic_exp";
+ set .@puppet$, "#"+strnpcinfo(0)+"#"+BL_ID;
+ set .@puppet, puppet(getmap(), POS_X, POS_Y, .@puppet$, 127);
+ if (.@puppet < 1) end;
+ set .master, BL_ID, .@puppet;
+ set .lifetime, (@spellpower*9)+60000, .@puppet;
+ set @ddcooldown, gettimetick(2)+70; // This is measured in seconds
+ addnpctimer 10000, .@puppet$+"::OnSummon";
+ addnpctimer 11000, .@puppet$+"::OnDestroy";
+ end;
+
+OnSummon:
+ if (!(isloggedin(.master))) destroy;
+ if(get(Hp, .master) < 1) destroy; // destroy if master is missing
+ if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map
+ specialeffect FX_MAGIC_MAGGOT_SPAWN;
+ set .@x, getnpcx();
+ set .@y, getnpcy();
+ set .@map$, strnpcinfo(3);
+ callsub S_SummonAll;
+ end;
+
+OnDestroy:
+ destroy;
+
+S_SummonAll:
+ summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1138, 2, .lifetime;
+ destroy;
+
+L_Cooldown:
+ message strcharinfo(0), "This skill is in forced cooldown; Please wait your first summon to expire.";
+ end;
+
+OnInit:
+ set .school, SKILL_MAGIC_ASTRAL;
+ set .invocation$, chr(MAGIC_SYMBOL) + "jande"; // used in npcs that refer to this spell
+ void call("magic_register", "OnCast");
+ set .level, 1;
+ set .exp_gain, 1;
+ end;
+}