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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
|
//================= Hercules Script =======================================
//= _ _ _
//= | | | | | |
//= | |_| | ___ _ __ ___ _ _| | ___ ___
//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
//= | | | | __/ | | (__| |_| | | __/\__ \
//= \_| |_/\___|_| \___|\__,_|_|\___||___/
//================= License ===============================================
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
//= Copyright (C) 2012-2020 Hercules Dev Team
//= Copyright (C) Euphy
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
//= the Free Software Foundation, either version 3 of the License, or
//= (at your option) any later version.
//=
//= This program is distributed in the hope that it will be useful,
//= but WITHOUT ANY WARRANTY; without even the implied warranty of
//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//= GNU General Public License for more details.
//=
//= You should have received a copy of the GNU General Public License
//= along with this program. If not, see <http://www.gnu.org/licenses/>.
//=========================================================================
//= HD Refiners
//================= Description ===========================================
//= Refiners that use HD ores to refine equipment.
//================= Additional Comments ===================================
//= Upon failure, the equipment is not destroyed; rather, its refine level
//= decreases by 1. The success rate is identical to that for Enriched ores.
//= - "Blacksmith Mighty Hammer" only refines from +7~9.
//= - "Basta" only refines from +10 and up.
//================= Current Version =======================================
//= 1.0
//=========================================================================
//== Blacksmith Mighty Hammer (+7~9) =======================
- script ::MightyHammer#re FAKE_NPC,{
mes("[Blacksmith Mighty Hammer]");
mes("I'm a blacksmith skilled in refining weapons and armors.");
mes("I can refine an item of your choice among the items you are equipped with.");
mes("Which item do you want to refine?");
if (getbattleflag("features/replace_refine_npcs") == 1) {
if (openrefineryui())
close();
}
next();
disable_items;
mes "[Blacksmith Mighty Hammer]";
mes "Unlike others, I am a blacksmith who refines a very limited number of items.";
mes "I refine only items that are ^CC0000+7 to +9^000000.";
next;
mes "[Blacksmith Mighty Hammer]";
mes "My specialty is that even if my refining fails, the refine level decreases by 1 without losing the gear. Isn't it great?";
next;
mes "[Blacksmith Mighty Hammer]";
mes "So lets kick this into overdrive, what d' ya say? What item do you want to refine?";
next;
setarray .@position$[1],"Head","Body","Left Hand","Right Hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
.@menu$ = "";
for(.@i = 1; .@i<=10; ++.@i)
.@menu$ += ((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Not equipped]")+":";
.@part = select(.@menu$);
if (!getequipisequiped(.@part)) {
mes "[Blacksmith Mighty Hammer]";
switch(.@part) {
case 1:
mes "I'm a blacksmith, not a hairstylist.";
break;
case 2:
mes "With my hammer, I will make you a star of the sky.";
break;
case 3:
case 4:
mes "Making artificial hands is not my specialty.";
break;
case 5:
mes "Bring out the item so I can refine it!";
break;
case 6:
mes "Where is this foot odor coming from?";
break;
case 7:
case 8:
mes "Where is the accessory?";
break;
case 9:
mes "What do you want me to refine?";
break;
case 10:
mes "Huh? What do you want me to do?";
break;
}
close;
}
if (!getequipisenableref(.@part)) {
mes "[Blacksmith Mighty Hammer]";
mes "This item can't be refined.";
close;
}
if (getequiprefinerycnt(.@part) < 7 || getequiprefinerycnt(.@part) > 9) {
mes "[Blacksmith Mighty Hammer]";
mes "I only handle items with refine levels from +7 to +9.";
close;
}
switch(getequipweaponlv(.@part)) {
default:
case 0:
.@price = 20000;
.@material = 6241; //HD_Elunium
break;
case 1:
case 2:
case 3:
case 4:
.@price = 20000;
.@material = 6240; //HD_Oridecon
break;
}
mes "[Blacksmith Mighty Hammer]";
mes "In order to refine the gear you selected you need ^ff9999"+getitemname(.@material)+"^000000 and 20,000 zeny as a fee.";
mes "Do you have them ready?";
next;
if(select("Yes", "No") == 2) {
mes "[Blacksmith Mighty Hammer]";
mes "I will wait until you are ready.";
close;
}
if (getequippercentrefinery(.@part) < 100) {
mes "[Blacksmith Mighty Hammer]";
mes "It looks like this item will likely fail to be refined.";
mes "Well, even if it fails, it only decreases by 1 refine level.";
mes "Would you like to continue refining?";
next;
if(select("Yes", "No") == 2) {
mes "[Blacksmith Mighty Hammer]";
mes "Only those who overcome fear of failure will obtain a masterpiece.";
close;
}
}
if (countitem(.@material) == 0 || Zeny < .@price) {
mes "[Blacksmith Mighty Hammer]";
mes "Didn't you just say you had everything ready?";
close;
}
delitem .@material,1;
Zeny -= .@price;
mes "[Blacksmith Mighty Hammer]";
mes "Tac! Tac! Tac!";
if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {
successrefitem .@part;
next;
emotion e_no1;
mes "[Blacksmith Mighty Hammer]";
mes "The sound refreshes my mind everytime I hear it.";
mes "Here, have it. Refine succeeded flawlessly!";
close;
}
downrefitem .@part;
next;
emotion e_omg;
mes "[Blacksmith Mighty Hammer]";
mes "Oops!!";
next;
mes "[Blacksmith Mighty Hammer]";
mes "I am sure a person like you would never blame me for a decrease in refine level by 1. Hmm.";
close;
}
prt_in,59,54,3 duplicate(MightyHammer#re) Mighty Hammer#prtre 4_M_DWARF
morocc_in,65,30,3 duplicate(MightyHammer#re) Mighty Hammer#moroccre 4_M_DWARF
payon,148,176,3 duplicate(MightyHammer#re) Mighty Hammer#payre 4_M_DWARF
alberta_in,16,56,3 duplicate(MightyHammer#re) Mighty Hammer#albre 4_M_DWARF
yuno_in01,171,18,3 duplicate(MightyHammer#re) Mighty Hammer#yunore 4_M_DWARF
ein_in01,22,82,3 duplicate(MightyHammer#re) Mighty Hammer#einre 4_M_DWARF
lhz_in02,280,19,3 duplicate(MightyHammer#re) Mighty Hammer#lhzre 4_M_DWARF
//- iRO NPC locations -
//moc_para01,38,185,4 duplicate(MightyHammer#re) Mighty Hammer#edre 4_M_DWARF
//payon,174,133,4 duplicate(MightyHammer#re) Mighty Hammer#imre 4_M_DWARF
//== Basta (+10 and up) ====================================
- script ::Basta#re FAKE_NPC,{
disable_items;
mes "[Basta]";
mes "I'm the best Blacksmith in the whole world, Basta.";
mes "But I don't provide a normal refine service.";
mes "I only refine equipment ^CC0000over +10^000000.";
next;
mes "[Basta]";
mes "Which equipment do you want to refine?";
next;
setarray .@position$[1],"Head","Body","Left Hand","Right Hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
.@menu$ = "";
for(.@i = 1; .@i<=10; ++.@i)
.@menu$ += ((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Unequipped]")+":";
.@part = select(.@menu$);
if (!getequipisequiped(.@part)) {
mes "[Basta]";
switch(.@part) {
case 1:
mes "Is your head an equipment?";
break;
case 2:
mes "What do you want me to do?";
break;
case 3:
case 4:
mes "Making artificial hands is not my specialty.";
break;
case 5:
mes "Do you even know what a robe is?";
break;
case 6:
mes "If you want to refine your feet, don't come to me, try running a marathon.";
break;
case 7:
case 8:
mes "Where is the accessory?";
break;
case 9:
mes "Well... I don't see any equipment worth refining.";
break;
case 10:
mes "I can't make you smart. Go see a school teacher for that.";
break;
}
close;
}
if (!getequipisenableref(.@part)) {
mes "[Basta]";
mes "Even I cannot refine this item. There's no way.";
close;
}
if (getequiprefinerycnt(.@part) < 10) {
mes "[Basta]";
mes "Haven't I told you? I only refine equipments that are +10 and above.";
close;
}
if (getequiprefinerycnt(.@part) == 20) {
mes "[Basta]";
mes "This weapon is perfect, no need to refine it anymore~";
close;
}
switch(getequipweaponlv(.@part)) {
default:
case 0:
.@price = 100000;
.@material = 6225; //HD_Carnium
.@type$ = "armor";
break;
case 1:
case 2:
case 3:
case 4:
.@price = 100000;
.@material = 6226; //HD_Bradium
.@type$ = "weapon";
break;
}
mes "[Basta]";
mes "Hmm... is this the one you want to refine?";
mes "To refine this equipment, I need 1 ^ff9999"+getitemname(.@material)+"^000000 and 100,000 zeny as a fee.";
mes "Do you really want to refine this?";
next;
if(select("Yes", "No") == 2) {
mes "[Basta]";
mes "Okay. If that's what you want...";
close;
}
if (getequippercentrefinery(.@part) < 100) {
mes "[Basta]";
mes "This "+.@type$+" has already been refined pretty high.";
mes "If you try to refine it more, the refine level could decrease.";
next;
mes "[Basta]";
mes "I am different from the blacksmiths in others places.";
mes "It is impossible that the refine level will drop by, say, 3 or 4... that sounds scary.";
mes "Here it can only decrease by 1 level.";
next;
mes "[Basta]";
mes "Compared to other blacksmiths, the risk is smaller.";
mes "I've given all precautions. Do you want to try it?";
next;
if(select("Yes", "No") == 2) {
mes "[Basta]";
mes "Well~";
mes "Not challenging at all could also be a kind of wisdom in life.";
close;
}
}
if (countitem(.@material) == 0 || Zeny < .@price) {
mes "[Basta]";
mes "Hmm... You didn't bring all the materials needed.";
mes "Come back when you have them all.";
close;
}
delitem .@material,1;
Zeny -= .@price;
mes "Pow! Pow! Pow! Pow!";
if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {
successrefitem .@part;
next;
emotion e_no1;
mes "[Basta]";
mes "Great! Nicely done!!";
mes "I really am the best blacksmith in the whole wide world!";
close;
}
downrefitem .@part;
next;
emotion (!rand(5))?e_cash:e_omg;
mes "[Basta]";
mes "Aaaaaaaaaaak!!!";
next;
mes "[Basta]";
mes "Damn it!";
mes "Refining failed and refine level has decreased!";
mes "Even the best blacksmith in the world doesn't guarantee 100% success!";
mes "Too bad.";
next;
mes "[Basta]";
mes "I'll do better next time! Don't worry!";
close;
}
prt_in,57,54,3 duplicate(Basta#re) Basta#prtre 4_M_DWARF
morocc_in,68,30,3 duplicate(Basta#re) Basta#moroccre 4_M_DWARF
payon,148,174,3 duplicate(Basta#re) Basta#payonre 4_M_DWARF
alberta_in,18,56,3 duplicate(Basta#re) Basta#albertare 4_M_DWARF
yuno_in01,173,18,3 duplicate(Basta#re) Basta#yunore 4_M_DWARF
ein_in01,24,82,3 duplicate(Basta#re) Basta#einbrochre 4_M_DWARF
lhz_in02,280,17,3 duplicate(Basta#re) Basta#lighthalzenre 4_M_DWARF
|