summaryrefslogblamecommitdiff
path: root/npc/012-4/craft.txt
blob: ccf3663761ce4ee2f0fb190772c49f127059cb74 (plain) (tree)









































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

012-4,27,31,0	script	Alchemy Cauldron	NPC_NO_SPRITE,{
    do {
        mesc l("What will you brew today?");
        mesc l("It costs %d GP to use.", 300), 1;
        if (Zeny < 300)
            close;

        if (AlchemySystem(CRAFT_PLAYER)) {
            if (Zeny < 300) {
                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-=300;
            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;
    end;
}