Creo que no has revisado bien el post que compartí... btw aquí está en script que necesitas.
function script refinemaint {
disable_items;
.@npc_name$ = getarg(0);
.@features = getarg(1);
mes "["+ .@npc_name$ +"]";
mes "I'm the Armsmith.";
mes "I can refine all kinds of weapons, armor and equipment, so let me";
mes "know what you want me to refine.";
next;
setarray .@indices[1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW;
for(.@i = 1; .@i<getarraysize(.@indices); ++.@i) {
if(getequipisequiped(.@indices[.@i])) {
.@menu$ = .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
.@equipped = 1;
}
.@menu$ = .@menu$ + ":";
}
if (.@equipped == 0) {
mes "["+ .@npc_name$ +"]";
mes "I don't think I can refine any items you have...";
close;
}
.@part = .@indices[select(.@menu$)];
if(!getequipisequiped(.@part)) { //custom check
mes "["+ .@npc_name$ +"]";
mes "You're not wearing";
mes "anything there that";
mes "I can refine.";
emotion ET_FRET;
close;
}
//Check if the item is refinable...
if(!getequipisenableref(.@part)) {
mes "["+ .@npc_name$ +"]";
mes "I don't think I can";
mes "refine this item at all...";
close;
}
//Check to see if the items is already +10
if(getequiprefinerycnt(.@part) >= 10) {
mes "["+ .@npc_name$ +"]";
mes "I can't refine this";
mes "any more. This is as";
mes "refined as it gets!";
close;
}
.@refineitemid = getequipid(.@part); // save id of the item
.@refinerycnt = getequiprefinerycnt(.@part); //save refinery count
setarray .@card[0], getequipcardid(.@part,0), getequipcardid(.@part,1), getequipcardid(.@part,2), getequipcardid(.@part,3);
.@price = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_ZENY_COST);
.@material = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_MATERIAL_ID);
switch (getequipweaponlv(.@part)) {
case 1: .@safe = 7; break;
case 2: .@safe = 6; break;
case 3: .@safe = 5; break;
case 4:
default: .@safe = 4; break;
}
// If the VIP system is enabled, the prices for non-VIP players are considerably higher.
if (VIP_SCRIPT && !vip_status(VIP_STATUS_ACTIVE)) {
switch(getequipweaponlv(.@part)) {
case 0: .@price = .@price * 10; break;
case 1: .@price = .@price * 40; break;
case 2: .@price = .@price * 50; break;
case 3: .@price = .@price * 2; break;
case 4: .@price = .@price * 2; break;
case 5: .@price = .@price * 10; break;
}
}
.@failsafe_itemid = 7539;
.@failsafe_rate = 50;
if (.@failsafe_itemid) {
if (getequippercentrefinery(.@part) <= .@failsafe_rate) {
mes "[Item Protection]";
mes "Do you have "+getitemname(.@failsafe_itemid)+" item ? It will protect your armor/weapon from broken.";
next;
if (select((countitem(.@failsafe_itemid)? "Yes":""), "No") == 1) {
.@failsafe = 1;
}
}
}
if(.@features != 1) {
mes "["+ .@npc_name$ +"]";
mes "To refine this I need";
mes "one ^003366"+getitemname(.@material)+"^000000 and";
mes "a service fee of " + .@price + " Zeny.";
mes "Do you really wish to continue?";
next;
if(select("Yes:No") == 2){
mes "["+ .@npc_name$ +"]";
mes "Yeah...";
mes "There's no need to";
mes "rush. Take your time.";
close;
}
if(getequippercentrefinery(.@part) < 100) {
mes "["+ .@npc_name$ +"]";
mes "Oh no! If I continue to";
mes "refine this, there's a risk it could";
switch(.@material) {
case 985:
mes "be destroyed! That means that ^FF0000this equipment^000000, and ^FF0000any cards^000000 or special properties added to this armor, ^FF0000will be gone^000000.";
break;
default:
mes "be destroyed, and you'd ^FF0000lose the weapon^000000, any ^FF0000cards in the weapon^000000,";
mes "or any added special properties.";
break;
}
next;
mes "["+getarg(0)+"]";
mes "I can't make it any clearer.";
mes "Once a weapon is destroyed,";
mes "there's no getting it back.";
mes "You really have a chance to";
mes "^FF0000lose this weapon^000000 forever.";
mes "Do you still want to refine?";
next;
if(select("Yes:No") == 2){
mes "["+ .@npc_name$ +"]";
mes "I completely agree...";
mes "I might be a great refiner, but sometimes even I make mistakes.";
close;
}
}
if((countitem(.@material) < 1) || (Zeny < .@price)) {
mes "["+ .@npc_name$ +"]";
mes "You don't seem to have";
mes "enough Zeny or "+getitemname(.@material)+"...";
mes "Go get some more. I'll be";
mes "here all day if you need me.";
close;
}
Zeny = Zeny-.@price;
delitem .@material,1;
// anti-hack
if (callfunc("F_IsEquipIDHack", .@part, .@refineitemid) || callfunc("F_IsEquipCardHack", .@part, .@card[0], .@card[1], .@card[2], .@card[3]) ||
callfunc("F_IsEquipRefineHack", .@part, .@refinerycnt)) {
mes "["+ .@npc_name$ +"]";
emotion ET_FRET;
mes "Wait a second...";
mes "Do you think I'm stupid?!";
mes "You switched the item while I wasn't looking! Get out of here!";
close;
}
if(getequippercentrefinery(.@part) <= rand(100)) {
if (.@failsafe)
delitem .@failsafe_itemid, 1;
else
failedrefitem .@part;
mes "["+ .@npc_name$ +"]";
emotion (!rand(5))?ET_MONEY:ET_HUK;
.@lose = rand(1,3);
if (.@lose == 1) {
mes "OH! MY GOD!";
mes "Damn it! Not again!";
mes "I'm terribly sorry, but you know practice does make perfect.";
mes "Um, right? Heh heh...";
} else if(.@lose == 2) {
mes "Nooooooo!";
mes "It broke!";
mes "I-I'm sorry!";
} else {
mes "Crap!";
mes "It couldn't take";
mes "much more tempering!";
mes "Sorry about this...";
}
close;
}
mes "["+getarg(0)+"]";
successrefitem .@part;
emotion ET_SMILE;
.@win = rand(1,3);
if (.@win == 1) {
mes "Perfect!";
mes "Heh heh!";
mes "Once again,";
mes "flawless work";
mes "from the master~";
} else if(.@win == 2) {
mes "Success...!";
mes "Yet again, my amazing";
mes "talent truly dazzles";
mes "and shines today.";
} else {
mes "Heh heh!";
mes "I'm all done.";
mes "No doubt, my work is";
mes "to your satisfaction.";
mes "Sheer, utter perfection~";
}
close;
}
}
prontera,150,150,5 script Vestry#prt 826,{
callfunc "refinemaint","Vestry",0;
end;
}
Aquí cambias el item que quieras utilizar como Token:
.@failsafe_itemid = 7539;
Créditos a: @Emistry