summaryrefslogblamecommitdiff
path: root/npc/003-8/jhedia.txt
blob: 03864ea6ca3f6b3e671c187b6524dfa2dfb39e1a (plain) (tree)
1
2
3
4
5
6
7

                

                 
                                                           
 
                                                  





                            
                          

                                                      
                      
 
                                                                                                                
         



                                         

                  

                                                     



              







                                                                                                                                            
                                            
                                                                                                                                                               
 



                                  
 







                     

        



                


               
       






























































                               
 



                  
// TMW2 scripts.
// Author:
//	Crazyfefe
//	Saulc	
// Note: script works, but one may argue it is not complete

003-8,28,30,0	script	Jhedia	NPC_ELVEN_FEMALE,{

    .Item1 = IronOre; //7
    .Item2 = Coal; //11
    .GP = 8500;
    .ItemCreate = IronIngot;

    function iron_create {
        speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
            l("How many ingots do you want to make?");
        input @amount;

        if (countitem("Iron Ore") >= @amount * 7 && countitem("Coal") >= @amount * 11 && Zeny >= 8500 * @amount)
        {
            delitem .Item1, @amount * 7;
            delitem .Item2, @amount * 11;
            Zeny = Zeny - @amount * .GP;
            getitem .ItemCreate, @amount;
            close;
        }
        speech S_FIRST_BLANK_LINE,// | S_LAST_NEXT,
                l("You don't have enough material.");
        close;
        
    }

    mesn;
    mesq l("Hello! I am @@, and I take care of Tulimshar forge. I usually make ingots from various materials. So, what do you want today?");
    next;
    menu
        l("Iron Ingots"), L_Iron,
        l("Nothing, thanks."), L_Close;

L_Iron:
    speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
        l("Hello! Do you want to craft @@? For that I will need 7 @@, 11 @@ and @@ gp.", getitemlink(.ItemCreate),getitemlink(.Item1),getitemlink(.Item2),.GP);

    //.@karim = getq(Karim_Quest);
    select
        l("Yes"),
        menuaction(l("Quit"));

    switch (@menu) {
    case 1:
        iron_create;
        break;
    default:
        goto L_Close;
        break;
    }

L_Close:
    closedialog;
    goodbye;
    close;

OnTimer1000:
    domovestep;

OnInit:
    initpath "move", 28, 30,//C
             "dir", DOWN, 0,
             "wait", 70, 0,
             "move", 35, 28,//D
             "dir", DOWN, 0,
             "wait", 10, 0,
             "move", 30, 29,//B
             "dir", UP, 0,
             "wait", 4, 0,
             "move", 36, 36,//H
             "dir", LEFT, 0,
             "wait", 2, 0,
             "move", 27, 29,//A
             "dir", UP, 0,
             "wait", 10, 0,
             "move", 30, 34,//K
             "dir", UP, 0,
             "wait", 13, 0,
             "move", 27, 29,//A
             "dir", UP, 0,
             "wait", 14, 0,
             "move", 39, 31,//G
             "dir", UP, 0,
             "wait", 25, 0,
             "move", 30, 29,//B
             "dir", UP, 0,
             "wait", 11, 0,
             "move", 26, 42,//M
             "dir", UP, 0,
             "wait", 8, 0,
             "move", 30, 29,//B
             "dir", UP, 0,
             "wait", 7, 0,
             "move", 39, 36,//I
             "dir", RIGHT, 0,
             "wait", 2, 0,
             "move", 35, 31,//F
             "dir", UP, 0,
             "wait", 1, 0,
             "move", 27, 29,//A
             "dir", UP, 0,
             "wait", 15, 0,
             "move", 29, 38,//L
             "dir", DOWN, 0,
             "wait", 21, 0,
             "move", 30, 29,//B
             "dir", UP, 0,
             "wait", 10, 0,
             "move", 39, 28,//E
             "dir", DOWN, 0,
             "wait", 13, 0,
             "move", 28, 34,//J
             "dir", UP, 0,
             "wait", 10, 0,
             "move", 30, 29,//B
             "dir", UP, 0,
             "wait", 1, 0,
             "move", 29, 42,//N
             "dir", UP, 0,
             "wait", 16, 0,
             "move", 27, 29,//A
             "dir", UP, 0,
             "wait", 6, 0;

    initialmove;
    initnpctimer;
    .distance = 5;
}