summaryrefslogblamecommitdiff
path: root/npc/003-3/malindou.txt
blob: 58d75b0103fd00547b8a1c8cb4522a7cbfb9ee70 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
                

           
               







                                                   
                 
 



                                                                                                                  
                                                                                                                                 












                                                                                                                
                                                                                                






                                                           
                                                                























                                                                                                                         
                                                                            

























                                                                                                                   










                                     
                                                         



                                     

               


                                                             




                      



                            
                   

                                   
                   


                              
         
                       



                                                                    
                         





                












                                           
// TMW-2 Script.
// Author:
//    Saulc
//    Jesusalva

003-3,36,34,0	script	Malindou	NPC_LLOYD,{

// Evol scripts.
// Authors:
//    gumi
//    Reid
// Description:
//    banker NPC.


    function explain_guild {
        speech S_LAST_NEXT,
            l("The guild is in charge of the commerce regularization throughout Tulimshar and its surroundings."),
            l("With the help of the town hall we organize some auction and we help local merchants to launch their businesses."),
            l("We also feature some services like a storage and a bank for members."),
            l("Registration is open to everybody, but newcomers need to pay a fee for all of the paperwork.");

        narrator S_FIRST_BLANK_LINE,
            l("The bank and item storage is shared between all characters within a same account."),
            l("With it, you can safely move items and funds between your characters."),
            l("To move between characters that are on different accounts, you have to use the Trade function.");
        return;
    }

    function first_visit {
        speech S_LAST_NEXT,
            l("Welcome!"),
            l("My name is Malindou, I am a representative of the Merchant Guild on Tulimshar.");

        selectd(l("My name is @@...", strcharinfo(0)));

        speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
            l("\"@@\", I like this name!", strcharinfo(0)),
            l("Oh, wait a second...");
        narrator S_LAST_NEXT,
            l("@@ is searching something in his book.", .name$);
        speech S_LAST_NEXT,
            l("I see."),
            lg("You are new around here, right?");

        if (selectd(l("How do you know?"), l("Yes I am.")) == 1)
        {
            speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                l("Oh, it is simple. I have on this book the names of every citizen of Tulimshar and its surroundings."),
                l("And I have no mention of a so called \"@@\" on it!", strcharinfo(0));
        }
        else
        {
            speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                l("I knew it!");
        }

        speech S_LAST_NEXT,
            l("Let me explain to you what the Merchant Guild is for.");

        explain_guild;
        next;

        .@price = 15000;
        speech S_LAST_NEXT,
            l("The fee is of @@ GP. So, do you want to register?", .@price);

        switch (selectd(l("Yes."),
                        l("I don't have the time now.")))
        {
            case 1:
                if (Zeny < .@price)
                {
                    speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                        l("You do not seem to have enough money, come back later!");
                }
                else
                {
                    Zeny = Zeny - .@price;
                    setq ArtisQuests_Lloyd, 1;
                    speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                        l("Perfect!"),
                        l("I wrote your name on the book, you are now free to use the storage and bank services.");
                }
                break;
            case 2:
                break;
        }

        return;
    }


    if (getq(ArtisQuests_Lloyd) == 0)
    {
        first_visit;

        closedialog;
        goodbye;
        close;
    }

    speech S_LAST_NEXT,
        l("Welcome to the Merchant Guild of Tulimshar."),
        l("What do you want today?");

    do
    {

        selectd
            l("I would like to store some items."),
            l("I would like to perform money transactions."),
            l("What is this guild for?"),
            l("Bye.");

        switch (@menu)
        {
            case 1:
                openstorage;
                closedialog;
                close;
                break;
            case 2:
                MerchantGuild_Bank;
                break;
            case 3:
                mes "";
                explain_guild;
                break;
        }
        if (@menu != 4)
        {
            speech S_FIRST_BLANK_LINE | S_LAST_NEXT | S_NO_NPC_NAME,
                l("Something else?");
        }
    } while (@menu != 4);

    closedialog;
    goodbye;
    close;

OnInit:
    .sex = G_MALE;
    .distance = 4;
    end;

OnPCLoginEvent:
    if (#MerchantBank)
    {
        BankVault += max(0, #MerchantBank);
        #MerchantBank = 0;
    }
    end;
}