summaryrefslogblamecommitdiff
path: root/npc/020-6/agostine.txt
blob: e58d123d5f08c0e6c00aefc013d850ed210fb72a (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                  
                                                     












                                                                                                                                       

                                      



                                             
                                                                       






                                                                  
                             























                                                                                                                   
                                           












































                                                                                                                                                        


                                                                                












                                                                                                                   
                                             












                                                                                                                   
     





                                    

                                      


















                                                                                                                     
                                     



                                                    
                                       












                                                     
// TMW2 scripts.
// Author:
//    Jesusalva
//    TMW-BR Team
//    The Mana World Team
// Description:
//    Agostine the Legendary Tailor
// Quest struct:
//    Quest State, Nº of furs, Randomness Limiter

020-6,30,26,0	script	Agostine	NPC_EDOUARD,{
    mesn l("Agostine, the Legendary Tailor");
    mesq l("Oui, welcome to this fine shop! My name is Agostine, the legendary tailor!");
    next;
    mesn l("Agostine, the Legendary Tailor");
    mesq l("Some people say that I am the best tailor in the world, but I think I am the best one in the universe!");
    next;
    mesn l("Agostine, the Legendary Tailor");
    mesq l("As long that you have the money, and some really high quality material, I can tailor anything ugly in something fashion!");
    mesc l("As long that Saulc doesn't draws the sprites for my stuff, that is! %%a"); // That's a joke.
    next;

L_Main:
    .@q=getq(NivalisQuest_Agostine);
    .@q2=getq2(NivalisQuest_Agostine);
    .@q3=getq3(NivalisQuest_Agostine);
    mesn l("Agostine, the Legendary Tailor");
    mesq l("So, what will it be?");
    select
        l("I'm fine, thanks!"),
        rif(.@q < 2, l("How much would be the budget for Fur Boots?"));
    mes "";

    switch (@menu) {
        case 1:
            closeclientdialog; npctalkonce l("Arrevouir!"); close;
        case 2:
            // Once in a while you need to drink him
            if (.@q % 2 == 0)
                goto L_Beer;
            goto L_FurBoots;
    }

    close;

L_Beer:
    mesn l("Agostine, the Legendary Tailor");
    mesq l("HOLD THAT! I actually like to drink, and spend some drinking nights with Saulc and Crazyfefe!");
    next;
    mesn l("Agostine, the Legendary Tailor");
    mesq l("Beer is nice, but sometimes I want something more exotic to drink! Oui, we need a proper bar here!");
    next;
    mesn l("Agostine, the Legendary Tailor");
    mesq l("So, what about this: You bring me a @@ and I'll tailor anything you need!", getitemlink(RedPlushWine));
    if (!countitem(RedPlushWine))
        close;
    next;
    select
        l("Here, you can have a glass."),
        l("Sorry, I have nothing.");
    mes "";
    if (@menu == 1) {
        delitem RedPlushWine, 1;
        setq1 NivalisQuest_Agostine, .@q+1;
        mesn l("Agostine, the Legendary Tailor");
        mesq l("Aaaaaahhh... Oui, that's a good wine! So, what will it be?");
        goto L_Main;
    } else {
        mesn l("Agostine, the Legendary Tailor");
        mesq l("That is a pity...");
    }
    close;

L_FurBoots:
    mesn l("Agostine, the Legendary Tailor");
    mesq l("So, you want some @@ to keep you comfy on this harsh winter?", getitemlink(FurBoots));
    next;
    mesn l("Agostine, the Legendary Tailor");
    mesq l("Well, as with any legendary tailor, you must bring the materials yourself, and pay the work fee!");
    next;
    mesn l("Agostine, the Legendary Tailor");
    // Roughly 125 fishes and 15~100 fur
    mesq l("For the @@, I'll need 5 ##Bhigh-quality##b @@, and @@ GP for work fee!", getitemlink(FurBoots), getitemlink(WhiteFur), format_number(7125));
    mesq l("I'll also need @@ as base material!", getitemlink(Boots));

    mesc l("(Note: Agostine will destroy low quality materials!)");
    next;
    select
        l("Legendary my ass! What a rip-off!"),
        l("I'll start delivering the fur!"),
        l("I have everything, can you tailor it?");

    switch (@menu) {
        case 1:
            goto L_Main;
        case 2:
            goto L_DeliverFur;
        case 3:
            @agostine_item=FurBoots;
            @agostine_base=Boots;
            @agostine_fee=7125;
            @agostine_fur=5;
            goto L_Craft;
    }

    close;

// Fur minigame
L_DeliverFur:
    .@q2=getq2(NivalisQuest_Agostine);
    .@q3=getq3(NivalisQuest_Agostine);
    mesc l("You already delivered @@ high-quality patches of white fur.", .@q2);

    select
        rif(countitem(WhiteFur), l("Is this high-quality fur?")),
        l("Maybe later.");
    mes "";
    if (@menu == 2)
        goto L_Main;

    mesc l("Agostine takes the fur from your hands.");
    delitem WhiteFur, 1;
    .@success=rand(6,26)-.@q3; // You will never need more than 20 fur nor less than <delivered_good> fur per patch

    if (.@success <= 1) {
        mesc "%%H " + l("He looks pleased.");
        getexp 100, 25;
        setq2 NivalisQuest_Agostine, .@q2+1;
        setq3 NivalisQuest_Agostine, .@q2;
        next;
        mesn l("Agostine, the Legendary Tailor");
        mesq l("That's some good white for you've got here!");
    } else {
        mesc l("He looks displeased and destroys the fur.");
        getexp 15, 5;
        setq3 NivalisQuest_Agostine, .@q3+1;
        next;
        mesn l("Agostine, the Legendary Tailor");
        mesq l("It was an awful cut! Don't think any piece of a sightly lower material will have part in my art!");
    }

    goto L_DeliverFur;

// Agostine item crafting
L_Craft:
    .@q=getq(NivalisQuest_Agostine);
    .@q2=getq2(NivalisQuest_Agostine);
    .@q3=getq3(NivalisQuest_Agostine);
    if (.@q2 < @agostine_fur) {
        mesn l("Agostine, the Legendary Tailor");
        mesq l("You haven't provided me enough High-Quality White Fur! Go back to hunting!");
        next;
        goto L_Main;
    }
    if (Zeny < @agostine_fee) {
        mesn l("Agostine, the Legendary Tailor");
        mesq l("You don't have enough money! I am an expensive tailor, I want @@ GP!", format_number(@agostine_fee));
        next;
        goto L_Main;
    }
    if (!countitem(@agostine_base)) {
        mesn l("Agostine, the Legendary Tailor");
        mesq l("You haven't provided me the @@ for the base material!", getitemlink(@agostine_base));
        next;
        goto L_Main;
    }

    inventoryplace @agostine_item, 1;
    delitem @agostine_base, 1;
    setq2 NivalisQuest_Agostine, .@q2-@agostine_fur;
    Zeny=Zeny-@agostine_fee;
    getitem @agostine_item, 1;
    setq1 NivalisQuest_Agostine, .@q+1;
    getexp @agostine_fee, @agostine_fur*125;

    mesn l("Agostine, the Legendary Tailor");
    mesq lg("Here you go, my friend! Please enjoy!");
    next;
    goto L_Main;

OnInit:
    .sex = G_OTHER;
    .distance = 4;
    end;
}