diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-09-24 05:36:47 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-09-24 05:36:47 -0300 |
commit | 2a64f8c25598a7f2e374eefb5a9bf93680b72708 (patch) | |
tree | fee25ee2486c11d0135aa698d9e73cf17b4927b9 /npc/functions | |
parent | 3079464676d63e74c5c5caab59dd50fbfe00edaa (diff) | |
download | serverdata-2a64f8c25598a7f2e374eefb5a9bf93680b72708.tar.gz serverdata-2a64f8c25598a7f2e374eefb5a9bf93680b72708.tar.bz2 serverdata-2a64f8c25598a7f2e374eefb5a9bf93680b72708.tar.xz serverdata-2a64f8c25598a7f2e374eefb5a9bf93680b72708.zip |
Dream Tower Event. Will begin this monday. Obviously poorly tested.
And balance-wise broken as ****** but whatever - it is done.
And it is 05:37, any issues can be addressed after waking up.
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/aurora.txt | 58 | ||||
-rw-r--r-- | npc/functions/event.txt | 296 | ||||
-rw-r--r-- | npc/functions/news.txt | 15 | ||||
-rw-r--r-- | npc/functions/soul_menhir.txt | 8 | ||||
-rw-r--r-- | npc/functions/util.txt | 2 |
5 files changed, 373 insertions, 6 deletions
diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt index eb71f596e..8a3d932f5 100644 --- a/npc/functions/aurora.txt +++ b/npc/functions/aurora.txt @@ -58,6 +58,11 @@ function script FYNewEvent { DelItemFromEveryPlayer(EventTreasure3); DelItemFromEveryPlayer(EventFish); DelItemFromEveryPlayer(EventOre); + DelItemFromEveryPlayer(BrokenMedal); + DelItemFromEveryPlayer(EventDreamTicket); + DelChrRegFromEveryPlayer(DTOWER_DAY); + DelChrRegFromEveryPlayer(DTOWER_ROLL); + DelChrRegFromEveryPlayer(DTOWER_FLOOR); // Select the event switch ($FYEVENT_CYCLE % 12) { case 1: @@ -118,9 +123,9 @@ function script FYNewEvent { break; default: // FIXME: PLACEHOLDER - $EVENT$="Mining"; - callfunc("FYEConf_Mining"); - kamibroadcast("Miners Union Research Request is now open!", "Aurora Events"); + $EVENT$="Tower"; + callfunc("FYEConf_Tower"); + kamibroadcast("Dream Towers have appeared!", "Aurora Events"); break; } donpcevent "Aurora::OnRestore"; @@ -352,6 +357,43 @@ function script FYE_Expo { +// Configure Dream Tower +function script FYEConf_Tower { + $DREAMTOWER_SAGE$=any("Jaxad", "Mr. Saves", "Tux", "Freeyorp", "Cassy", "Crush", "Rotonen", "Kage", "Bjorn", "The Elven Sage", "Hocus Pocus the Fidibus"); + // Bertram? (https://forums.themanaworld.org/viewtopic.php?p=105296#p105296) + setarray $FYREWARD_PT, 1, 3, 5, 7, 10, + 15, 22, 30, 45, 60, + 75, 100, 120, 150, 200, + 250, 300, 400, 500, 600, + 750, 1000, 1500, 2000, 2500, + 3000, 3500, 4000, 4500, 5000; + // PS. Max Est. ? + + FYE_Autoset(); + $FYLOGIN_PTS=0; + return; +} + +// Dream Tower Ticket +function script FYE_Tower1 { + .@mob=getarg(0, killedrid); + // Obtain the monster level and roll a hidden counter + .@lv=getmonsterinfo(.@mob, MOB_LV); + DTOWER_ROLL+=.@lv; + + // There is no luck involved - Just get 1000 dream tower rolls + if (DTOWER_ROLL >= 1000) { + getitem EventDreamTicket, 1; + DTOWER_ROLL-=1000; + } + return; +} + + + + + + // Configure Fishing function script FYEConf_Fishing { @@ -456,6 +498,12 @@ function script FYE_Submit { setq2 Q_AuroraEvent, .@pts; delitem EventOre, countitem(EventOre); + } else if ($EVENT$ == "Tower") { + // .:: DREAM TOWER APPEARS ::. + .@pts+=countitem(BrokenMedal)*1; + + setq2 Q_AuroraEvent, .@pts; + delitem EventFish, countitem(BrokenMedal); } else { // Wut? This is not an Aurora Event Exception($EVENT$+" is NOT a valid Aurora Event; Misdefinition.\n\nPlease ensure that it is defined in utils, aurora, news, and command/event.\n\nFYE_Submit - FYEventUsesRanking - FYE_* - FYEConf_* - FYStopEvent", RB_DEFAULT|RB_ISFATAL); @@ -470,7 +518,7 @@ function script FYE_Submit { // Stops any Aurora Event function script FYStopEvent { - setarray .@av$, "Kamelot", "Regnum", "Expo", "Fishing", "Candor", "Mining"; + setarray .@av$, "Kamelot", "Regnum", "Expo", "Fishing", "Candor", "Mining", "Tower"; if (array_find(.@av$, $EVENT$) >= 0) { sClear(); $EVENT$=""; @@ -532,6 +580,8 @@ function script FYRewardEvent { function script AuroraMobkill { if ($EVENT$ == "Mining") FYE_Mining(killedrid); + if ($EVENT$ == "Tower") + FYE_Tower1(killedrid); return; } diff --git a/npc/functions/event.txt b/npc/functions/event.txt index 9efcd68e8..f3b094b03 100644 --- a/npc/functions/event.txt +++ b/npc/functions/event.txt @@ -67,6 +67,302 @@ OnCleanUp: end; } +- script sDreamTower NPC_HIDDEN,{ +OnWarpTo: + if ($EVENT$ != "Tower") end; + if (!countitem(EventDreamTicket)) end; + + // Reset progress + if (DTOWER_DAY != gettimeparam(GETTIME_DAYOFMONTH) || DTOWER_FLOOR < 1) { + DTOWER_DAY=gettimeparam(GETTIME_DAYOFMONTH); + DTOWER_FLOOR=1; + dispbottom l("A new Dream Tower opens its gates before you..."); + } + + // Create maze and populate + CreateMaze(IOT_CHAR); + .@mx=getmapinfo(MAPINFO_SIZE_X, MAZE_MAP$)-20; + .@my=getmapinfo(MAPINFO_SIZE_Y, MAZE_MAP$)-20; + .@tl=(20-.@mx)*(20-.@my) * 3 / 10; // Total tiles + collision guess + .@tl=.@tl / rand2(8,12) + 1; // Monster density is a bit random + + /* *** Copied from 006-5/groata.txt & 018-2-2/main.txt! *** */ + /* ********* Spawn monsters based on DTOWER_FLOOR ********* */ + .@lv = (BaseLevel/10) + DTOWER_FLOOR * 5; + .@mb[0] = MagicGoblin; + .@mb[1] = IceMaggot; + + // Artillery & Chests + if (.@lv > 10) + array_push(.@mb, BronzeChest); + if (.@lv > 20) + array_push(.@mb, SmallMagicBif); + if (.@lv > 30) + array_push(.@mb, Bif); + if (.@lv > 40) + array_push(.@mb, RobinBandit); + if (.@lv > 45) + array_push(.@mb, SilverChest); + if (.@lv > 50) + array_push(.@mb, DustGatling); + if (.@lv > 55) + array_push(.@mb, MagicBif); + if (.@lv > 60) + array_push(.@mb, DustRifle); + if (.@lv > 70) + array_push(.@mb, DustRevolver); + if (.@lv > 75) + array_push(.@mb, GoldenChest); + if (.@lv > 80) + array_push(.@mb, DustBoss); + if (.@lv > 85) + array_push(.@mb, BigMagicBif); + if (.@lv > 90) + array_push(.@mb, GreatMoubooSlime); + if (.@lv > 100) + array_push(.@mb, Jhon); + if (.@lv > 105) + array_push(.@mb, PrismChest); + + // Monsters + if (is_between(0, .@lv, 30)) { + array_push(.@mb, Piou); + array_push(.@mb, Piousse); + array_push(.@mb, Squirrel); + array_push(.@mb, ManaPiou); + array_push(.@mb, ForestPiou); + array_push(.@mb, RedButterfly); + array_push(.@mb, Maggot); + array_push(.@mb, CandorScorpion); + array_push(.@mb, HouseMaggot); + array_push(.@mb, LittleYellowSlime); + array_push(.@mb, Ratto); + array_push(.@mb, RudolphSlime); + array_push(.@mb, MoubooSlime); + array_push(.@mb, Croc); + array_push(.@mb, Scorpion); + array_push(.@mb, SmallFrog); + } + if (is_between(10, .@lv, 40)) { + array_push(.@mb, BigFrog); + array_push(.@mb, Lavern); + array_push(.@mb, LittleRedSlime); + array_push(.@mb, ChocolateSlime); + array_push(.@mb, Blub); + array_push(.@mb, Duck); + array_push(.@mb, Bat); + array_push(.@mb, CaveMaggot); + array_push(.@mb, ManaGhost); + array_push(.@mb, ManaBug); + array_push(.@mb, Fluffy); + array_push(.@mb, FireGoblin); + array_push(.@mb, ViciousSquirrel); + array_push(.@mb, RedScorpion); + array_push(.@mb, WhiteSlime); + array_push(.@mb, AzulSlime); + array_push(.@mb, DesertLogHead); + } + if (is_between(20, .@lv, 50)) { + array_push(.@mb, RedSlime); + array_push(.@mb, PoisonSpikyMushroom); + array_push(.@mb, DesertBandit); + array_push(.@mb, OceanCroc); + array_push(.@mb, ToppyBlub); + array_push(.@mb, Sarracenus); + array_push(.@mb, IceMaggot); + array_push(.@mb, VampireBat); + array_push(.@mb, Bandit); + array_push(.@mb, Pinkie); + array_push(.@mb, LivingPotato); + array_push(.@mb, Assassin); + array_push(.@mb, Skeleton); + } + if (is_between(30, .@lv, 60)) { + array_push(.@mb, CaveSnake); + array_push(.@mb, GreenSlime); + array_push(.@mb, CopperSlime); + array_push(.@mb, YellowSlime); + array_push(.@mb, SantaSlime); + array_push(.@mb, LavaSlime); + array_push(.@mb, Bluepar); + array_push(.@mb, DeathCat); + array_push(.@mb, Moggun); + array_push(.@mb, SeaSlime); + array_push(.@mb, RedMushroom); + array_push(.@mb, Mouboo); + array_push(.@mb, LogHead); + array_push(.@mb, CandiedSlime); + array_push(.@mb, OldSnake); + array_push(.@mb, GrassSnake); + } + if (is_between(40, .@lv, 70)) { + array_push(.@mb, GiantMaggot); + array_push(.@mb, IcedFluffy); + array_push(.@mb, Snake); + array_push(.@mb, BlackSlime); + array_push(.@mb, Tipiou); + array_push(.@mb, AlphaMouboo); + array_push(.@mb, Pollet); + array_push(.@mb, PiouKnight); + array_push(.@mb, Shrewboo); + } + if (is_between(40, .@lv, 80)) { + array_push(.@mb, Wolvern); + array_push(.@mb, FireSkull); + array_push(.@mb, DarkLizard); + } + if (is_between(50, .@lv, 90)) { + array_push(.@mb, ArmoredSkeleton); + array_push(.@mb, BlackScorpion); + array_push(.@mb, ElectroWorm); + array_push(.@mb, EarthFairy); + array_push(.@mb, FireFairy); + array_push(.@mb, WaterFairy); + array_push(.@mb, WindFairy); + array_push(.@mb, PoisonFairy); + array_push(.@mb, MountainSnake); + array_push(.@mb, HoodedNinja); + array_push(.@mb, ForestMushroom); + array_push(.@mb, GoldenScorpion); + } + if (is_between(60, .@lv, 100)) { + array_push(.@mb, Yeti); + array_push(.@mb, FallenGuard1); + array_push(.@mb, GreenSlimeMother); + array_push(.@mb, SnowFlower); + array_push(.@mb, BlueSlimeMother); + array_push(.@mb, WickedMushroom); + array_push(.@mb, CopperSlimeMother); + array_push(.@mb, YellowSlimeMother); + array_push(.@mb, RedSlimeMother); + array_push(.@mb, ChocolateSlimeMother); + array_push(.@mb, WhiteSlimeMother); + array_push(.@mb, Archant); + array_push(.@mb, Scar); + } + if (is_between(70, .@lv, 110)) { + array_push(.@mb, AzulSlimeMother); + array_push(.@mb, SeaSlimeMother); + array_push(.@mb, LavaSlimeMother); + array_push(.@mb, BlackSlimeMother); + array_push(.@mb, Crafty); + array_push(.@mb, Forain); + array_push(.@mb, GreenDragon); + array_push(.@mb, Michel); + array_push(.@mb, Troll); + } + if (is_between(80, .@lv, 120)) { + array_push(.@mb, EliteDuck); + array_push(.@mb, AzulSkullSlime); + array_push(.@mb, Moonshroom); + array_push(.@mb, RedSkullSlime); + array_push(.@mb, Terranite); + array_push(.@mb, JackO); + array_push(.@mb, BlackMamba); + array_push(.@mb, GreenSkullSlime); + array_push(.@mb, BloodyMouboo); + array_push(.@mb, Centaur); + array_push(.@mb, GoboBear); + } + if (is_between(90, .@lv, 130)) { + array_push(.@mb, CopperSkullSlime); + array_push(.@mb, LavaSkullSlime); + array_push(.@mb, BlackSkullSlime); + array_push(.@mb, GiantCaveMaggot); + array_push(.@mb, TerraniteProtector); + array_push(.@mb, VanityPixie); + array_push(.@mb, HolyPixie); + } + if (is_between(100, .@lv, 140)) { + array_push(.@mb, ShadowPixie); + array_push(.@mb, NulityPixie); + array_push(.@mb, Reaper); + array_push(.@mb, NightmareDragon); + array_push(.@mb, Snail); + array_push(.@mb, WhirlyBird); + } + if (is_between(110, .@lv, 150)) { + array_push(.@mb, PinkieSuseran); + array_push(.@mb, Mandragora); + array_push(.@mb, PinkieMaximus); + } + if (.@lv > 120) { + array_push(.@mb, Junglefowl); + array_push(.@mb, Tengu); + array_push(.@mb, Moubi); + } + if (.@lv > 130) { + array_push(.@mb, SuperiorShroom); + array_push(.@mb, Nutcracker); + array_push(.@mb, Golem); + } + if (.@lv > 140) { + array_push(.@mb, SiegeTower); + array_push(.@mb, GreenhornAbomination); + array_push(.@mb, ShadowTortuga); + array_push(.@mb, FireElement); + array_push(.@mb, WaterElement); + array_push(.@mb, EarthElement); + array_push(.@mb, WindElement); + } + if (.@lv > 150) { + array_push(.@mb, SacredWisp); + array_push(.@mb, EvilWisp); + array_push(.@mb, PanthomWisp); + array_push(.@mb, EpiphanyWisp); + } + if (.@lv > 175) + array_push(.@mb, Tortuga); + + /* Spawn them and make hostile */ + freeloop(true); + for (.@i = 0; .@i < 1+(.@tl); .@i++) { + .@mid = any_of(.@mb); + .@m=areamonster(MAZE_MAP$, 20, 20, .@mx, .@my, strmobinfo(1, .@mid), .@mid, 1); + set_aggro(.@m); + } + freeloop(false); + + // Spawn & Configure the boss monster + .@mob=areamonster(MAZE_MAP$, 20, 20, .@mx, .@my, "Gatekeeper", MonsterSergeant, 1, "sDreamTower::OnBossDie"); + setunitdata(.@mob, UDT_LEVEL, DTOWER_FLOOR * 5); + setunitdata(.@mob, UDT_STR, DTOWER_FLOOR * 2); + setunitdata(.@mob, UDT_AGI, DTOWER_FLOOR * 2); + setunitdata(.@mob, UDT_VIT, DTOWER_FLOOR * 3); + setunitdata(.@mob, UDT_INT, DTOWER_FLOOR * 2); + setunitdata(.@mob, UDT_DEX, DTOWER_FLOOR * 3); + setunitdata(.@mob, UDT_LUK, DTOWER_FLOOR * 2); + setunitdata(.@mob, UDT_ADELAY, max(640, 1572-(DTOWER_FLOOR * 24))); + setunitdata(.@mob, UDT_MAXHP, 200+DTOWER_FLOOR*36); + setunitdata(.@mob, UDT_HP, 200+DTOWER_FLOOR*36); + setunitdata(.@mob, UDT_ATKMIN, 20+DTOWER_FLOOR*4); + setunitdata(.@mob, UDT_ATKMAX, 40+DTOWER_FLOOR*4); + setunitdata(.@mob, UDT_DEF, 1+DTOWER_FLOOR*3); + setunitdata(.@mob, UDT_MDEF, 1+DTOWER_FLOOR); + setunitdata(.@mob, UDT_HIT, (BaseLevel+DTOWER_FLOOR)*25/10); + setunitdata(.@mob, UDT_FLEE, (BaseLevel+DTOWER_FLOOR)*24/10); + setunitdata(.@mob, UDT_CRIT, rand2(40, min(120, 40+DTOWER_FLOOR))); + // TODO: Spawn more treasure chests? (exp, gp, items) + + // Consume the ticket and begin the maze + delitem EventDreamTicket, 1; + InitMaze(3600); + dispbottom col(l("Reminder : Defeat the %s to win.", b("Gatekeeper")), 2); + dispbottom l("Mana Plane - Dream Tower, %dº floor. Time limit: 60 minutes or death.", DTOWER_FLOOR); + end; + +// Dream Tower cleared +OnBossDie: + dispbottom l("Mana Plane - Dream Tower, %dº floor %s", DTOWER_FLOOR, b(l("CLEAR!"))); + DTOWER_FLOOR+=1; + if ($EVENT$ == "Tower") + getitem BrokenMedal, 1; + unitskilluseid(getcharid(3), BS_GREED, 1, getcharid(3)); + sleep2(500); + teleporthome(); + end; +} + function script sThanksgiving { // Variables: // #THANKS_DAY diff --git a/npc/functions/news.txt b/npc/functions/news.txt index a1430ea3d..ab5be1b52 100644 --- a/npc/functions/news.txt +++ b/npc/functions/news.txt @@ -282,6 +282,19 @@ 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$ == "Tower") { + mesc ".:: " + l("Dream Tower Appears") + " ::.", 2; + mes ""; + mes l("The dream towers have shown up. They have several floors filled with treasure and dangerous monsters."); + mes l("Every day, they disappear and a new one shows up on its place."); + mes ""; + mes l("You need a %s for each floor, and defeat the gatekeeper to advance.", "Dream Ticket"); + mes l("Floors cannot be re-visited, and rewards increase at each floor."); + mes ""; + mes l("These towers must hold unfathomable secrets from %s.", $DREAMTOWER_SAGE$); + mes l("We must find out what lies at the top, whatever the cost!"); + mesc l("Location: The Mana Plane, Dream Tower"), 3; + ///////////////////////////////////////////////////////////////////////// } else { mesc l("There's no help available for this event."); ///////////////////////////////////////////////////////////////////////// @@ -396,7 +409,7 @@ function script Journalman { mes ""; menuint l("Thanks for your help!"), 1, - l("Event News"), 0, + rif($EVENT$ != "", l("Event News")), 0, rif($GAME_STORYLINE >= 5, l("The Final Act")), 105, rif($GAME_STORYLINE >= 4, l("The Fifth Act")), 104, rif($FIRESOFSTEAM, l("Interlude - Fourth Act")), 1031, diff --git a/npc/functions/soul_menhir.txt b/npc/functions/soul_menhir.txt index c192b5f66..2b2b1a897 100644 --- a/npc/functions/soul_menhir.txt +++ b/npc/functions/soul_menhir.txt @@ -21,6 +21,7 @@ function script SoulMenhir { rif($EVENT$ == "Easter", l("[Easter] Send soul to the Mana Forest!")), L_Easter, rif($EVENT$ == "Worker", l("[Worker Day] Send soul to the Contributor Cave!")), L_Worker, rif($EVENT$ == "Christmas" && BaseLevel >= 20, l("[Christmas] Send soul to the Christmas Workshop!")), L_Xmas, // TODO: In future there'll be an event map + rif($EVENT$ == "Tower" && countitem(EventDreamTicket), l("Dream Tower")), L_Tower, l("Leave it alone."), -; return; @@ -91,6 +92,13 @@ L_Xmas: message strcharinfo(0), l("You are now at the Christmas Workshop."); close; +// FIXME: Dream Tower Warp +L_Tower: + if ($EVENT$ != "Tower") goto L_DontPanic; + if (!countitem(EventDreamTicket)) goto L_DontPanic; + doevent "sDreamTower::OnWarpTo"; + close; + L_DontPanic: message strcharinfo(0), l("(A strange barrier keeps you from touching the stone at this time.)"); return; diff --git a/npc/functions/util.txt b/npc/functions/util.txt index a07d6665a..abcbfc903 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -662,7 +662,7 @@ function script islegendary { // Returns if an event is a ranked Aurora Event or not // (Had to be moved from functions/aurora.txt) function script FYEventUsesRanking { - setarray .@av$, "Expo", "Fishing", "Mining"; + setarray .@av$, "Expo", "Fishing", "Mining", "Tower"; if (array_find(.@av$, $EVENT$) >= 0) { return true; } |