diff options
author | Jesusaves <jesusalva@themanaworld.org> | 2020-05-09 21:55:31 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-10 00:55:31 +0000 |
commit | 7ee960c62a2d2919a68f6f24925567ee417f192e (patch) | |
tree | a28cfb9eb0894690d2f46ff0fb30cc205848bf77 /world/map/npc/functions | |
parent | ff9054498564f69901ad1c48e6cf00bb7ff9023f (diff) | |
download | serverdata-7ee960c62a2d2919a68f6f24925567ee417f192e.tar.gz serverdata-7ee960c62a2d2919a68f6f24925567ee417f192e.tar.bz2 serverdata-7ee960c62a2d2919a68f6f24925567ee417f192e.tar.xz serverdata-7ee960c62a2d2919a68f6f24925567ee417f192e.zip |
WIP: 500 PRs Closed Commemorative Commit (#555)
* Mountain and Grass Snake experience +100% (per topic 20799)
* Prepare the act 5 button so it have a non-null action
* There's now 10% chance per clue of Tormenta showing up at 09:00 assault.
Usual spot. Currently 2 clues were found, so 20% spawn chances.
* Cerhan reactions for Sand Cutter (thanks for pointing this out, Ledmitz)
* Alacrius Riddle (needs 300 boss points to start)
* Keshlam Swamps map
* News file ID 85
Diffstat (limited to 'world/map/npc/functions')
-rw-r--r-- | world/map/npc/functions/doomsday.txt | 58 | ||||
-rw-r--r-- | world/map/npc/functions/global_event_handler.txt | 1 |
2 files changed, 59 insertions, 0 deletions
diff --git a/world/map/npc/functions/doomsday.txt b/world/map/npc/functions/doomsday.txt index fb3f2e0a..27498e2b 100644 --- a/world/map/npc/functions/doomsday.txt +++ b/world/map/npc/functions/doomsday.txt @@ -154,6 +154,7 @@ L_Kage: enablenpc "Wizard#7"; enablenpc "Wizard#8"; enablenpc "Arch-Wizard#9"; + set $DOOMSDAY, 3; donpcevent "Doomsday::OnJanitor"; // TODO gmlog strcharinfo(0) + " changed doomsday to Act 5: The Doomsday."; return; @@ -764,6 +765,10 @@ L_Doomsday3Bonus: set $@DD_IDX, rand(getarraysize($@doomsday_mobs)); areamonster "003-4", 20, 20, 85, 60, "", $@doomsday_mobs[$@DD_IDX], $@DD_UNITS; + // Tormenta + if (rand(10) <= $DOOMSDAY_CLUES) + monster "057-1", 126, 64, "", 1137, 1; + set $@DD_UNITS, 0; set $@DD_IDX, 0; end; @@ -801,6 +806,10 @@ OnDD4Spawn: monster $@DD_LOC$, $@DD_XPOS[$@DD_IDX1], $@DD_YPOS[$@DD_IDX1], "", 1145, 1, "Doomsday::OnDeathAct4"; //debugmes "Success "+$@DD_LOC$+" ("+$@DD_XPOS[$@DD_IDX1]+", "+$@DD_YPOS[$@DD_IDX1]+")"; mapannounce $@DD_LOC$, "Golem : FRAIL SMALL PEOPLE, ME SMASH!!!", 0; + // Spawn a few mobs + set $@DD_INT, 0; + set $@DD_UNITS, $DOOMSDAY_CLUES*4; + callsub S_DD3ThirdSpawns; goto OnDD4Smash; // Could use a new optional skill: FRAIL NOOBS, ZAX RULES! (causes new wave of 6 monsters) @@ -1145,4 +1154,53 @@ OnInit: end; } +008-1,97,28,0|script|#Haystack|400 +{ + if ($DOOMSDAY != 3) end; + if ((gettimetick(2)-TUT_var < 5*7*86400) || (BaseLevel < 40)) //player must be created at least 5 weeks ago + goto L_EndTooYoung; + if (gettimetick(2) < #HAYSTACKTIMEPENALTY) + goto L_EndRateLimit; + set #HAYSTACKTIMEPENALTY, gettimetick(2) + 5; + message strcharinfo(0), "Haystack : What exactly are you looking for?"; + if (rand(20) == 0) getitem "BentNeedle", 1; // 5% chance (was 1% on 2010) + close; + +L_EndTooYoung: + end; + +L_EndRateLimit: + message strcharinfo(0), "Haystack : I just searched this haystack... Gimme a break."; + end; +} + +// This function controls death, both on Zax Domains as with Black Rose +function|script|DoomsdayAct5 +{ + if ($DOOMSDAY != 3) + goto L_Return; + if (countitem("BlackRose")) + goto L_WarpTo; + if (getmap() == "099-1" || getmap() == "099-2" || getmap() == "099-3" || getmap() == "099-6") + goto L_WarpOut; + goto L_Return; + +L_WarpTo: + //warp "099-1", 34, 34; + //delitem "BlackRose", 1; + return; + +L_WarpOut: + if (countitem("DarkPetal") < 1) + goto L_Failure; + delitem "DarkPetal", 1; + return; + +L_Failure: + set Class, 6; + return; + +L_Return: + return; +} diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt index fe87b380..b92967b3 100644 --- a/world/map/npc/functions/global_event_handler.txt +++ b/world/map/npc/functions/global_event_handler.txt @@ -33,6 +33,7 @@ OnPCDieEvent: addtimer 0, "Magic Timer::OnClear"; // reset magic block on death callfunc "SpawnGhost"; callfunc "MiriamExpire"; // force the speed skill quest to expire + callfunc "DoomsdayAct5"; // Doomsday Event Act 5 set @killerrid, 0; // reset killer rid end; |