summaryrefslogblamecommitdiff
path: root/npc/012-4/craft.txt
blob: be788e9a94dfb674703c0750aa0d4754ac7eb436 (plain) (tree)
1
2
3
4
5
6
7






                                                               
























                                                                                                                                       

                                            
               

                                          











                                           
                



        
// TMW2: Moubootaur Legends scripts.
// Author:
//    Jesusalva
// Description:
//    Rentable Alchemy Bench

012-4,27,31,0	script	Alchemy Cauldron	NPC_NO_SPRITE,{
    mesc l("What will you brew today?");
    mesc l("It costs %d GP to use.", .price), 1;
    mesc l("This tax must be paid now, and you can brew as much as you wish after payment."), 1;
    if (Zeny < .price)
        close;
    next;
    select
        l("Pay"),
        l("Don't pay.");
    mes "";
    if (@menu == 2) { closeclientdialog; close; }
    clear;
    if (Zeny < .price) {
        mesc l("WARNING, you have been detected cheating and thus, violating Tulimshar Anti-Theft Policy."), 1;
        mesc l("You were jailed and now need a GM to get you out of there."), 1;
        logmes "WARNING, "+strcharinfo(0)+" found out cheating, only had "+Zeny+"/300 GP for alchemy table. Jailed.", LOGMES_ATCOMMAND;
        consoleinfo("%s jailed - no money when brewing.", strcharinfo(0));
        atcommand("@jail "+strcharinfo(0));
        // Apply a more realistic penalty
        Zeny=0;
        CRAFTSYS_CURRENT=0;
        close;
    }
    Zeny-=.price;

    do {
        mesc l("What will you brew today?");
        mes "";

        if (AlchemySystem(CRAFT_PLAYER)) {
            mesc l("Success!"), 3;
        } else {
            mesc l("That didn't work!"), 1;
        }
        next;
        mesc l("Try again?");
    } while (askyesno() == ASK_YES);

    close;

OnInit:
    .distance=3;
    .price=1500;
    end;
}