summaryrefslogblamecommitdiff
path: root/npc/032-1/episode.txt
blob: 98a1503b5d45bb6582cd78fc59b009ce3903ee9d (plain) (tree)
1
2
3
4
5
6
7
8
9





                                 

                                                                                
                                          
                                                                        
                                  
                             
                              

                              

                                          





                                             








                                            
                            
                 
                                                                                               

                  
                            
                 
                                                                   

                  







                                                                              
                                  

              


                      
      

                                                                        
                                                   
                 

                                                                                 
                                                                                      





                                                                                                       



                                    
                                                              


                                       

        







                                                        

                                                                        
                      




                                             
                                            
                                                                        




















                                                                                                                                   


        








                                                                    



                
                                            
                                                                        












































                                                                                                                                                                            


        


                                                      
                                                          




                                                     



                
                                            
                                                                        














































                                                                                                                                                          


        








                                                                    



                
                                            
                                                                        



                                                                                   


                                                      
                                                          




                                                     




                                                    
                                                                        











                                                                                           
                                                                






































































                                                                                                                                              
                                                 




















                                                                                                                    






                
                                           






















                                                                                     
                                                                     








                                                                        


        
                    









                                                                                  
                                            











                                      


        
                                                    
                                                                        



























                                                                                                                                    






                











































































                                                                                                                                                                                





                                                                 
               
                                              























                                                                                                
                                
 



                                                                            
// TMW2 scripts.
// Authors:
//    Jesusalva
// Description:
//    Part of the Doctor's Quest.

// Elli is capable to use magic without a mana stone, which puts her on the same
// level as the Moubootaur and the Mana Source.
032-1,58,129,0	script	Elli	NPC_ELLI,{
    .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99);
    .@x = getq3(LoFQuest_EPISODE);
    .@banu_prize = (.@x & 8);
    .@eurni_info = (.@x & 16);
    .@razor_info = (.@x & 32);
    .@ellis_info = (.@x & 64);
    if (!.@q && getq3(LoFQuest_EPISODE)) {
        mesn;
        mesq l("Hi. Do you need something?");
        next;
        select
            l("No, nothing. Sorry."),
            l("I need to enter.");
        mes "";
        if (@menu == 1) {
            closeclientdialog;
            close;
        }
        if (!.@ellis_info) {
            mesn;
            mesq l("You're stupid. Leave.");
            close;
        }
        if (!.@razor_info) {
            mesn;
            mesq l("You don't need to talk with any researcher inside, so why bother? Leave!");
            close;
        }
        if (!.@banu_prize) {
            mesn;
            mesq l("And who would you be? Another bandit? Leave!");
            close;
        }
        if (!.@eurni_info) {
            mesn;
            mesq l("Why? You are most definitely at the wrong place. Leave!");
            close;
        }
        mesn;
        mesq l("Eh... Sure, why not. What could go wrong, after all.");
        setq2 LoFQuest_EPISODE, 1;
        setq3 LoFQuest_EPISODE, 0;
        close;
    }
    npctalk3 l("Hi.");
    end;

OnFin:
    sc_start(SC_STUN, 20000, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK);
    setpcblock(PCBLOCK_SOFT, true);
    npctalk3 l("I am Elli. One of the Originals.");
    sleep2(4000);
    npctalk3 l("The supreme guardian of the \"Talpan\" creatures, such as you.");
    sleep2(4000);
    npctalk3 l("From the time you come from, the Moubootaur has escaped its chains.");
    sleep2(4000);
    npctalk3 l("The Mana Source, supreme guardian of the world itself, has already took providences.");
    sleep2(4000);
    npctalk3 l("The Moubootaur is evil. Defeat him and protect the world. Now...");
    sleep2(4000);
    npctalk3 l("Return to your time!");
    setpcblock(PCBLOCK_SOFT, false);
    sc_end SC_STUN;
    sleep2(1500);
    warp "017-3", 72, 69;
    // Nothing else needs to be done, quest was closed earlier
    // So we just fix your bank account
    BankVault += #MerchantBank;
    #MerchantBank = 0;
    end;

OnInit:
    .distance=5;
    end;
}

