summaryrefslogblamecommitdiff
path: root/npc/017-1/nowhere_man.txt
blob: 6e2d32b3e7ae6b799e4f01448549fd53a4ef7338 (plain) (tree)
1
2
3
4
5
6




                    
                                                                                                           






































































                                                                                                                                                                
// TMW2/LoF scripts.
// Authors:
//    TMW-LoF Team
//    Jesusalva
// Description:
//    Leather gloves. On LoF/TMWA he also crafted Iron Powder, Sulfur Powder, and Yellow Powder (for magic)
//    IMPORTANT @Saulc : DO NOT GIVE ANY EXPERIENCE ON THIS NPC.
//    This is sort of a bet, you know. “Go hunt Mountain Snakes”, or bet some precious
//    crafting material on this NPC. Two choices. The easy way is RISKY, not REWARDING.
//    The refund is the exact fair price, retrieved from database. The only "loss" here
//    is that you would rather do something else with Leather Patch but instead, you "sold" it.
//    If you sell items you don't get experience, so you shouldn't get any exp here either.

017-1,155,162,0	script	Nowhere Man	NPC_UKAR,{
    mesn;
    mesq l("Welcome! I come from nowhere, and I hunt Mountain Snakes. One of their rare drops are the @@!", getitemlink(LeatherGloves));
    next;
    mesn;
    mesq l("Of course, with 5 @@ and 3000 GP I could make one too, but I can fail.", getitemlink(LeatherPatch));
    next;
    mesn;
    mesq l("If I fail, I'll refund you in gold. Do you want me to try it?");
    next;
    if (askyesno() != ASK_YES) {
        mesn;
        mesq l("Well, that's a pity! I used to know the formula to make @@, but you know. Old age.", getitemlink(SulfurPowder));
        close;
    }
    if (countitem(LeatherPatch) < 5 || Zeny < 3000)
        goto L_Missing;
    inventoryplace LeatherGloves, 1;
    delitem LeatherPatch, 5;
    Zeny=Zeny-3000;
    if (rand(1,100) > 40)
        goto L_Success;
    else
        goto L_Failure;

L_Failure:
    mesn;
    mesq l("Aah, the old age. Sorry. I won't be able to make the gloves for you today. %%3");
    Zeny=Zeny+(getiteminfo(LeatherPatch, ITEMINFO_SELLPRICE)*5)+3000;
    next;
    mesn;
    mesq l("As promised, here is @@ GP, the fair price for your material, and refunds.", format_number((getiteminfo(LeatherPatch, ITEMINFO_SELLPRICE)*5)+3000));
    close;

L_Success:
    getitem LeatherGloves, 1;
    mesn;
    mesq l("Well, look at it: I did it!");
    next;
    mesn;
    mesq l("Please, enjoy your leather gloves.");
    close;

L_Missing:
    mesn;
    mesq l("That's not everything I asked for.");
    close;


OnInit:
    .@npcId = getnpcid(0, .name$);
    setunitdata(.@npcId, UDT_HEADTOP, IceGladius);
    setunitdata(.@npcId, UDT_HEADMIDDLE, CreasedShirt);
    setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
    setunitdata(.@npcId, UDT_WEAPON, CreasedShorts);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 4);

    .sex=G_MALE;
    .distance=5;
    end;

}