summaryrefslogblamecommitdiff
path: root/npc/006-2-1/lune.txt
blob: 486ac01dc50261a49c4a41a7b845d19cd04239ad (plain) (tree)
1
2
3
4
5
6
7
8






                                         
                                      



                                                    
                                                                                          









                                                     
                                               
                                                     
           





                              

                              
                        
                  
     
          








                                                                           






























                                                                               
                                                                                                                                                                    





































                                                                        
                                                                                                                                                                   



































                                                                        

           
                                                                                                                                                                             

          


                                                       





                    











                                         
             
                                                             
             
                          

             
                                                                        









                      



                   
// TMW2 Script
// Author:
//    Saulc
//    Vasily_Makarov (original from Evol)
//    Jesusalva
//    seeds
// Description:
//    Status Reset and Agility Potions

006-2-1,34,66,0	script	Lune	NPC_PIOU_ALCHEMIST,{

    speech S_LAST_NEXT,
        l("I am %s, a piou alchemist specializing in reset and agility potions.", .name$);

L_Menu:
    .@plush_count = BaseLevel*210-(9*210);
    // Lv 10: 210 GP
    // Lv 90: 1.890 GP
    if (BaseLevel > 10)
        .@plush_count = .@plush_count/(BaseLevel/10);

    select
        l("Can you reset my stats please?"),
        l("Can you mix me an agility potion?"),
        lg("I'm allergic to piou potions, goodbye.");
    mes "";

    switch (@menu)
    {
        case 1:
            goto L_ResetStats;
        case 2:
            goto L_PotionList;
        default:
            goto L_Quit;
            break;
    }
    close;

L_ResetStats:
    mesn;
    mesq l("Status point reset can't be undone. Do you really want this?");

L_ConfirmReset:
    ConfirmStatusReset();
    goto L_Quit;

L_PotionList:
    mes "";
    mesn;
    mesq l("I can make three types of Agility Potions, which would you like?");
    next;
    select
        rif(BaseLevel > 20, l("I want an Agi Potion.")),
        rif(BaseLevel > 30, l("I want an Agi+ Potion.")),
        rif(BaseLevel > 40, l("I want an Agi++ Potion.")),
        l("I changed my mind, goodbye.");
	mes "";
    switch (@menu) {
        case 1:
            goto L_AgiPotionA;
            break;
        case 2:
            goto L_AgiPotionB;
            break;
        case 3:
            goto L_AgiPotionC;
            break;
        default:
            goto L_Quit;
            break;
    }
    close;

L_AgiPotionA:
	.@price=POL_AdjustPrice(1000);
    mes "";
    mesn;
    mesq l("To make an %s I need a %s, an %s, and %s GP for commission.", getitemlink(AgiPotionA), getitemlink(TopazPowder), getitemlink(HerbalTea), fnum(.@price));
    next;
    select
        l("I have the ingredients here."),
        l("I'll come back later."),
        l("I don't need anything after all, goodbye!");
    if (@menu == 2)
        goto L_Menu;

    if (@menu == 3)
        goto L_Quit;

    if (
        countitem(TopazPowder) &&
        countitem(HerbalTea) &&
        Zeny >= .@price) {

        inventoryplace AgiPotionA, 3;
        delitem TopazPowder, 1;
        delitem HerbalTea, 1;
		POL_PlayerMoney(.@price);
        getitem AgiPotionA, any(2,3);
        getexp rand2(6,18), rand2(6,18);

        mesn;
        mesq l("Here you go. Perhaps you need another one?");
        next;
        goto L_PotionList;
    } else {
        mesn;
        mesq l("Sorry, but I need the ingredients and %d GP.", .@price);
        next;
    }
    goto L_Menu;

L_AgiPotionB:
	.@price=POL_AdjustPrice(1250);
    mes "";
    mesn;
	mesq l("To make an %s I need a %s, two %s, and %s GP for commission.", getitemlink(AgiPotionB), getitemlink(Topaz), getitemlink(HerbalTea), fnum(.@price));
    next;
    select
        l("I have the ingredients here."),
        l("I'll come back later."),
        l("I don't need anything after all, goodbye!");
    if (@menu == 2)
        goto L_Menu;

    if (@menu == 3)
        goto L_Quit;

    if (
        countitem(Topaz) &&
        countitem(HerbalTea) >= 2 &&
        Zeny >= .@price) {

        inventoryplace AgiPotionB, 3;
        delitem Topaz, 1;
        delitem HerbalTea, 2;
		POL_PlayerMoney(.@price);
        getitem AgiPotionB, any(2,3);
        getexp rand2(6,18), rand2(6,18);

        mesn;
        mesq l("Here you go. Perhaps you need another one?");
        next;
        goto L_PotionList;
    } else {
        mesn;
        mesq l("Sorry, but I need the ingredients and %d GP.", .@price);
        next;
    }
    goto L_Menu;

L_AgiPotionC:
	.@price=POL_AdjustPrice(1500);
    mes "";
    mesn;
	mesq l("To make an %s I need a %s, three %s, and %s GP for commission.", getitemlink(AgiPotionC), getitemlink(PolishedTopaz), getitemlink(HerbalTea), fnum(.@price));
    next;
    select
        l("I have the ingredients here."),
        l("I'll come back later."),
        l("I don't need anything after all, goodbye!");
    if (@menu == 2)
        goto L_Menu;

    if (@menu == 3)
        goto L_Quit;

    if (
        countitem(PolishedTopaz) &&
        countitem(HerbalTea) >= 3 &&
        Zeny >= .@price) {

        inventoryplace AgiPotionC, 3;
        delitem PolishedTopaz, 1;
        delitem HerbalTea, 3;
		POL_PlayerMoney(.@price);
        getitem AgiPotionC, any(2,3);
        getexp rand2(6,18), rand2(6,18);

        mesn;
        mesq l("Here you go. Perhaps you need another one?");
        next;
        goto L_PotionList;
    } else {
        mesn;
        mesq l("Sorry, but I need the ingredients and %d GP.", .@price);
        next;
    }
    goto L_Menu;

L_Quit:
    closeclientdialog;
    goodbye;
    close;

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