// TMW2 scripts. // Authors: // Jesusalva // Description: // Gemini Sisters Quest - Part D: Final Chamber 034-4,144,82,0 script #GeminiFExit NPC_HIDDEN,0,0,{ OnWumpus: GeminiCheck(); // TODO FIXME: Instead of 75% chance, a Wumpus Egg only on first victory if (any(true, true, true, false)) getitem WumpusEgg, 1; else getitem LightGreenDiamond, 1; getexp 0, rand2(7500, 9999); @forced_sick$ = ""; end; OnTouch: GeminiCheck(); // Only the party leader go ahead if (strcharinfo(0) != getpartyleader(getcharid(1))) { mes l("%s has the key.", getpartyleader(getcharid(1))); close; } mesc l("Are you sure you want to leave?"), 1; mesc l("You, and everyone on the party, won't be able to return."), 1; if (askyesno() == ASK_NO) close; closeclientdialog; // Create maze and populate (From 45x45 to 60x60) CreateMaze(IOT_CHAR, MAZE_SIZE_M | MAZE_SIZE_G); .@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 / 10) + 1; // Monster density is a bit random /* *** Copied from 006-5/groata.txt & 018-2-2/main.txt! *** */ .@mb[0] = MagicGoblin; .@mb[1] = CaveMaggot; array_push(.@mb, BronzeChest); array_push(.@mb, SmallMagicBif); array_push(.@mb, Bif); array_push(.@mb, RobinBandit); array_push(.@mb, SilverChest); array_push(.@mb, DustGatling); array_push(.@mb, MagicBif); array_push(.@mb, DustRifle); array_push(.@mb, DustRevolver); array_push(.@mb, GoldenChest); array_push(.@mb, GreatMoubooSlime); array_push(.@mb, Piousse); array_push(.@mb, ManaPiou); array_push(.@mb, ForestPiou); array_push(.@mb, HouseMaggot); array_push(.@mb, LittleYellowSlime); array_push(.@mb, MoubooSlime); array_push(.@mb, SmallFrog); array_push(.@mb, BigFrog); array_push(.@mb, Lavern); array_push(.@mb, LittleRedSlime); array_push(.@mb, ChocolateSlime); array_push(.@mb, Duck); array_push(.@mb, Bat); array_push(.@mb, CaveMaggot); array_push(.@mb, ManaGhost); array_push(.@mb, ManaBug); array_push(.@mb, FireGoblin); array_push(.@mb, ViciousSquirrel); array_push(.@mb, RedScorpion); array_push(.@mb, WhiteSlime); array_push(.@mb, AzulSlime); array_push(.@mb, DesertLogHead); array_push(.@mb, RedSlime); array_push(.@mb, DesertBandit); array_push(.@mb, Sarracenus); array_push(.@mb, IceMaggot); array_push(.@mb, VampireBat); array_push(.@mb, Bandit); array_push(.@mb, Assassin); array_push(.@mb, Skeleton); 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, RedMushroom); array_push(.@mb, CandiedSlime); array_push(.@mb, OldSnake); array_push(.@mb, GrassSnake); array_push(.@mb, Snake); array_push(.@mb, BlackSlime); array_push(.@mb, Pollet); array_push(.@mb, PiouKnight); array_push(.@mb, Shrewboo); array_push(.@mb, Wolvern); array_push(.@mb, FireSkull); array_push(.@mb, DarkLizard); 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); array_push(.@mb, FallenGuard2); array_push(.@mb, WickedMushroom); array_push(.@mb, Archant); array_push(.@mb, Scar); array_push(.@mb, Crafty); array_push(.@mb, Forain); array_push(.@mb, GreenDragon); array_push(.@mb, Michel); array_push(.@mb, Troll); 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, GoboBear); array_push(.@mb, TerraniteProtector); array_push(.@mb, WhirlyBird); /* 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$, 60, 60, .@mx-40, .@my-40, "Wumpus?", PanthomLord, 1, "#GeminiFExit::OnWumpus"); setunitdata(.@mob, UDT_MAXHP, 250000); setunitdata(.@mob, UDT_HP, 250000); setunitdata(.@mob, UDT_SPEED, 275); setunitdata(.@mob, UDT_HIT, 3500); setunitdata(.@mob, UDT_DMOTION, 50); // Defeating the boss yields a bonus .@old$=getmap(); .@p=getcharid(1); InitMaze(7200, false); sleep2(500); dispbottom l("It was a trap! We must escape!"); $@VALIA_MAP$[.@p]=getmap(); partytimer(.@old$, 2000, "#GeminiFExit::OnSick", .@p); sleep2(2000); @forced_sick$ = getmap(); doevent "#DungeonCore::OnSick"; end; OnSick: .@p=getcharid(1); MAZE_MAP$ = $@VALIA_MAP$[.@p]; // Find random, warpable coordinates .@e=0; .@x=0; .@y=0; .@mx=50; .@my=50; do { .@x = rand2(20, .@mx); .@y = rand2(20, .@my); .@e += 1; if (.@e > 30) { consolebug("Too many failures at Maze \"%s\"! Trying anyway!", MAZE_MAP$); break; } } while (!checknpccell(MAZE_MAP$, .@x, .@y, cell_chkpass)); warp MAZE_MAP$, .@x, .@y; sleep2(500); dispbottom l("It was a trap! We must escape!"); sleep2(2000); @forced_sick$ = getmap(); doevent "#DungeonCore::OnSick"; end; } 034-4,146,83,0 script Chest#gemini NPC_CHEST,{ if (instance_id() < 0 || getcharid(1) < 1) end; GeminiCheck(15); // TODO: Prizes end; OnInit: .distance=2; end; }