summaryrefslogtreecommitdiff
path: root/world/map/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-19 21:50:12 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-19 21:51:17 -0300
commit35ad4b573976f1357a9ff7722070763cedf5977f (patch)
treeac47b2923fcea90d76748d98b046277f1a9c11f9 /world/map/npc
parent46c23bf5824563fa20694b331d8dc08ae9ac130b (diff)
downloadserverdata-35ad4b573976f1357a9ff7722070763cedf5977f.tar.gz
serverdata-35ad4b573976f1357a9ff7722070763cedf5977f.tar.bz2
serverdata-35ad4b573976f1357a9ff7722070763cedf5977f.tar.xz
serverdata-35ad4b573976f1357a9ff7722070763cedf5977f.zip
Spell #manatez (summons Mana Tyrant); Soul Menhir; submodule update.v2020.05.09.3
Diffstat (limited to 'world/map/npc')
-rw-r--r--world/map/npc/functions/doomsday.txt28
-rw-r--r--world/map/npc/magic/_import.txt1
-rw-r--r--world/map/npc/magic/event-summon-managuardian.txt2
-rw-r--r--world/map/npc/magic/event-summon-manatyrant.txt61
4 files changed, 89 insertions, 3 deletions
diff --git a/world/map/npc/functions/doomsday.txt b/world/map/npc/functions/doomsday.txt
index eec6635d..50774bbd 100644
--- a/world/map/npc/functions/doomsday.txt
+++ b/world/map/npc/functions/doomsday.txt
@@ -33,6 +33,7 @@ function|script|DoomsdayDebug
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");
+ mes "Zealite Upgrade? "+if_then_else($DOOMSDAY_SUMMON > 1, "Yes", "No");
//($DOOMSDAY_SUMMON ? "Yes" : "No");
next;
// Only GM 80 and above can modify Doomsday
@@ -51,6 +52,7 @@ function|script|DoomsdayDebug
"[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,
+ "[2][4][4] Toggle Zealite Upgrade",L_Zealite,
"[3][5][0] Kage's Final Battle",L_Kage,
"[-] Close",L_Close;
@@ -142,6 +144,16 @@ L_NivalCouncil:
gmlog strcharinfo(0) + " called the Council to Nivalis.";
return;
+L_Zealite:
+ set $DOOMSDAY_SUMMON, 2;
+ disablenpc "Soul Menhir#deadmire";
+ disablenpc "Soul Menhir#hurnscald";
+ disablenpc "Soul Menhir#nivalis";
+ disablenpc "Soul Menhir#tulimshar";
+ //disablenpc "Soul Menhir#candor";
+ gmlog strcharinfo(0) + " changed the availability of #manatez spell.";
+ return;
+
// Act 5: The Doomsday
L_Kage:
mes "//-- TODO --//";
@@ -312,6 +324,16 @@ OnDoomsday2Restart:
fakenpcname "Mede", "Mana Shopkeeper#_D", 420;
fakenpcname "Bracco", "Mana Shopkeeper#2_D", 420;
+
+ if ($DOOMSDAY_SUMMON == 2)
+ goto L_MenhirUpdate;
+ end;
+
+L_MenhirUpdate:
+ disablenpc "Soul Menhir#deadmire";
+ disablenpc "Soul Menhir#hurnscald";
+ disablenpc "Soul Menhir#nivalis";
+ disablenpc "Soul Menhir#tulimshar";
end;
/////// Act 3 sieges
@@ -374,9 +396,9 @@ L_Doomsday3:
// Nivalis
if ($@DoomsdayLoc == 2)
- setarray $@DD_XPOS, 44, 62, 63, 56, 70, 36, 62, 85;
+ setarray $@DD_XPOS, 90, 62, 63, 56, 70, 36, 62, 85;
if ($@DoomsdayLoc == 2)
- setarray $@DD_YPOS, 55, 49, 61, 83, 41, 37, 26, 30;
+ setarray $@DD_YPOS, 47, 49, 61, 83, 41, 37, 26, 30;
// Make an extra announce for those whom missed
@@ -566,7 +588,7 @@ L_DD3Hurns:
L_DD3Nival:
// Compulsory spawns
set $@DD_IDX, rand(getarraysize($@doomsday_mobs));
- monster "031-1", 44, 55, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
+ monster "031-1", 90, 47, "", $@doomsday_mobs[$@DD_IDX], 1, "Doomsday::OnDeathAct3";
set $@DD_INT, $@DD_INT+1;
set $@DD_IDX, rand(getarraysize($@doomsday_mobs));
diff --git a/world/map/npc/magic/_import.txt b/world/map/npc/magic/_import.txt
index 4671ac7a..c3cd11ec 100644
--- a/world/map/npc/magic/_import.txt
+++ b/world/map/npc/magic/_import.txt
@@ -44,3 +44,4 @@ 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
+npc: npc/magic/event-summon-manatyrant.txt
diff --git a/world/map/npc/magic/event-summon-managuardian.txt b/world/map/npc/magic/event-summon-managuardian.txt
index e18c08ce..bad1213c 100644
--- a/world/map/npc/magic/event-summon-managuardian.txt
+++ b/world/map/npc/magic/event-summon-managuardian.txt
@@ -4,6 +4,8 @@
OnCast:
if(call("magic_checks")) end;
+ // FIXME: Incomplete check, should still work during sieges
+ if (getmapflag(getmap(), MF_TOWN)) end;
if (Sp < 100) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (countitem("TinyManaElixir") < 1) end;
diff --git a/world/map/npc/magic/event-summon-manatyrant.txt b/world/map/npc/magic/event-summon-manatyrant.txt
new file mode 100644
index 00000000..f91b2a87
--- /dev/null
+++ b/world/map/npc/magic/event-summon-manatyrant.txt
@@ -0,0 +1,61 @@
+-|script|summon-tyrant|32767
+{
+ end;
+
+OnCast:
+ if(call("magic_checks")) end;
+ if ($DOOMSDAY_SUMMON < 2) end;
+ if (getmapflag(getmap(), MF_TOWN)) end;
+ if (Sp < 100) end;
+ if (getskilllv(SKILL_MAGIC) < .level) end;
+ if (countitem("LargeManaElixir") < 1) end;
+ if (@dd4cooldown > gettimetick(2)) goto L_Cooldown;
+ delitem "LargeManaElixir", 1;
+ set @_M_BLOCK, 1; // block casting, until the timer clears it
+ addtimer 15000, "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)+150000, .@puppet;
+ set @dd4cooldown, gettimetick(2)+160; // This is measured in seconds
+ addnpctimer 10000, .@puppet$+"::OnSummon";
+ addnpctimer 11000, .@puppet$+"::OnDestroy";
+ // Causes caster to heal (I thought in converting MP to HP but meh)
+ heal 30000, 0;
+ 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, 1150, 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) + "manatez"; // used in npcs that refer to this spell
+ void call("magic_register", "OnCast");
+ set .level, 1;
+ set .exp_gain, 1;
+ end;
+}