032-1,59,126,0	script	#InnerEP	NPC_HIDDEN,0,0,{
    end;
OnTouch:
    .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99);
    if (getq(LoFQuest_EPISODE) > 15 || .@q)
        slide 52, 127;
    else
        dispbottom l("This door is locked.");
    end;
}

032-1,68,54,0	script	Adrian	NPC_PLAYER,{
    .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99);
    if (.@q) {
        npctalk3 l("Hi. Are you here to get luggage?");
    } else {
        mesn;
        mesq l("Hi. Are you here to get luggage?");
        next;
        select
            l("No, sorry."),
            l("The Red Queen's Party?");
        mes "";
        if (@menu == 2) {
            mesn;
            mesq l("Is that someone's luggage?");
            next;
            mesn;
            mesq l("No, seriously, you should do these questions to Elli. She is the smartest girl I know, close to the Academy.");
            setq3 LoFQuest_EPISODE, getq3(LoFQuest_EPISODE) | 64;
            next;
        }
        closeclientdialog;
    }
    end;

OnInit:
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, SailorHat);
    setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe);
    //setunitdata(.@npcId, UDT_HEADBOTTOM, LeatherTrousers); // TODO
    setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 21);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 11);

    .sex = G_MALE;
    .distance=5;
    end;
}

032-1,45,36,0	script	Marikel	NPC_PLAYER,{
    .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99);
    if (.@q) {
        npctalk3 l("Hi. Working on the docks can be hard, but I'm glad I at least get to eat!");
    } else {
        mesn;
        mesq l("Hi. Working on the docks can be hard, but I'm glad I at least get to eat!");
        do
        {
            next;
            select
                l("Cool, thanks."),
                l("Why is it hard?"),
                l("The wage is high?"),
                l("Something to eat?"),
                l("The Queen's Party?");
            mes "";
            switch (@menu) {
            case 2:
                mesn;
                mesq l("Because the council has some crazy project which requires me to move crates all the time!");
                next;
                mesn;
                mesq l("Civilian traffic keeps declining but they keep bringing more crates back and forth! Crates filled with rubble!");
                next;
                mesn;
                mesq l("I miss the Red Queen, times were easier when she was around.");
                break;
            case 3:
                mesn;
                mesq l("Absolutely not, but not may job offers nowadays.");
                break;
            case 4:
                mesn;
                mesq l("The crops have failed again but the government keeps wasting money on research, for what purposes, as if I would know.");
                next;
                mesn;
                mesq l("Importing food from Hurnscald is expensive, local food is expensive, if you don't have a job you're a dead person. Worse if you need medical aid.");
                break;
            case 5:
                mesn;
                mesq l("I heard they promised to revive the Red Queen, no idea how and don't care, they don't have money anyway.");
                break;
            }
        } while (@menu != 1);
        closeclientdialog;
    }
    end;

OnInit:
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, SailorHat);
    setunitdata(.@npcId, UDT_HEADMIDDLE, SailorShirt);
    setunitdata(.@npcId, UDT_HEADBOTTOM, LeatherTrousers);
    setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 21);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 11);

    .sex = G_MALE;
    .distance=5;
    end;
}

032-1,75,46,0	script	Joelin	NPC_FEMALE,{
    .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99);
    if (.@q) {
        npctalk3 l("Hi. My ship is about to set sail, we'll try to find somewhere better to live than this ruined place!");
    } else {
        mesn;
        mesq l("Hi. My ship is about to set sail, we'll try to find somewhere better to live than this ruined place!");
        do
        {
        next;
        select
            l("Cool, thanks."),
            l("Somewhere better to live?"),
            l("Ruined place?"),
            l("The Queen's Party?");
        mes "";
        switch (@menu) {
        case 2:
            mesn;
            mesq l("Yes! We'll sail west, and find legendary lands!");
            next;
            mesn;
            mesq l("And if I end back here, I'll prove the planet is round! This is the perfect plan! %s GP to ride with me TO GLORY!", fnum(3000));
            next;
            mesn strcharinfo(0);
            if (Zeny < 3000)
                mesq l("I don't have that much money, sorry.");
            else
                mesq l("Uh, maybe another time.");
            next;
            mesn;
            mesq l("Your loss!");
            break;
        case 3:
            mesn;
            mesq l("Where are you from, don't you see all the bandits? Seriously, with these ridiculous plans, the whole continent doomed.");
            next;
            mesn;
            // Be careful with what you wish, Joelin...
            mesq l("Leave sir Benjamin in charge for a few more years, and nothing will be left of these towns. I hope this council perishes in a fire!");
            break;
        case 4:
            mesn;
            mesq l("Leave me alone.");
            break;
        }
        } while (@menu != 1);
        closeclientdialog;
    }
    end;

