summaryrefslogblamecommitdiff
path: root/npc/003-5/jeweler.txt
blob: 56a13ff56036e94d1a3a6272ec726abc50fa65a4 (plain) (tree)
1
2
3
4
5
6
7
8
9

              
               
               
                           



                                                                                     
 
                                            

                     


                
           
                        

                                
                                             

                                      

                

          


















                                                                                                                  
        
                

            






                                                              


                                           


                    
 

                               


        
// TMW2 Script
// Author:
//    Jesusalva
// Description:
//  Sells and crafts jewels
//
// Notes:
//  Gold Ore (dropped by bifs) → Pieces or Ingot, depends on what you want to forge
//  Jeweler only works with Gold PIECES. The Ingots are for forges.

003-5,33,37,0	script	Jeweler	NPC_FEMALE,{
    mesn;
    mesq l("Hello!");
    goto L_Menu;

L_Menu:
    mes "";
    mesn strcharinfo(0);
    menu
        l("I want to shop."), -,
        l("I want to craft rings."), L_Craft,
        l("Nothing, sorry."), L_Close;

    openshop;
    closedialog;
    close;

L_Craft:
    mes "";
    mesn;
    mesq l("Of course, you can trade a couple of @@ for a @@.", getitemlink(GoldPieces), getitemlink(GoldenRing));
    next;
    menu
        rif(countitem(GoldPieces) >= 2, l("")), -,
        l("...I'll be back later."), L_Close;

    inventoryplace GoldenRing, 1;
    delitem GoldPieces, 2;
    getitem GoldenRing, 1;
    getexp 100, 25;
    mes "";
    mesn;
    mesq l("Here you go! Anything else?");
    next;
    goto L_Menu;

L_Close:
    closedialog;
    goodbye;
    end;

OnInit:
    .@npcId = getnpcid(0, .name$);
    setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
    setunitdata(.@npcId, UDT_HEADMIDDLE, VneckJumper);
    setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
    setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots
    setunitdata(.@npcId, UDT_HAIRSTYLE, 3);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 8);
    npcsit;

    .sex = G_FEMALE;
    .distance = 5;

    tradertype(NST_ZENY);
    sellitem WeddingRing, 5000;
    end;

}