summaryrefslogblamecommitdiff
path: root/npc/082-3/poppet.txt
blob: a7226e2a4fc2becc0457fcdb3f5ea10b1ec67686 (plain) (tree)
1
2
3
4
5
6
7






                                         




                                                                             

                                                                     

      

                            
                                           






                                                       

                      







                                                                                                                                                                      


                           
              
           




                                                                                                                                                                                     




















                                                                                                                                                         








                                                                         

                                                                                                                              





                                                   
                                                                                                      









                                                              
                                                          

































                                                                              
                                                       
                                                      

              
                            

                      

          
       
                        


                                            


                          
                                  
                                                               
                         
                         
                         

                                            



                                                                          

















                                                                                     
                                               
                                                   
                    
                                                    

                                   
                          
                         


                                
                                                      
                             
                               
                           
                                

                               
                              
              
                                                     


                               
                         
                                

                             
                             
                       
                       
              
                                                             
                          
                                 

                                   
                       
                             
                         

                            
                       
                          
                               



                            
                                                     
                        
                        
                            




                             




                                                                     





                      




                                                                                 
                                                                                           

                                                                                                                            
                                                                            
                


           

                

                           


        
// TMW Script.
// Author:
//    Jesusalva
// Notes:
//    Christmas 2021 - Poppet's Realm DLC