OnInit:
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, CaptainCap);
    setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe);
    //setunitdata(.@npcId, UDT_HEADBOTTOM, LeatherTrousers); // TODO
    setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 21);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 11);

    .sex = G_FEMALE;
    .distance=5;
    end;
}

032-1,77,46,0	script	Harper	NPC_PLAYER,{
    .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99);
    npctalk3 l("Hi. My captain believe the world is round, can you believe that?");
    end;

OnInit:
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, SailorHat);
    setunitdata(.@npcId, UDT_HEADMIDDLE, SailorShirt);
    setunitdata(.@npcId, UDT_HEADBOTTOM, LeatherTrousers);
    setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 21);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 11);

    .sex = G_MALE;
    .distance=5;
    end;
}

032-1,112,142,0	script	Banu	NPC_GLASS_OLD_LADY,{
    .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99);
    if (.@q) {
        npctalk3 l("Hi. My back hurts!");
    } else {
        // Quest can be reset, so no major rewards, not even experience
        .@x = getq3(LoFQuest_EPISODE);
        .@met_banu = (.@x & 1);
        .@ask_apple = (.@x & 2);
        .@got_apple = (.@x & 4);
        .@banu_priz = (.@x & 8);
        if (!.@got_apple) {
            mesn;
            mesq l("You won't have any of my vegetables, you scoundrel! Get off my yard!");
            setq3 LoFQuest_EPISODE, getq3(LoFQuest_EPISODE) | 1;
            close;
        } else if (!.@banu_priz) {
            mesn;
            mesq l("Oh, thanks, darling; I was starving. Do you need anything?");
            next;
            select
                l("I want the apples back."),
                l("I'm after the Queen's Party."),
                l("I want a knife and a bottle of water!");
            mes "";
            setq3 LoFQuest_EPISODE, getq3(LoFQuest_EPISODE) | 8;
            switch (@menu) {
            case 1:
                getitem RedApple, 12;
                mesn;
                mesq l("Sure, here you go!");
                close;
            case 2:
                getitem SharpKnife, 1;
                getitem ChickenLeg, 1;
                mesn;
                mesq l("They did nothing good! They claim the Platinum Queen was a savior, all lies!");
                next;
                mesn;
                mesq l("We sure flourished at her early years, but the late years were a disaster! Crops were failing way before her death!");
                next;
                mesn;
                mesq l("Don't believe anything they tell you! Here, take this, so you can defend yourself. And some food, now leave.");
                close;
            case 3:
                getitem BottleOfTonoriWater, 1;
                getitem SmallKnife, 1;
                mesn;
                mesq l("Sure, here you go!");
                close;
            }
            close;
        } else {
            npctalk3 l("Hi. Thanks for the pie.");
        }
    }
    end;

OnInit:
    .distance=5;
    end;
}

