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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
// TMW2 scripts.
// Author:
// Crazyfefe
// Saulc
// Jesusalva
// Description:
// Jhedia takes care of Tulimshar forge and makes ingots
003-8,28,30,0 script Jhedia NPC_ELVEN_FEMALE,{
// ingot_create( BaseItem, PrizeItem, Amount, Amount_Coal, Price )
function ingot_create {
.@basei=getarg(0);
.@prize=getarg(1);
.@amoun=getarg(2);
.@coalm=getarg(3);
.@price=getarg(4);
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("How many ingots do you want to make?");
input .@amount;
if (countitem(.@basei) >= .@amount * .@amoun && countitem(Coal) >= .@amount * .@coalm && Zeny >= .@price * .@amount) {
inventoryplace .@prize, .@amount;
delitem .@basei, .@amount * .@amoun;
delitem Coal, .@amount * .@coalm;
Zeny = Zeny - .@amount * .@price;
getitem .@prize, .@amount;
mes "";
mesn;
mesq l("Many thanks! Come back soon.");
close;
}
speech S_FIRST_BLANK_LINE,// | S_LAST_NEXT,
l("You don't have enough material, sorry.");
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:
.@price=8500; // Bad, duplicate
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(IronIngot),getitemlink(IronOre),getitemlink(Coal),.@price);
//.@karim = getq(Karim_Quest);
select
l("Yes"),
menuaction(l("Quit"));
switch (@menu) {
case 1:
ingot_create(IronOre, IronIngot, 7, 11, 8500);
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;
}
|