summaryrefslogblamecommitdiff
path: root/npc/001-1/fexil.txt
blob: ef9de7be2a233222dc6e0e3843e531596afbf5f5 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                              
                                                                                                                                      
                                                  

                                                                                                                       










                                                                              
                                                                                  









                                                                            
                                                              







                                                                
                                                                                          


                                                                                      
                                                                     



                                                 
                                                                                              


                         
                                                                      











                                      




                                                                                    
 
                  

               
                        
                             

                  
               



                        
               
                     
                                                                        









                                                          
                                                    

                             
                                                                                       





                             
                                    
                     
                                                      
 
                                        



                                  
               














                                                                                                   
// Evol scripts.
// Author:
//    Reid
// Description:
//    Newbie merchant.
// Variables:
//    ArtisQuests_Fexil
// Quest states:
//    0  -- not started
//    1  -- Lloyd warned about the quest
//    2  -- Fexil explain what he needs
//    3  -- Fexil buy every fur that the pc bring to him

001-1,47,134,0	script	Fexil#001-1	NPC_ELVEN_MAN_TRADER,{

    function fexil_quest {
        speech 4,
            l("You know, the life of the merchant is hard. I really hope that Artis and the Merchant Guild will help me to succeed."),
            l("Maybe you too you could help me?"),
            l("I want to be the first merchant of this square to sell clothes made from @@s!", getitemlink(FluffyFur)),
            l("I will buy all of the fur that you will bring me at a good price, let's say, 15 E piece."),
            l("Do we have a deal?");

        switch (select (l("Ok."), l("I don't want to be part of this joke.")))
        {
            case 1:
                setq ArtisQuests_Fexil, 3;
                speech 5,
                    l("Awesome! I will wait for you here.");
                break;
            case 2:
                speech 5,
                    l("Oh... Ok, I will be around here if you change your mind.");
                break;
        }
        return;
    }

    mesn;
    mesq lg("Greetings traveler.");
    next;
    mesq l("I have some clothes and other things for you at a fine price!");
    next;
    mesq l("What I sell comes from every corner of Gasaron.");
    next;
    mesq lg("Interested?");
    next;

    if (getq (ArtisQuests_Fexil) == 1)
    {
        select (l("I have your pass from the Merchant Guild."));
        speech 5,
            l("Oh! You saved me, I was too afraid to unpack my stuff without this pass."),
            l("Hey, I remember you, we were on the same boat, you are the castaway.");

        switch (select (l("Yes I am."),
                        l("You're confusing me with someone else.")))
        {
            case 1:
                speech 5,
                    l("Oh sure I remember you."),
                    l("The travel was fine for you? It was terrible for me, I was sea-sick.");
                break;
            case 2:
                speech 5,
                    l("Ah, I didn't have much sleep, it's possible.");
                break;
        }
        setq ArtisQuests_Fexil, 2;
        fexil_quest;

        closedialog;
        goodbye;
        close;
    }

    .@fexil = getq(ArtisQuests_Fexil);

    select
        l("OK, let's trade."),
        rif(.@fexil == 2, l("Do you still need help?")),
        rif(.@fexil > 2 && countitem(FluffyFur) > 0, l("I have some fur for you.")),
        l("No. Sorry.");

    switch (@menu)
    {
        case 1:
            closedialog;
            shop "Bag#001-1";
            close;

        case 2:
            mes "";
            fexil_quest;
            break;

        case 3:
            speech 5,
                l("Awesome. How many of those do you want to give me?");

            do
            {
                input .@amount;
                if (.@amount < 1)
                {
                    speech 5,
                        l("Please enter a valid amount.");
                    continue;
                }
                if (.@amount > countitem(FluffyFur))
                {
                    speech 5,
                        l("You don't have enough @@s on you.", getitemlink(FluffyFur));
                    continue;
                }

                break;
            } while (1);

            .@price = 15 * .@amount;
            speech 5,
                l("Deal, I offer you @@ E!", .@price);

            delitem FluffyFur, .@amount;
            Zeny = Zeny + .@price;

            break;

        case 4:
            speech 5,
                l("Oh... Well, I just started to trade... Thus my technique may not be the best."),
                lg("Anyway, if you ever feel interested, just check my bag!");
            break;
    }

    closedialog;
    goodbye;
    close;

OnInit:
    .sex = G_MALE;
    .distance = 2;
    end;
}