032-1,71,195,0	script	Joanna	NPC_JOANA,{
    .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99);
    if (.@q) {
        npctalk3 l("Hi. Come to the bakery!");
    } else {
        .@x = getq3(LoFQuest_EPISODE);
        .@met_banu = (.@x & 1);
        .@ask_apple = (.@x & 2);
        .@got_apple = (.@x & 4);
        .@banu_priz = (.@x & 8);
        if (.@met_banu && !.@ask_apple) {
            mesn;
            mesq l("Hey, you, stranger. I promised Banu a pie, but she is yet to give me the apples.");
            next;
            mesn;
            mesq l("Can you fetch with her? 12 %s.", getitemlink(RedApple));
            next;
            select
                l("Sure!"),
                l("No, sorry.");
            mes "";
            if (@menu == 1) setq3 LoFQuest_EPISODE, .@x | 2;
            close;
        } else if (.@ask_apple && !.@got_apple) {
            mesn;
            mesq l("Did you brought me 12 %s?", getitemlink(RedApple));
            if (countitem(RedApple) < 12) close;
            next;
            select
                l("Sure!"),
                l("No, sorry.");
            mes "";
            if (@menu == 2)
                close;
            delitem RedApple, 12;
            setq3 LoFQuest_EPISODE, .@x | 4;
            mesn;
            mesq l("Thank you, tell her to come to the bakery at... Actually, nevermind. Just give her this note.");
            close;
        } else {
            mesn;
            mesq l("Come to the bakery!");
            close;
        }
    }
    end;

OnInit:
    .distance=5;
    end;
}

032-1,151,201,0	script	Eurni	NPC_EURNI,{
    .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99);
    if (.@q) {
        npctalk3 l("Hi. I have questionable items of questionable origins for you.");
        openshop;
    } else {
        mesn;
        mesq l("Hi. I have questionable items of questionable origins for you.");
        next;
        select
            l("Trade"),
            l("The Queen's Party?"),
            l("Not now.");
        mes "";
        if (@menu == 1) {
            openshop;
            closeclientdialog;
        }
        else if (@menu == 2) {
            mesn;
            mesq l("I always do shady deals. *cough cough* %s GP.", fnum(500));
            next;
            if (askyesno() == ASK_YES && Zeny >= 500) {
                Zeny-=500;
                setq3 LoFQuest_EPISODE, getq3(LoFQuest_EPISODE) | 16;
                mesn;
                mesq l("They are hidden in the crypts, inside a cave.");
                next;
                mesn;
                mesq l("This conversation never happened.");
            }
        }
        close;
    }
    end;

OnInit:
    sleep(SHOPWAIT);
	sellitem Bread, getiteminfo(Bread, ITEMINFO_BUYPRICE)*16/10;
	sellitem Cheese, getiteminfo(Cheese, ITEMINFO_BUYPRICE)*16/10;
	sellitem ChamomileTea, getiteminfo(ChamomileTea, ITEMINFO_BUYPRICE)*18/10;
	sellitem BugLeg, getiteminfo(BugLeg, ITEMINFO_BUYPRICE)*192/10;
	sellitem LazuriteShard, 700;
	sellitem MaggotSlime, getiteminfo(MaggotSlime, ITEMINFO_BUYPRICE)*192/10;
	sellitem Coal, getiteminfo(Coal, ITEMINFO_BUYPRICE)*132/10;
	sellitem Lockpicks, 10000;
	sellitem IcedBottle, getiteminfo(IcedBottle, ITEMINFO_BUYPRICE)*32/10;
	sellitem Wurtzite, getiteminfo(Wurtzite, ITEMINFO_BUYPRICE)*164/10;
	sellitem CopperArmor; // Fair price!
	sellitem StrangeCoin, 1000000;
	sellitem WumpusEgg, 99999999;

    .sex = G_MALE;
    .distance = 5;
    end;

// Pay your taxes!
OnBuyItem:
    end;

OnSellItem:
    end;
}

032-1,140,213,0	script	Weellos	NPC_LEGACY_GUARD_A,{
    .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99);
    if (!.@q) {
        mesn;
        mesq l("Hi. This is a very historic building - the former residence of the red queen no less!");
        next;
        select
            l("Nice! I love history!"),
            l("I'm looking for the Queen's Party."),
            l("I hate the Red Queen.");
        mes "";
        switch (@menu) {
        case 1:
            mesn;
            mesq l("Yes! History is the best!");
            break;
        case 2:
            mesn;
            mesq l("You should talk to the Black Razor. He was a researcher, so try the academy.");
            setq3 LoFQuest_EPISODE, getq3(LoFQuest_EPISODE) | 32;
            break;
        case 3:
            mesn;
            mesq l("Most do. I'm not sure if all that hatred is justified, but who cares. She is dead, even if her ghost is back.");
            break;
        }
        close;
    } else {
        npctalk3 l("Hi. This is a very historic building - the former residence of the red queen no less!");
    }
    end;

