From 5ed4fdbead138a784fe7c33b071b27c033921ab8 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 2 May 2022 14:17:43 -0300 Subject: Add Gemini and Celestia seasons (reduce Kamelot and Candor seasons). Luvia's door can now be broken. --- npc/003-1-1/yetiking.txt | 5 +- npc/014-2-2/gemini.txt | 23 +++++++-- npc/014-2-2/valia.txt | 31 ++++++++---- npc/034-3/gemini.txt | 126 ++++++++++++++++++++++++++++++++++++++++++++++- npc/functions/aurora.txt | 11 ++--- npc/functions/news.txt | 18 +++++++ 6 files changed, 189 insertions(+), 25 deletions(-) (limited to 'npc') diff --git a/npc/003-1-1/yetiking.txt b/npc/003-1-1/yetiking.txt index 83b7a3599..55d2d893e 100644 --- a/npc/003-1-1/yetiking.txt +++ b/npc/003-1-1/yetiking.txt @@ -19,7 +19,7 @@ end; L_Summon: - if (countitem(EverburnPowder) < 1) { + if (countitem(EverburnPowder) < 1 && $EVENT$ != "Celestia") { dispbottom l("I need to pour the @@ to summon the Yeti King.", getitemlink(EverburnPowder)); end; } @@ -28,7 +28,8 @@ L_Summon: end; } - delitem EverburnPowder, 1; + if ($EVENT$ != "Celestia") + delitem EverburnPowder, 1; dispbottom l("Emoc otem itey gnik!"); // come to me yeti king, spelled backwards. Sorry. callfunc "FYE_Olympics_CH"; .inUse=1; diff --git a/npc/014-2-2/gemini.txt b/npc/014-2-2/gemini.txt index ee6b56c62..376e7c9be 100644 --- a/npc/014-2-2/gemini.txt +++ b/npc/014-2-2/gemini.txt @@ -34,9 +34,10 @@ OnCore: areamonster("val1@"+.@p, 20, 20, 70, 60, strmobinfo(1, RedMushroom), RedMushroom, 1+(BaseLevel/30), "Valia::OnRShroom"); break; case 2: // Looking for a runestone + getexp 4000, 100; break; case 3: // Runestone was found - getexp 8132, 657; + getexp 8000, 200; break; case 4: // Desert unlocked, but no clue on what to do dispbottom l("You hear a noise from distance."); @@ -50,13 +51,14 @@ OnCore: areamonster(getmap(), 100, 20, 170, 60, strmobinfo(1, WickedMushroom), WickedMushroom, 1+(BaseLevel/32)); areamonster(getmap(), 100, 20, 170, 60, strmobinfo(1, EliteDuck), EliteDuck, 1); break; + case 5: // JackO shows up + getexp 16000, 400; + break; case 6: // Passage Open if (countitem(SealedSoul)) delitem SealedSoul, countitem(SealedSoul); dispbottom l("You hear waterfall opening in distance."); - // FALLTHROUGH - case 5: // JackO shows up - getexp 32000, 1400; + getexp 32000, 800; break; case 7: // Ambushed & Captured @lockpicks=false; @@ -81,7 +83,18 @@ OnCore: areamonster("val2@"+.@p, 25, 24, 50, 45, strmobinfo(1, HoodedNinja), HoodedNinja, 1); break; case 8: // Bandit Key retrieved - getexp 128000, 2000; + getexp 64000, 1600; + break; + case 9: // Door seal broken + getexp 128000, 3200; + // Limit exports of Lazurite outside the area + if (countitem(LazuriteShard) > 2) + delitem LazuriteShard, countitem(LazuriteShard)/2; + // These two remain for internal quests + if (countitem(LazuriteCrystal)) + delitem LazuriteCrystal, countitem(LazuriteCrystal); + if (countitem(LazuriteHeart)) + delitem LazuriteHeart, countitem(LazuriteHeart); break; } } diff --git a/npc/014-2-2/valia.txt b/npc/014-2-2/valia.txt index e29aaad9b..8a161558f 100644 --- a/npc/014-2-2/valia.txt +++ b/npc/014-2-2/valia.txt @@ -112,7 +112,8 @@ function script GeminiFail { // ...But the party is too large getpartymember(getcharid(1)); .@count = $@partymembercount; - if (.@count > 4) { + // The amount varies based on the season + if (.@count > ($EVENT$ == "Gemini" ? 6 : 4)) { mesq l("Your party is too big. Discretion is a key if we want to succeed."); close; } @@ -120,21 +121,31 @@ function script GeminiFail { mesq l("Good. I hope you have stocked everything. The time limit is 4 hours."); // Only first attempt is free - all others are charged - if (getq(HurnscaldQuest_Gemini) && !is_gm()) { - next; - mesn; - mesq l("Actually, I need help with reagents this time. Bring me a %s and a %s and I'll gladly warp you... again.", getitemlink(GemPowder), getitemlink(EverburnPowder)); - if (!countitem(GemPowder) || !countitem(EverburnPowder)) close; - next; + if ($EVENT$ != "Gemini" || + ($EVENT$ == "Gemini" && GEMINI_DAY == gettime(5))) + { + if (getq(HurnscaldQuest_Gemini) && !is_gm()) { + next; + mesn; + mesq l("Actually, I need help with reagents this time. Bring me a %s and a %s and I'll gladly warp you... again.", getitemlink(GemPowder), getitemlink(EverburnPowder)); + if (!countitem(GemPowder) || !countitem(EverburnPowder)) close; + next; + } } mesc l("Are you and your party ready?"), 1; if (askyesno() != ASK_YES) close; // Not eligible for free lunch - if (getq(HurnscaldQuest_Gemini)) { - delitem GemPowder, 1; - delitem EverburnPowder, 1; + if ($EVENT$ != "Gemini" || + ($EVENT$ == "Gemini" && GEMINI_DAY == gettime(5))) + { + if (getq(HurnscaldQuest_Gemini)) { + delitem GemPowder, 1; + delitem EverburnPowder, 1; + } + } else if ($EVENT$ == "Gemini") { + GEMINI_DAY = gettime(5); } // Handle first attempt diff --git a/npc/034-3/gemini.txt b/npc/034-3/gemini.txt index ffbc19205..f9e88fa10 100644 --- a/npc/034-3/gemini.txt +++ b/npc/034-3/gemini.txt @@ -71,14 +71,128 @@ OnChannel: .@magic_power_loss = 53 - ((readparam2(bInt)+1)*2)/10; dispbottom l("Ok, let's stay focused now!"); + areamonster "052-1", 27, 20, 77, 47, strmobinfo(1, Forain), Forain, 1; // TODO: Loop + debugmes "NPC: %s / %s (%d)", .name$, .extname$, instance_id(); + .aid=getcharid(3); + .mp$=getmap(); + .power=.@magic_power; + .state=0; + .maxpw=.@magic_power_required; + .mloss=.@magic_power_loss; + initnpctimer; + end; + +OnTimer13000: + initnpctimer; // Reset timer + // Time to spawn monsters + .@pc = getmapusers(.mp$); + areamonster "052-1", 56, 30, 60, 31, "Guardian", Scar, 1+.@pc; + areamonster "052-1", 27, 20, 77, 47, strmobinfo(1, Forain), Forain, 2; + // Terranites only show up when doing multiplayer, based on number of players + if (.@pc >= 2) + areamonster "052-1", 56, 30, 60, 31, "Guardian", Terranite, (.@pc/2); +OnTimer10000: +OnTimer8000: +OnTimer6000: +OnTimer4000: +OnTimer2000: + if (instance_id() < 0) end; + + if (!attachrid(.aid)) { + npctalk "The caster ceased to exist!"; + end; + } + + getmapxy(.@m$, .@x, .@y, 0, .aid); + if (.@m$ != .@mp$) { + npctalk "The caster is gone!"; + end; + } + if (.@x < 52 || + .@x > 54 || + .@y < 37 || + .@y > 38) { + npctalk "The caster left the power circle!"; + dispbottom l("The magic accumulated backfires at you!"); + heal -(.power), -(.power/2); + end; + } + + // Harm you + //misceffect FX_CHANNELLING_RAISE; + percentheal -4, -1; + + if (ispcdead()) { + npctalk "The caster is dead!"; + end; + } + if (Sp <= 0) { + npctalk "The caster ran out of mana!"; + end; + } + + // Deplete power over time + // But only if not doing solo + if (getmapusers(.mp$) > 1) + .power -= .mloss; + + // Remove stones inside the circle + .@cat=getareadropitem(.mp$, 52, 37, 54, 39, LazuriteShard, true) * 12; + .@cbt=getareadropitem(.mp$, 52, 37, 54, 39, LazuriteCrystal, true) * 32; + .@cct=getareadropitem(.mp$, 52, 37, 54, 39, LazuriteHeart, true) * 65; + + // Grant them POWER + .power+=.@cat+.@cbt+.@cct; + .@cur = 4 * .power / .maxpw; // Goes from 0 to 4 + + // Check status and update + if (.@cur < .status) + npctalk "NOTICING a sudden power loss!"; + else if (.@cur > .status) + npctalk "NOTICING an increase of power!"; + .status=.@cur; + + // Are we done? + if (.power >= .maxpw) { + npctalk "*the gate spell has been redefined*"; + if (getcharid(1) > 0) { + $@VALIA_STATUS[getcharid(1)]=9; + stopnpctimer; + .power=0; + .mloss=0; + .maxpw=0; + .state=0; + .mp$=""; + .aid=0; + } + end; + } + detachrid(); + // Should we spawn items? + .@t = (getnpctimer(0)+500) / 1000; + // Item time! + if (.@t == 6 || + .@t == 10) { + .@i = 0; + // More Shards than Crystals and Hearts + freeloop(true); + while (.@i < ((5-getmapusers(.mp$)) * 2 + 5)) { + .@it=any(LazuriteShard, LazuriteShard, LazuriteShard, + LazuriteCrystal, LazuriteCrystal, + LazuriteHeart); + makeitem(.@it, 1, .mp$, rand2(27, 77), rand2(20, 47)); + .@i += 1; + } + freeloop(false); + } end; OnTalkNearby: // not very obvious stuff by gumi .@no_nick$ = strip(substr($@p0$, getstrlen(strcharinfo(PC_NAME)) + 3, getstrlen($@p0$) - 1)); .@message$ = strtoupper(.@no_nick$); - if (.@message$ == "catalazuli") { + if (.@message$ == "CATALAZULI") { goto OnChannel; } end; @@ -86,7 +200,15 @@ OnTalkNearby: OnInit: .distance=3; .pid=getnpcid(); - debugmes "Pattern %d", .pid; + // For players + .aid=0; + .mp$=""; + .power=0; + .state=0; + .maxpw=0; + .mloss=0; + + debugmes "Gemini Pattern %d", .pid; //defpattern(.pid, "^([Kk][Aa][Tt][Aa][Zz][Uu][Ll][Ii])$", "OnTalkNearby"); defpattern(.pid, "^(.*)$", "OnTalkNearby"); activatepset(.pid); diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt index 737ccdf0e..7654217a1 100644 --- a/npc/functions/aurora.txt +++ b/npc/functions/aurora.txt @@ -75,6 +75,7 @@ function script FYNewEvent { DelChrRegFromEveryPlayer("DTOWER_ROLL"); DelChrRegFromEveryPlayer("DTOWER_FLOOR"); DelChrRegFromEveryPlayer("FYRAID_LV"); + DelChrRegFromEveryPlayer("GEMINI_DAY"); // Olympics are costlier: Clean less often if ($FYEVENT_CYCLE % 12 == 1) { DelChrRegFromEveryPlayer("FYMOLY_ENBALL"); @@ -125,9 +126,8 @@ function script FYNewEvent { kamibroadcast("Miners Union Research Request is now open!", "Aurora Events"); break; case 7: - // FIXME: PLACEHOLDER - $EVENT$="Kamelot"; - kamibroadcast("Kamelot Season is now open!", "Aurora Events"); + $EVENT$="Celestia"; + kamibroadcast("Celestia Season is now open!", "Aurora Events"); break; case 8: $EVENT$="Olympics"; @@ -146,9 +146,8 @@ function script FYNewEvent { kamibroadcast("Catch the Golden Fish is now open!", "Aurora Events"); break; case 11: - // FIXME: PLACEHOLDER - $EVENT$="Candor"; - kamibroadcast("Candor Battle Season is now open!", "Aurora Events"); + $EVENT$="Gemini"; + kamibroadcast("Gemini Season is now open!", "Aurora Events"); break; default: $EVENT$="Tower"; diff --git a/npc/functions/news.txt b/npc/functions/news.txt index a1b999a07..c11d36ffd 100644 --- a/npc/functions/news.txt +++ b/npc/functions/news.txt @@ -282,6 +282,24 @@ function script EventHelp { mes l("Will you accept his challenge?! Raise to the highest top score!"); mesc l("Location: Candor B1F"), 3; ///////////////////////////////////////////////////////////////////////// + } else if ($EVENT$ == "Celestia") { + mesc ".:: " + l("Celestia Season") + " ::.", 2; + mes ""; + mes l("During this season, you can summon the Yeti King for free."); + mes l("This is the perfect opportunity to help Celestia."); + mes ""; + mes l("Mount your party and find the Yeti King!"); + mesc l("Location: Tulimshar Sewers / Hurnscald Town Hall"), 3; + ///////////////////////////////////////////////////////////////////////// + } else if ($EVENT$ == "Gemini") { + mesc ".:: " + l("Gemini Season") + " ::.", 2; + mes ""; + mes l("During this season, Gemini Quest can be done with parties of 6."); + mes l("Not only that, but you get one free attempt every day!"); + mes ""; + mes l("Form your party and rescue Luvia Gemini from Isbamuth!"); + mesc l("Location: Forsaken Inn, South Woodlands"), 3; + ///////////////////////////////////////////////////////////////////////// } else if ($EVENT$ == "Tower") { mesc ".:: " + l("Dream Tower Appears") + " ::.", 2; mes ""; -- cgit v1.2.3-70-g09d2