mapname,x,y,direct script NPCName spriteid,{
mes .npcname$;
mes "Hello ^ff0000"+strcharinfo(0)+"^000000,";
mes "I can refine your equipment for a ^ff0000100% chance^000000!";
mes "All I need is ^ff00001 God Anvil^000000.";
for( set .@i,1; .@i <= 10; set .@i,.@i+1 )
{
if( getequipisequiped(.@i) )
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
set .@menu$, .@menu$ + ":";
}
set .@part,select(.@menu$);
if(!getequipisequiped(.@part)) {
next;
mes .npcname$;
mes "You're not wearing";
mes "anything there that";
mes "I can refine.";
emotion 6;
close;
}
//Check if the item is refinable...
if(!getequipisenableref(.@part)) {
next;
mes .npcname$;
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) {
next;
mes .npcname$;
mes "I can't refine this";
mes "any more. This is as";
mes "refined as it gets!";
close;
}
next;
mes .npcname$;
mes "Do you really want me to refine that item?";
if(select("Yes:No") == 2){
mes "Okay, see you.";
close;
}
if (countitem(7806) < 1){
mes "^ff0000You don't have a God Anvil!^000000";
close;
}
if (getequiprefinerycnt(.@part) >= 7){
mes "^ff0000This item is +7 or higher already.^000000";
close;
}
delitem 7806,1;
while (getequiprefinerycnt(.@part) < 7){
successrefitem .@part;
}
mes "There you go!";
close;
end;
I'm not sure if I understood you correctly.
But this will refine the item to +7 if it is +6 or lower and won't do anything if it +7 or higher.
If you only want to refine from +0 to +7 change the last if to this:
if (getequiprefinerycnt(.@part) == 0){
mes "^ff0000This item is refined already.^000000";
close;
}