OnInit:
    .distance=5;
    end;
}

032-1,65,223,0	script	Townhall Guard#EP	NPC_LEGACY_GUARD_D,{
    mesn;
    mesq l("Sorry, but no entry to Townhall under orders of the council head, Benjamin L.");
    close;

OnInit:
    .distance=5;
    end;
}

032-1,138,126,0	script	Market Guard#EP	NPC_LEGACY_GUARD_C,{
    mesn;
    mesq l("With the wages I receive, you can use this market at your own risk.");
    close;

OnInit:
    .distance=5;
    end;
}

032-1,40,146,0	script	Academy Guard#EP	NPC_LEGACY_GUARD_B,{
    mesn;
    mesq l("I'm actually paid by the Academy, or there would be no security here.");
    close;

OnInit:
    .distance=5;
    end;
}

032-1,152,183,0	script	Lt. Longburn#EP	NPC_LEGACY_LIEUTENANT,{
    mesn;
    mesq l("If you have trouble with guards, just bribe them and they'll leave you alone. I asked a few to be fired three years ago, but the council haven't reviewed it yet.");
    close;

OnInit:
    .distance=5;
    end;
}

032-1,138,152,0	script	Begger#EP	NPC_SCAMMER,{
    mesn;
    mesq l("I was kicked out of home for not paying rent. But I had no choice, it was either to eat or to have a roof...");
    close;

OnInit:
    .distance=5;
    end;
}

032-1,114,194,0	script	Imec#EP	NPC_LOF_TRAVMERC,{
    .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99);
    .@x = getq3(LoFQuest_EPISODE);
    .@met_banu = (.@x & 1);
    .@ask_apple = (.@x & 2);
    .@got_apple = (.@x & 4);
    .@banu_priz = (.@x & 8);
    .@warez = (!.@q && (.@ask_apple && !.@got_apple));
    .@apple = 12-countitem(RedApple);
    mesn;
    mesq l("Warez?");
    next;
    select
        l("No but thanks."),
        l("No, loans."),
        rif(.@warez && .@apple > 0, l("Yes, I need %d apples.", .@apple));
    mes "";
    switch (@menu) {
    case 1:
        closeclientdialog; break;
    case 2:
        mesn;
        mesc l("To pay in the specified date, we'll charge you %s over the loaned amount. So, how much?", "25%");
        next;
        menuint
            l("I'm sure the Doctor has a trick... No loans, thanks."), 0,
            rif(#MerchantBank > 1250, l("1,000 GP")), 1000,
            rif(#MerchantBank > 3125, l("2,500 GP")), 2500,
            rif(#MerchantBank > 6250, l("5,000 GP")), 5000,
            rif(#MerchantBank > 12500, l("10,000 GP")), 10000,
            rif(#MerchantBank > 62500, l("50,000 GP")), 50000,
            rif(#MerchantBank > 312500, l("250,000 GP")), 250000;
        mes "";
        #MerchantBank -= @menuret * 125 / 100;
        Zeny += @menuret;
        mesn;
        mesq l("...As you wish.");
        break;
    case 3:
        // Inflation: 400%
        // Plus a discount for buying many at once
        .@price = .@apple * getiteminfo(RedApple, ITEMINFO_BUYPRICE) * 4 + (120 - (.@apple*10));
        mesn;
        mesq l("That'll be %s GP.", fnum(.@price));
        if (Zeny < .@price) break;
        next;
        if (askyesno() == ASK_NO) break;
        Zeny -= .@price;
        getitem RedApple, .@apple;
        mesn;
        mesq l("My pleasure.");
    }
    close;

OnInit:
    .distance=5;
    end;
}
// NPC_OMAR NPC_KADIYA NPC_SASHA

// Omatt (NPC_OMAR) swears to make a large donation to the Academy
// shall Kadiya ever be cured. He is a trader of rare gems.
// Reward for saving Kadiya with future's medicine is a Light Green Diamond.