summaryrefslogtreecommitdiff
path: root/npc/003-1/well.txt
blob: c7e2722136255de8c9b72b34032903fdf893d79e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Author:
//    Saulc

003-1,45,80,0	script	Well	NPC_NO_SPRITE,{

    .Item1 = IronOre; //7
    .GP = 8500;
    .ItemCreate = IronIngot;

    function quest_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 && Zeny >= 8500 * .amount)
        {
            delitem .Item1, .amount * 7;
            Zeny = Zeny - .amount * .GP;
            getitem .ItemCreate, .amount;
            close;
        }
        speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                l("You don't have enough ore.");
        close;
        
    }

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

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

        switch (@menu)
        {
            case 1:
                quest_create;
                break;
        }
    } while (@menu != 2);

    closedialog;
    goodbye;
    close;

OnInit:
    .sex = G_MALE;
    .distance = 3;
    end;
}