summaryrefslogtreecommitdiff
path: root/npc/re/merchants/blessed_refiner.txt
blob: 33005dca9520a412bbba71711ffbabe01001f2af (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
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
//================= Hercules Script =======================================
//=       _   _                     _
//=      | | | |                   | |
//=      | |_| | ___ _ __ ___ _   _| | ___  ___
//=      |  _  |/ _ \ '__/ __| | | | |/ _ \/ __|
//=      | | | |  __/ | | (__| |_| | |  __/\__ \
//=      \_| |_/\___|_|  \___|\__,_|_|\___||___/
//================= License ===============================================
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
//= Copyright (C) 2012-2015  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/>.
//=========================================================================
//= Blessed Refiner
//================= Description ===========================================
//= Refiners that use Blessed ores to refine equipment.
//================= Additional Comments ===================================
//= Upon failure, the equipment is not destroyed. The success rate is
//= identical to that for Enriched ores.
//= - "Blacksmith Dister" only refines from +6~12.
//= NOTE: This NPC is currently disabled on official servers.
//================= Current Version =======================================
//= 1.0
//=========================================================================

-	script	::BlacksmithDister	FAKE_NPC,{
	disable_items;
	mes "[Blacksmith Dister]";
	mes "In this highly competitive society, we must be different in order to survive!";
	mes "I only refine equipment at the +6 ~ 12 levels.";
	next;
	mes "[Blacksmith Dister]";
	mes "I will need ^ff9999Blessed Weapon Ore^000000 for weapons, and ^ff9999Blessed Armor Ore^000000 for armors.";
	mes "Failed refines ^FF0000will not break or reduce the refine level^000000.";
	next;
	mes "[Blacksmith Dister]";
	mes "How about it? 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 "[Blacksmith Dister]";
		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 weird smell 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 Dister]";
		mes "This item cannot be refined.";
		close;
	}
	.@equip_refine = getequiprefinerycnt(.@part);
	if (.@equip_refine < 6 || .@equip_refine > 12) {
		mes "[Blacksmith Dister]";
		mes "This equipment has refined to "+.@equip_refine+". I only handle items with refine levels from +6 to +12!";
		close;
	}
	.@equip_lv = getequipweaponlv(.@part);
	switch(.@equip_lv) {
	default:
	case 0:
		.@price = 20000;
		.@material = 6439; //Unbreakable_Def
		.@type$ = "Armor";
		break;
	case 1:
		.@price = 1000;
		.@material = 6438; //Unbreakable_Weap
		.@type$ = "Weapon";
		break;
	case 2:
		.@price = 2000;
		.@material = 6438; //Unbreakable_Weap
		.@type$ = "Weapon";
		break;
	case 3:
		.@price = 20000;
		.@material = 6438; //Unbreakable_Weap
		.@type$ = "Weapon";
		break;
	case 4:
		.@price = 40000;
		.@material = 6438; //Unbreakable_Weap
		.@type$ = "Weapon";
		break;
	}
	.@ore$ = "^ff9999Blessed "+.@type$+" Ore^000000";
	mes "[Blacksmith Dister]";
	mes "This "+.@type$+" has been refined to "+.@equip_refine+". To refine it, I need "+.@ore$+" and a "+(.@price/1000)+",000 zeny refining fee.";
	mes "Do you want to proceed?";
	next;
	if(select("Yes:No") == 2) {
		mes "[Blacksmith Dister]";
		mes "I am busy, don't joke with me!";
		close;
	}
	if (getequippercentrefinery(.@part) < 100) {
		mes "[Blacksmith Dister]";
		mes "This "+.@type$+" has been refined many times. Although it will not disappear upon failure, the "+.@ore$+" will disappear!";
		next;
		mes "[Blacksmith Dister]";
		mes "Of course, the refining fee will not be returned! Do you want to continue?";
		next;
		if(select("Yes:No") == 2) {
			mes "[Blacksmith Dister]";
			mes "Good. I'd be sad if it failed, too.";
			close;
		}
	}
	if (countitem(.@material) == 0 || Zeny < .@price) {
		mes "[Blacksmith Dister]";
		mes "Materials insufficient.";
		mes "To refine "+((.@equip_lv)?"a level "+.@equip_lv+" weapon":"armor")+", I need "+.@ore$+" and a "+(.@price/1000)+",000 zeny refining fee.";
		close;
	}
	delitem .@material,1;
	Zeny -= .@price;
	mes "[Blacksmith Dister]";
	mes "Tac! Tac! Tac!";
	if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {
		specialeffect EF_BLESSING;
		successrefitem .@part;
		next;
		mes "[Blacksmith Dister]";
		mes "Hahahahahaha!!!";
		next;
		mes "[Blacksmith Dister]";
		mes "Refine was a huge success~ Hahaha!";
		close;
	}
	specialeffect EF_CURSEATTACK;
	specialeffect2 EF_SUI_EXPLOSION;
	next;
	emotion (!rand(5))?e_ag:e_omg;
	mes "[Blacksmith Dister]";
	mes "Oh my goodness!!!!";
	next;
	mes "[Blacksmith Dister]";
	mes "Oh! Although it was blessed by "+.@ore$+" to retain the equipment...";
	next;
	mes "[Blacksmith Dister]";
	mes "My mood is worse when I fail!!";
	close;
}
prt_in,52,56,3	duplicate(BlacksmithDister)	Blacksmith Dister#prt	4_M_DWARF
payon,148,172,3	duplicate(BlacksmithDister)	Blacksmith Dister#pay	4_M_DWARF
alberta_in,20,56,3	duplicate(BlacksmithDister)	Blacksmith Dister#alb	4_M_DWARF
yuno_in01,175,18,3	duplicate(BlacksmithDister)	Blacksmith Dister#yuno	4_M_DWARF
ein_in01,26,82,3	duplicate(BlacksmithDister)	Blacksmith Dister#ein	4_M_DWARF
lhz_in02,280,15,3	duplicate(BlacksmithDister)	Blacksmith Dister#lhz	4_M_DWARF