summaryrefslogtreecommitdiff
path: root/npc/re/merchants/refine.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/re/merchants/refine.txt')
-rw-r--r--npc/re/merchants/refine.txt574
1 files changed, 315 insertions, 259 deletions
diff --git a/npc/re/merchants/refine.txt b/npc/re/merchants/refine.txt
index 27a09fce7..db57a1d5d 100644
--- a/npc/re/merchants/refine.txt
+++ b/npc/re/merchants/refine.txt
@@ -3,28 +3,30 @@
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 1.0a
-//===== Compatible With: =====================================
-//= Hercules
+//= 1.3
//===== Description: =========================================
//= Renewal-specific refining NPCs and material merchants.
//===== Additional Comments: =================================
//= 1.0 Moved some scripts to Renewal file, optimized "Austry" NPC. [Euphy]
//= 1.0a Added 'disable_items' command. [Euphy]
+//= 1.1 Added Malangdo Refiner "Clink". [Euphy]
+//= 1.2 Added official success calculation, thanks to Helvetica.
+//= The safe/multiple refine feature is now functional. [Euphy]
+//= 1.3 Updated to match the latest official script. [Euphy]
//============================================================
// +11 and above Refiners
//============================================================
-prt_in,90,72,5 script Bestry#prt 826,{
- callfunc "refinenew","Bestry",0,0;
+prt_in,90,72,5 script Vestri#prt 4_M_DWARF,{
+ callfunc "refinenew","Vestri",0;
end;
}
-morocc_in,64,41,5 script Bestry#moc 826,{
- callfunc "refinenew","Bestry",0,0;
+morocc_in,64,41,5 script Vestri#moc 4_M_DWARF,{
+ callfunc "refinenew","Vestri",0;
end;
}
-payon_in01,18,132,3 script Bestry#pay 826,{
- callfunc "refinenew","Bestry",0,0;
+payon_in01,18,132,3 script Vestri#pay 4_M_DWARF,{
+ callfunc "refinenew","Vestri",0;
end;
}
@@ -36,32 +38,38 @@ payon_in01,18,132,3 script Bestry#pay 826,{
//= If you enable this function, be sure to edit the value of
//= .@safe to the max safe refine in refine_db.txt as well.
//=
-//= The official script uses a command which seems to generate a
-//= random result upon refining: success, downgrade, or failure.
-//= To enable that feature, set the third argument to '1' in the
-//= function call. Otherwise, the chance in refine_db.txt is used.
+//= On official servers, if an item is unsuccessfully refined
+//= it will break at a 20% rate and downgrade at an 80% rate.
//============================================================
function script refinenew {
disable_items;
mes "["+ getarg(0) +"]";
- mes "I am the best Blacksmith ever!";
- mes "I don't work with normal, boring items.";
- mes "But only with items that are level 10 or higher!";
+ mes "I am the best Armsmith ever!";
+ mes "I don't refine normal, boring items.";
+ mes "I only refine items that are Level 10 or higher.";
next;
mes "["+ getarg(0) +"]";
- mes "Anyway, you may use my services if your item is lv 10 or higher.";
- mes "What do you want to have refined?";
+ mes "Anyway, you may use my services if your item is Level 10 or higher.";
+ mes "What do you want me to refine?";
next;
setarray .@position$[1],"Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
set .@menu$,"";
for(set .@i,1; .@i<=10; set .@i,.@i+1) {
- if(getequipisequiped(.@i))
+ if (getequipisequiped(.@i)) {
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
+ set .@equipped,1;
+ }
set .@menu$, .@menu$ + ":";
}
- set .@part,select(.@menu$);
- if(!getequipisequiped(.@part)) {
+ if (.@equipped == 0) {
+ mes "[" + getarg(0) + "]";
+ mes "I don't think I can refine any items you have...";
+ close;
+ }
+ set .@part, select(.@menu$);
+
+ if (!getequipisequiped(.@part)) { //custom check
mes "[" + getarg(0) + "]";
mes "You're not wearing";
mes "anything there that";
@@ -69,30 +77,18 @@ function script refinenew {
emotion e_an;
close;
}
- //Check if the item is refinable...
- if(!getequipisenableref(.@part)) {
+ if (!getequipisenableref(.@part)) {
mes "[" + getarg(0) + "]";
mes "I don't think I can";
mes "refine this item at all...";
close;
}
- //Check if the item is identified... (Don't know why this is in here... but kept it anyway)
- if(!getequipisidentify(.@part)) {
- mes "[" + getarg(0) + "]";
- mes "You can't refine this";
- mes "if you haven't appraised";
- mes "it first. Make sure your";
- mes "stuff is identified before";
- mes "I can refine it.";
- close;
- }
- //Check to see if the items is at least +10
- if(getequiprefinerycnt(.@part) < 10) {
+ if (getequiprefinerycnt(.@part) < 10) {
mes "["+ getarg(0) +"]";
- mes "I said I don't work with Equipment under lv. 10.";
+ mes "I said I don't work with items that are lower than Level 10.";
close;
}
- if(getequiprefinerycnt(.@part) >= 20) {
+ if (getequiprefinerycnt(.@part) >= 20) { //custom check
mes "["+ getarg(0) +"]";
mes "I can't refine this";
mes "any more. This is as";
@@ -102,76 +98,74 @@ function script refinenew {
set .@refineitemid, getequipid(.@part); // save id of the item
set .@refinerycnt, getequiprefinerycnt(.@part); //save refinery count
if ((getequipweaponlv(.@part) >= 1) && (getequipweaponlv(.@part) <= 4)) {
- set .@material,6224;
+ set .@type$,"weapon";
+ set .@material,6224; //Bradium
set .@price,100000;
- set .@safe,10;
+ switch(getequipweaponlv(.@part)) {
+ case 1: set .@safe,10; break;
+ case 2: set .@safe,10; break;
+ case 3: set .@safe,10; break;
+ case 4: set .@safe,10; break;
+ }
mes "["+ getarg(0) +"]";
mes "Hmm a weapon, is that ok?";
mes "If you want to refine this weapon,";
mes "I will need 1 ^003366Bradium^000000 and 100,000 zeny.";
- mes "Are you sure you want to continue?";
} else {
- set .@material,6223;
+ set .@type$,"armor";
+ set .@material,6223; //Carnium
set .@price,100000;
set .@safe,10;
mes "["+ getarg(0) +"]";
mes "Hmm an armor, is that ok?";
mes "If you want to refine this armor,";
mes "I will need 1 ^003366Carnium^000000 and 100,000 zeny.";
- mes "Are you sure you want to continue?";
}
+ mes "Are you sure you want to continue?";
next;
if(select("Yes:No") == 2){
mes "["+ getarg(0) +"]";
- mes "Well, no challenge is one way...";
- mes "No risk... that could be wise.";
+ mes "Hm... if you mind... never mind...";
close;
}
- if(getarg(1) != 1) {
- if ((getequipweaponlv(.@part) >= 1) && (getequipweaponlv(.@part) <= 4)) {
+ if (getarg(1) != 1) {
+ if (getequippercentrefinery(.@part) < 100) {
mes "["+ getarg(0) +"]";
- mes "This weapon already has been refined serveral times.";
- mes "It could be destroyed if you try more.";
- mes "It won't break 100%, but is has a small chance.";
+ mes "This "+.@type$+" already has been refined serveral times.";
+ mes "It could be destroyed if I try again.";
+ mes "It won't break for sure, but there is has a small chance.";
next;
mes "["+ getarg(0) +"]";
- mes "You could have the upgrade level of the weapon decreased,";
+ mes "You could be ^FF0000lowering the upgrade level^000000 of the "+.@type$+",";
mes "or if it breaks, you will lose ^FF0000any cards^000000 or special properties added to it.";
- } else {
- mes "["+ getarg(0) +"]";
- mes "This armor already has been refined serveral times.";
- mes "It could be destroyed if you try more.";
- mes "It won't break 100%, but is has a small chance.";
next;
mes "["+ getarg(0) +"]";
- mes "You could have the upgrade level of the armor decreased,";
- mes "or if it breaks, you will lose ^FF0000any cards^000000 or special properties added to it.";
- }
- next;
- mes "["+ getarg(0) +"]";
- mes "Do you want me to refine it?";
- mes "I think I gave you enough warnings.";
- next;
- if(select("Yes.:No.") == 2) {
- mes "["+ getarg(0) +"]";
- mes "Well, no challenge is one way..";
- mes "No risk.. that could be wise.";
- close;
+ mes "Do you still want me to refine it?";
+ mes "I think I have given you enough warning.";
+ next;
+ if(select("Yes.:No.") == 2) {
+ mes "["+ getarg(0) +"]";
+ mes "Well, no challenge is one way to go...";
+ mes "No risk... that could be wise.";
+ close;
+ }
}
- if(countitem(.@material) < 1 || Zeny < .@price) {
+ if (countitem(.@material) < 1 || Zeny < .@price) {
mes "["+ getarg(0) +"]";
- mes "Hm, it seems you don't have enough materials or money.";
- mes "Please check it out.";
+ mes "Hm. You don't seem to have enough money or "+getitemname(.@material)+".";
+ mes "Please come back when you have them.";
close;
}
- set Zeny,Zeny - .@price;
+ Zeny -= .@price;
delitem .@material,1;
- if(getequipisequiped(.@part) == 0) { // hacker has removed the item (not changed, why?)
+
+ //custom checks
+ if (getequipisequiped(.@part) == 0) { // hacker has removed the item (not changed, why?)
mes "[" + getarg(0) + "]";
mes "Look here... you don't have any items on...";
close;
}
- if(getequiprefinerycnt(.@part) != .@refinerycnt || getequipid(.@part) != .@refineitemid) { // hacker has changed the item
+ if (getequiprefinerycnt(.@part) != .@refinerycnt || getequipid(.@part) != .@refineitemid) { // hacker has changed the item
mes "[" + getarg(0) + "]";
emotion e_an;
mes "Wait a second...";
@@ -179,105 +173,52 @@ function script refinenew {
mes "You switched the item while I wasn't looking! Get out of here!";
close;
}
- if(getarg(2) == 1){
- set .@rand,rand(1,3);
- if (.@rand == 1) {
- mes "Clang! Clang! Clang! Clang!";
- successrefitem .@part;
- next;
- emotion e_no1;
- mes "["+ getarg(0) +"]";
- mes "Good! Succes!!!";
- mes "I am the best Blacksmith.";
- close;
- }
- if (.@rand == 2) {
+
+ if (getequippercentrefinery(.@part) > rand(100)) {
+ mes "Clang! Clang! Clang! Clang!";
+ successrefitem .@part;
+ next;
+ emotion e_no1;
+ mes "["+ getarg(0) +"]";
+ mes "Good! Succes!!!";
+ mes "I am the best Armsmith.";
+ close;
+ } else {
+ if (rand(100) < 80) {
mes "["+ getarg(0) +"]";
mes "Clang! Clang! Clang! Clang!";
- downrefitem .@part;
+ downrefitem .@part, 3; // Failed refine attempts decrease the item's refine level by 3
next;
emotion (!rand(5))?e_cash:e_omg;
mes "["+ getarg(0) +"]";
mes "Ahhh!!!";
next;
mes "["+ getarg(0) +"]";
- mes "Oh my!";
+ mes "Oh my god!";
mes "The upgrade level has dropped...";
- mes "There could've been made an mistake even though I am the best ever.";
- mes "It was out of my hands.";
+ } else {
+ mes "["+ getarg(0) +"]";
+ mes "Clang! Clang! Clang!";
+ failedrefitem .@part;
next;
+ emotion (!rand(5))?e_cash:e_omg;
mes "["+ getarg(0) +"]";
- mes "I will do a better job next time! Don't worry!";
- close;
+ mes "Hmmm!";
+ next;
+ mes "["+ getarg(0) +"]";
+ mes "Oh my! I've failed to refine stuff...";
+ mes "I didn't mean it!";
}
- mes "["+ getarg(0) +"]";
- mes "Clang! Clang! Clang!";
- failedrefitem .@part;
- next;
- emotion (!rand(5))?e_cash:e_omg;
- mes "["+ getarg(0) +"]";
- mes "Hmmm!";
- next;
- mes "["+ getarg(0) +"]";
- mes "Oh my! I've failed to refine stuff...";
- mes "I didn't mean it!";
- mes "There could've been made an mistake even though I am the best ever.";
- mes "It was out of my hands.";
- next;
- mes "["+ getarg(0) +"]";
- mes "I will do a better job next time! Don't worry!";
- close;
- }
- set .@rand,rand(100);
- if (getequippercentrefinery(.@part) > .@rand) {
- mes "Clang! Clang! Clang! Clang!";
- successrefitem .@part;
- next;
- emotion e_no1;
- mes "["+ getarg(0) +"]";
- mes "Good! Succes!!!";
- mes "I am the best Blacksmith.";
- close;
- }
- if (getequippercentrefinery(.@part) < .@rand) {
- mes "["+ getarg(0) +"]";
- mes "Clang! Clang! Clang! Clang!";
- downrefitem .@part;
- next;
- emotion (!rand(5))?e_cash:e_omg;
- mes "["+ getarg(0) +"]";
- mes "Ahhh!!!";
- next;
- mes "["+ getarg(0) +"]";
- mes "Oh my!";
- mes "The upgrade level has dropped...";
- mes "There could've been made an mistake even though I am the best ever.";
- mes "It was out of my hands.";
+ mes "I could have made a mistake even though I am the best Armsmith ever.";
+ mes "It just wasn't meant to be.";
next;
mes "["+ getarg(0) +"]";
mes "I will do a better job next time! Don't worry!";
close;
}
- mes "["+ getarg(0) +"]";
- mes "Clang! Clang! Clang!";
- failedrefitem .@part;
- next;
- emotion (!rand(5))?e_cash:e_omg;
- mes "["+ getarg(0) +"]";
- mes "Hmmm!";
- next;
- mes "["+ getarg(0) +"]";
- mes "Oh my! I've failed to refine stuff...";
- mes "I didn't mean it!";
- mes "There could've been made an mistake even though I am the best ever.";
- mes "It was out of my hands.";
- next;
- mes "["+ getarg(0) +"]";
- mes "I will do a better job next time! Don't worry!";
- close;
}
// New +11 and above Refining Functions ========================
- if(getequiprefinerycnt(.@part) < .@safe) {
+ if (getequiprefinerycnt(.@part) < .@safe) {
mes "[" + getarg(0) + "]";
mes "I can refine this to the safe limit or a desired number of times. It's your choice.";
next;
@@ -285,22 +226,21 @@ function script refinenew {
} else
set .@menu2,2;
switch(.@menu2){
- case 1:
+ case 1:
set .@refinecnt,.@safe - getequiprefinerycnt(.@part);
break;
case 2:
- next;
mes "[" + getarg(0) + "]";
mes "How many times would you like me to refine your item?";
next;
input .@refinecnt;
set .@refinecheck,.@refinecnt + getequiprefinerycnt(.@part);
- if (.@refinecnt < 1 || .@refinecheck > 10) {
+ if (.@refinecnt < 1 || .@refinecheck > 20) {
mes "[" + getarg(0) + "]";
mes "I can't refine this item that many times.";
close;
}
- if(.@refinecheck > .@safe) {
+ if (.@refinecheck > .@safe) {
set .@refinecheck,.@refinecheck - .@safe;
mes "[" + getarg(0) + "]";
mes "This will try to refine the equipment " + .@refinecheck + " times past the safe limit. Your equipment may be destroyed... is that ok?";
@@ -313,7 +253,6 @@ function script refinenew {
}
break;
case 3:
- next;
mes "[" + getarg(0) + "]";
mes "You said so... So be it.";
close;
@@ -322,17 +261,18 @@ function script refinenew {
mes "[" + getarg(0) + "]";
mes "That will cost you " + .@refinecnt + " " + getitemname(.@material) + " and " + .@fullprice + " Zeny. Is that ok?";
next;
- if(select("Yes","No...") == 2){
+ if(select("Yes:No...") == 2){
mes "[" + getarg(0) + "]";
mes "You said so... So be it.";
close;
}
- if(countitem(.@material) < .@refinecnt || Zeny < .@fullprice) {
+ if (countitem(.@material) < .@refinecnt || Zeny < .@fullprice) {
mes "[" + getarg(0) + "]";
- mes "Is that all you got? Unfortunately I can't work for you at a lower price. Try putting yourself in my shoes.";
+ mes "Hm. You don't seem to have enough money or "+getitemname(.@material)+".";
+ mes "Please come back when you have them.";
close;
}
- set Zeny,Zeny - .@fullprice;
+ Zeny -= .@fullprice;
delitem .@material,.@refinecnt;
while(.@refinecnt){
if (getequipisequiped(.@part) == 0) {
@@ -347,113 +287,64 @@ function script refinenew {
mes "Get out before I stun you with my Hammer!!";
close;
}
- if(getarg(2) == 1){
- set .@rand,rand(1,3);
- if (.@rand == 1) {
- mes "["+ getarg(0) +"]";
- mes "Clang! Clang! Clang! Clang!";
- successrefitem .@part;
- next;
- emotion e_no1;
- mes "["+ getarg(0) +"]";
- mes "Good! Succes!!!";
- mes "I am the best Blacksmith.";
- close;
- }
- if (.@rand == 2) {
+ if (getequippercentrefinery(.@part) > rand(100)) {
+ mes "Clang! Clang! Clang! Clang!";
+ successrefitem .@part;
+ set .@refinecnt,.@refinecnt - 1;
+ next;
+ } else {
+ if (rand(100) < 80) {
mes "["+ getarg(0) +"]";
mes "Clang! Clang! Clang! Clang!";
- downrefitem .@part;
+ downrefitem .@part, 3; // Failed refine attempts decrease the item's refine level by 3
next;
emotion (!rand(5))?e_cash:e_omg;
mes "["+ getarg(0) +"]";
mes "Ahhh!!!";
next;
mes "["+ getarg(0) +"]";
- mes "Oh my!";
+ mes "Oh my god!";
mes "The upgrade level has dropped...";
- mes "There could've been made an mistake even though I am the best ever.";
- mes "It was out of my hands.";
+ } else {
+ mes "["+ getarg(0) +"]";
+ mes "Clang! Clang! Clang!";
+ failedrefitem .@part;
next;
+ emotion (!rand(5))?e_cash:e_omg;
mes "["+ getarg(0) +"]";
- mes "I will do a better job next time! Don't worry!";
- close;
+ mes "Hmmm!";
+ next;
+ mes "["+ getarg(0) +"]";
+ mes "Oh my! I've failed to refine stuff...";
+ mes "I didn't mean it!";
}
- mes "["+ getarg(0) +"]";
- mes "Clang! Clang! Clang!";
- failedrefitem .@part;
- next;
- emotion (!rand(5))?e_cash:e_omg;
- mes "["+ getarg(0) +"]";
- mes "Hmmm!";
- next;
- mes "["+ getarg(0) +"]";
- mes "Oh my! I've failed to refine stuff...";
- mes "I didn't mean it!";
- mes "There could've been made an mistake even though I am the best ever.";
- mes "It was out of my hands.";
- next;
- mes "["+ getarg(0) +"]";
- mes "I will do a better job next time! Don't worry!";
- close;
- }
- set .@rand,rand(100);
- if (getequippercentrefinery(.@part) > .@rand) {
- mes "Clang! Clang! Clang! Clang!";
- successrefitem .@part;
- next;
- emotion e_no1;
- mes "["+ getarg(0) +"]";
- mes "Good! Succes!!!";
- mes "I am the best Blacksmith.";
- close;
- }
- if (getequippercentrefinery(.@part) < .@rand) {
- mes "["+ getarg(0) +"]";
- mes "Clang! Clang! Clang! Clang!";
- downrefitem .@part;
- next;
- emotion (!rand(5))?e_cash:e_omg;
- mes "["+ getarg(0) +"]";
- mes "Ahhh!!!";
- next;
- mes "["+ getarg(0) +"]";
- mes "Oh my!";
- mes "The upgrade level has dropped...";
- mes "There could've been made an mistake even though I am the best ever.";
- mes "It was out of my hands.";
+ mes "I could have made a mistake even though I am the best Armsmith ever.";
+ mes "It just wasn't meant to be.";
next;
mes "["+ getarg(0) +"]";
mes "I will do a better job next time! Don't worry!";
close;
}
- mes "["+ getarg(0) +"]";
- mes "Clang! Clang! Clang!";
- failedrefitem .@part;
- next;
- emotion (!rand(5))?e_cash:e_omg;
- mes "["+ getarg(0) +"]";
- mes "Hmmm!";
- next;
- mes "["+ getarg(0) +"]";
- mes "Oh my! I've failed to refine stuff...";
- mes "I didn't mean it!";
- mes "There could've been made an mistake even though I am the best ever.";
- mes "It was out of my hands.";
- next;
- mes "["+ getarg(0) +"]";
- mes "I will do a better job next time! Don't worry!";
- close;
}
- mes "[" + getarg(0) + "]";
- mes "All finished... Come again soon.";
+ emotion e_no1;
+ mes "["+ getarg(0) +"]";
+ mes "Good! Succes!!!";
+ mes "I am the best Blacksmith.";
close;
}
// Ori/Elu to Carnium/Bradium Refiners
//============================================================
-- script Austry#ref -1,{
- mes "[Austry]";
+- script Austri#ref -1,{
+ if (checkweight(1201,1) == 0) {
+ mes "- Wait a minute !! -";
+ mes "- Currently you're carrying -";
+ mes "- too many items with you. -";
+ mes "- Please try again -";
+ mes "- after you lose some weight. -";
+ close;
+ }
+ mes "[Austri]";
mes "If you bring me 3";
mes "Oridecon or Elunium";
mes "I can exchange them for";
@@ -471,31 +362,196 @@ function script refinenew {
setarray .@i[0],6090,1,6223; //Purified_Bradium -> Carnium
break;
case 4:
- mes "[Austry]";
+ mes "[Austri]";
mes "Hmm...";
close;
}
if (countitem(.@i[0]) >= .@i[1] && Zeny >= 50000) {
delitem .@i[0],.@i[1];
- set Zeny, Zeny - 50000;
+ Zeny -= 50000;
getitem .@i[2],1;
- mes "[Austry]";
+ mes "[Austri]";
if (.@i[0] == 6090) {
- mes "Refining with Purified Bradium";
- mes "is a little expensive. I can";
- mes "trade it for some Carnium.";
+ mes "Refining with Refined Bradium";
+ mes "can be a little expensive.";
+ mes "I can exchange it for some Carnium.";
} else
- mes "Ok! Here is your "+getitemname(.@i[2])+".";
+ mes "Ok! Here's your "+getitemname(.@i[2])+".";
mes "Take it and use it well.";
close;
}
- mes "[Austry]";
+ mes "[Austri]";
mes "You better not be trying";
mes "to cheat me because you";
- mes "don't have enough zeny";
+ mes "don't have enough money";
mes "or "+getitemname(.@i[0])+".";
close;
}
-prt_in,85,71,5 duplicate(Austry#ref) Austry#prt 826
-payon_in01,14,125,5 duplicate(Austry#ref) Austry#pay 826
-morocc_in,60,38,5 duplicate(Austry#ref) Austry#moc 826
+prt_in,85,71,5 duplicate(Austri#ref) Austri#prt 4_M_DWARF
+payon_in01,14,125,5 duplicate(Austri#ref) Austri#pay 4_M_DWARF
+morocc_in,60,38,5 duplicate(Austri#ref) Austri#moc 4_M_DWARF
+
+// Malangdo Refiner
+//============================================================
+malangdo,224,172,6 script Clink#mal_normal 4_CAT_SAILOR1,{
+ disable_items;
+ mes "[Clink]";
+ mes "My cool dad Holink said I have the world's greatest refine hammer!!";
+ mes "Meow Meow~";
+ mes "Who do you think I am?";
+ mes "Yes!!! You!! You want to refine?";
+ next;
+ setarray .@position$[1],"Head","Body","Left Hand","Right Hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
+ set .@menu$,"";
+ for(set .@i,1; .@i<=10; set .@i,.@i+1)
+ set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Empty]")+":";
+ set .@part, select(.@menu$);
+ if (!getequipisequiped(.@part)) {
+ mes "[Clink]";
+ switch(.@part) {
+ case 1:
+ mes "Dad said. There's no cure for stupidity...";
+ break;
+ case 2:
+ mes "There's nothing to see here!!";
+ break;
+ case 3:
+ mes "What an arrogant left hand this is!";
+ break;
+ case 4:
+ mes "What an arrogant right hand this is!";
+ break;
+ case 5:
+ mes "Get that dirty thing off my face!!";
+ break;
+ case 6:
+ mes "Kyaong~! Do not provoke me.";
+ break;
+ case 7:
+ case 8:
+ mes "Where is the accessory?";
+ break;
+ case 9:
+ case 10:
+ mes "Are you talking about the other head part?";
+ break;
+ }
+ close;
+ }
+ if (!getequipisenableref(.@part)) {
+ mes "[Clink]";
+ mes "This can't be refined!!";
+ close;
+ }
+ if (getequiprefinerycnt(.@part) >= 10) {
+ mes "[Clink]";
+ mes "Perfect refining. Did I do this for you?";
+ close;
+ }
+ mes "[Clink]";
+ switch(getequipweaponlv(.@part)) {
+ default:
+ case 0: // Armor
+ set .@price,2000;
+ set .@material,985; //Elunium
+ set .@type$,"armor";
+ mes "Hmm, an armor refine? Someone like you?";
+ break;
+ case 1: // Level 1 Weapon
+ set .@price,50;
+ set .@material,1010; //Phracon
+ set .@type$,"weapon";
+ mes "A level 1 weapon?";
+ mes "Urr... Annoying... Okay, let's try...";
+ break;
+ case 2: // Level 2 Weapon
+ set .@price,200;
+ set .@material,1011; //Emveretarcon
+ set .@type$,"weapon";
+ mes "A level 2 weapon?";
+ break;
+ case 3: // Level 3 Weapon
+ set .@price,20000;
+ set .@material,984; //Oridecon
+ set .@type$,"weapon";
+ mes "Woot!! A level 3 weapon? Impressive~";
+ break;
+ case 4: // Level 4 Weapon
+ set .@price,50000;
+ set .@material,984; //Oridecon
+ set .@type$,"weapon";
+ mes "Wow!... A level 4 weapon~!!";
+ break;
+ }
+ mes "You need ^ff9999"+getitemname(.@material)+"^000000 and ^ff9999"+.@price+"^000000 Zeny. Do you have them?";
+ next;
+ if(select("Yes, I do!!:Forget about it!!") == 2) {
+ mes "[Clink]";
+ mes "I knew it!!";
+ mes "I knew you were not worth trying my magical refining hammer for.";
+ close;
+ }
+ if (getequippercentrefinery(.@part) < 100) {
+ mes "[Clink]";
+ mes "Wow!!";
+ mes "This "+.@type$+" has been refined quite a bit, huh?";
+ mes "You do know that this might break, right?";
+ next;
+ mes "[Clink]";
+ mes "If you break the "+.@type$+", you can never use it again.";
+ mes "Cards and enchant effects...";
+ mes "the ^ff0000whole thing will disappear^000000.";
+ mes "You still up for this~?";
+ next;
+ if(select("Yes, I am!!:Forget about it!!") == 2) {
+ mes "[Clink]";
+ mes "I knew it!!";
+ mes "You can't even take this big step. Don't think about refining...";
+ close;
+ }
+ }
+ if (countitem(.@material) == 0 || Zeny < .@price) {
+ mes "[Clink]";
+ mes "Hey you!! Didn't I tell you";
+ mes "that you need ^ff9999"+getitemname(.@material)+"^000000 and ^ff9999"+.@price+"^000000 Zeny??!!";
+ close;
+ }
+ delitem .@material,1;
+ Zeny -= .@price;
+ if (getequippercentrefinery(.@part) <= rand(100)) {
+ failedrefitem .@part;
+ mes "[Clink]";
+ mes "Cry Hammer!! Cry!!!";
+ next;
+ switch(rand(1,5)) {
+ case 1: emotion e_sob; break;
+ case 2: emotion e_swt2; break;
+ case 3: emotion e_wah; break;
+ case 4: emotion e_hmm; break;
+ case 5: emotion e_lv2; break;
+ }
+ mes "[Clink]";
+ mes "Huh?! I failed?!";
+ next;
+ mes "[Clink]";
+ mes "Arrgg~ It's all~ Broken...? What a pity~";
+ next;
+ mes "[Clink]";
+ mes "Hey...!! Get me another one.";
+ mes "This is not possible.";
+ mes "How can my hammer fail from refining?";
+ close;
+ }
+ successrefitem .@part;
+ mes "[Clink]";
+ mes "Cry Hammer!! Cry!!!";
+ next;
+ emotion e_kis;
+ mes "[Clink]";
+ mes "Ok!! Perfect!!";
+ mes "There's nothing I can't refine";
+ mes "with this special hammer.";
+ mes "You can praise me!!";
+ mes "What a day!!";
+ close;
+}