082-3,99,86,0	script	Poppet	NPC190,{
    function spawn;
    if (mobcount("082-3", "all")) {
        npctalk3 l("Monsters remaining: %s", fnum(mobcount("082-3", "all")));
        end;
    }
    mesn;
    mesq l("Uh, how did you get here? Anyway, welcome to my realm.");
    do
    {
    select
        l("Thanks, poppy."),
        rif(X21_POPPET(), l("I'm bored.")),
        l("Uh... Poppet's Realm? What's that?"),
        l("Through a weird corridor. How do I leave?");
    mes "";
    switch (@menu) {
    case 1:
        close;
    case 2:
        goto L_Summon;
    case 3:
        mesn;
        mesq l("You see, all of the most powerful beings of The Mana World can create their own realm, a place for their leisure.");
        next;
        mesn;
        mesq l("But in this side of the æther, where existence itself is challenged, time is hardly important.");
        next;
        mesn;
        mesq l("So my realm doesn't exist yet. Or perhaps it existed in the past, and is no longer the case. Whatever the case be, you're here, and you're welcome.");
        if (!X21_POPPET())
            X21_DOPOPPET();
        next;
        break;
    case 4:
        mesn;
        mesq l("Hm, perhaps a wanderer of the Mirror Lake? I've heard rumors of a place which connected anything to everything dubbed like that.");
        next;
        mesn;
        mesq l("...North of here is an exit. It is not connected to anywhere, just an infinite, never ending corridor, but if you ##Bcame##b from anywhere, it might as well work.");
        next;
        break;
    }
    } while (true);

L_Summon:
    if (.tick >= gettimetick(2)) {
        mesn;
        mesq l("I'm still recovering myself, please wait %s before trying again.", FuzzyTime(.tick));
        close;
    }
    mesn;
    mesq l("I can summon some creatures for you, and all of them drop %s at a decent rate.", getitemlink(XmasTicket));
    next;
    mesn;
    mesq l("But I can't keep doing that too much, and it is dangerous if you're alone, so make sure you have company. It is always more fun in groups.");
    if (getmapusers("082-3") < 3 && !is_evtc()) {
        mesc l("There must be at least %d players to start.", 3), 1;
        close;
    }
    next;
    mesc b(l("Average monsters per mode:"));
    mesc l("Easy: 145 mobs × 5 waves = 725 total");
    mesc l("Normal: 189 mobs × 5 waves = 945 total");
    mesc l("Hard: 280 mobs × 5 waves = 1,400 total");
    mesc l("Polish: 302 mobs × 5 waves = 1,510 total");
    if (gettime(GETTIME_DAYOFYEAR) >= 357 || is_admin())
        mesc l("Nuclear: 270 mobs × 5 waves = 1,350 super strong mobs");
    else
        mesc l("???: Available from Dec 23rd onwards");
    mes "";
    mesq "If you select a mode you cannot manage, please contact staff; I'll not clean the room, no matter whatever happens.";
    select
        l("Hm, nevermind."),
        l("Begin easy mode [10 min]"),
        l("Begin normal mode [15 min]"),
        l("Begin hard mode [20 min]"),
        l("Begin Polish Warmachine mode [30 min]"),
        rif(gettime(GETTIME_DAYOFYEAR) >= 357 || is_admin(), l("Begin Nuclear Winter mode [45 min]"));
    mes "";
    if (.tick >= gettimetick(2)) { closeclientdialog; close; }
    switch (@menu) {
    case 2:
        .diff = 1;
        .tick = gettimetick(2) + 600;
        monster("082-3",  52,  48, "Alpha", UndeadWitch, 1);
        monster("082-3", 155,  40, "Beta",  UndeadWitch, 1);
        monster("082-3",  45, 155, "Gamma", UndeadWitch, 1);
        monster("082-3", 157, 157, "Delta", UndeadWitch, 1);
        monster("082-3",  95,  85, "Omega", ScytheMob, 1);
        break;
    case 3:
        .diff = 2;
        .tick = gettimetick(2) + 900;
        monster("082-3",  52,  48, "Alpha", Yeti, 1);
        monster("082-3", 155,  40, "Beta",  Yeti, 1);
        monster("082-3",  45, 155, "Gamma", Yeti, 1);
        monster("082-3", 157, 157, "Delta", Yeti, 1);
        monster("082-3",  95,  85, "Omega", Yeti, 1);
        break;
    case 4:
        .diff = 3;
        .tick = gettimetick(2) + 1500;
        monster("082-3",  52,  48, "Alpha", SnowmanBoss, 1);
        monster("082-3", 155,  40, "Beta",  SnowmanBoss, 1);
        monster("082-3",  45, 155, "Gamma", SnowmanBoss, 1);
        monster("082-3", 157, 157, "Delta", SnowmanBoss, 1);
        monster("082-3",  95,  85, "Omega", SnowmanBoss, 1);
        break;
    case 5:
        .diff = 4;
        .tick = gettimetick(2) + 1800;
        monster("082-3",  52,  48, "Alpha", Luvia, 1);
        monster("082-3", 155,  40, "Beta",  Luvia, 1);
        monster("082-3",  45, 155, "Gamma", Luvia, 1);
        monster("082-3", 157, 157, "Delta", Luvia, 1);
        monster("082-3",  95,  85, "Omega", KageGolem, 1); // SUSAN? Tormenta?
        break;
    case 6:
        .diff = 5;
        .tick = gettimetick(2) + 2700;
        monster("082-3",  52,  48, "Alpha", Reaper, 1);
        monster("082-3", 155,  40, "Beta",  Tormenta, 1);
        monster("082-3",  45, 155, "Gamma", Luvia, 1);
        monster("082-3", 157, 157, "Delta", Dragon, 1);
        monster("082-3",  95,  85, "Omega", SUSAN, 1);
        break;
    }
    $@X21_POPPYDIFF = .diff;
    initnpctimer;
    closeclientdialog;
    close;

OnTick:
    if (ispcdead()) end;
    sc_start SC_INCFLEERATE, 30000, 50;
    sc_start SC_INCHITRATE, 30000, 50;
    sc_start SC_ATTHASTE_POTION3, 30000, 10;
    getitem XmasTicket, 1;
    end;

OnTimer600000: // 10.0 min (final)
    mapannounce "082-3", "Warning : ##1##BFINAL WAVE##b##0", 0;
OnTimer450000: // 7.5 min
OnTimer300000: // 5.0 min
OnTimer150000: // 2.5 min
    maptimer("082-3", 10, "Poppet::OnTick");
OnTimer1000:   // Initial wave
    /* Summon next wave */
    .@msg$ = any("I'm having fun, what about you?",
                 "I'm spawning more monsters, watch out.",
                 "Lemme see if I remember how to summon more monsters...",
                 "Here, more practice dummies, have fun.",
                 "I am no longer able to rotate fast, so I'm summoning again.",
                 "This won't nuke ManaMarket but should get you running.",
                 "If you don't like this, try migrating with the Mouboos.",
                 "I always miss the summons, in every sense possible...",
                 "Are you related to the monsters I'm about to summon?",
                 "If you don't want to die, start running.",
                 "It's never too early to eat frozen pizza. Or to kill new mobs.",
                 "Hocus would hide now, I'm spawning monsters.",
                 "I have no motivation for nothing but spawning again.",
                 "Welcome back from your exile, my summoned monsters.",
                 "These new monsters won't drop cookies, but maybe tickets.",
                 "Wushin wanted to paint all my monsters in pink and purle.",
                 "Watching you killing my spawns has certainly been amusing so far.",
                 "I should add new evil dumpling mobs to development list.",
                 "I am liberal about what I spawn. Consider this fact canon.",
                 "I'm taking new mobs from the locker room, gimme a few.",
                 "Let's make The Mana World great again: Bringing more mobs.");
    mapannounce "082-3", "Poppet : "+.@msg$, 0;
    sleep(500); // Give you enough time to RUN AWAY
    switch (.diff) {
    case 1: // Easy (145 mobs) × 5 waves = 725 mobs
        spawn(Bandit, 7);
        spawn(CrotcherScorpion, 7);
        spawn(Archant, 5);
        spawn(Moggun, 3);
        spawn(BlackScorpion, 3);
        spawn(Snake, 2);
        break;
    case 2: // Normal (189 mobs) × 5 waves = 945 mobs
        spawn(FeyElement, 1);
        spawn(CandiedSlime, 7);
        spawn(RedSlime, 9);
        spawn(AngrySeaSlime, 6);
        spawn(LadySkeleton, 4);
        spawn(Skeleton, 4);
        spawn(UndeadWitch, 1);
        break;
    case 3: // Hard (280 mobs) × 5 waves = 1400 mobs
        spawn(LadySkeleton, 9);
        spawn(Skeleton, 9);
        spawn(UndeadWitch, 5);
        spawn(Spider, 5);
        spawn(MountainSnake, 4);
        spawn(LavaSlime, 3);
        spawn(GrassSnake, 3);
        spawn(Nutcracker, 2);
        spawn(Thug, 2);
        spawn(Yeti, 1);
        break;
    case 4: // WarriorWorld (302 mobs) × 5 waves = 1510 mobs
        spawn(RedBone, 7);
        spawn(SeaSlimeMother, 3);
        spawn(Wight, 7);
        spawn(GreenSlimeMother, 2);
        spawn(Yeti, 3);
        spawn(IceElement, 4);
        spawn(Zombie, 4);
        spawn(Terranite, 4);
        spawn(Fallen, 4);
        spawn(Thug, 3);
        spawn(Stalker, 3);
        spawn(Swashbuckler, 2);
        spawn(Grenadier, 2);
        spawn(JackO, 1);
        break;
    default:
    case 5: // Gumi (270 mobs) × 5 waves = 1350 mobs
        spawn(Anne, 10);
        spawn(JackO, 8);
        spawn(ManaGuard, 6);
        spawn(Tengu, 4);
        spawn(Sasquatch, 4);
        spawn(ManaSlayer, 4);
        spawn(DoomGolem, 3);
        spawn(Enchanter, 3);
        // Gumi mode probably would not be worth it without this buff
        spawn(Swashbuckler, 1);
        spawn(Grenadier, 1);
        spawn(Thug, 1);
        spawn(Yeti, 1);
        break;
    }
    end;

function spawn {
    .@mob = getarg(0);
    .@amo = getarg(1) + max(getmapusers("082-3")-1, 0);
    areamonster("082-3",  23,  22,  67,  65, strmobinfo(1, .@mob), .@mob, .@amo);
    areamonster("082-3", 130,  20, 180,  64, strmobinfo(1, .@mob), .@mob, .@amo);
    areamonster("082-3",  20, 127,  65, 175, strmobinfo(1, .@mob), .@mob, .@amo);
    areamonster("082-3", 136, 135, 180, 180, strmobinfo(1, .@mob), .@mob, .@amo);
    areamonster("082-3",  55,  50, 134, 128, strmobinfo(1, .@mob), .@mob, max(1, .@amo/2));
    // Global
    areamonster("082-3",  20,  20, 180, 180, strmobinfo(1, GreenSlime), GreenSlime, 1 + (.diff * getmapusers("082-3") / 2));
    // Make the monster deployment gradual, players will notice script order
    sleep(4000);
    return;
}

OnInit:
    .distance=5;
    .diff = 0;
    .tick = gettimetick(2);
    end;
}