set .@ticket, ITEM_ID;
if (!countitem(.@ticket)) {
mes "[Premium Refiner]";
mes "You need a Premium Ticket to continue.";
close;
}
mes "[Premium Refiner]";
mes "Is there anything you want to refine?";
next;
// Create equip menu.
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))
set .@menu$, .@menu$+.@position$[.@i]+" ~ "+getequipname(.@i);
set .@menu$, .@menu$+":";
}
set .@part, select(.@menu$);
// Check if the item is refinable (delete this section if you don't need it).
if (!getequipisenableref(.@part)) {
mes "[Premium Refiner]";
mes "This item is not refinable.";
close;
}
// Check if the item is over the max refine (+20).
if (getequiprefinerycnt(.@part) > 20) {
mes "[Premium Refiner]";
mes "I can't refine this item any higher!";
close;
}
mes "[Premium Refiner]";
mes "Are you sure you want to refine "+getequipname(.@part)+"?";
next;
if(select("Yes, go on.:Wait a second...") == 2)
close;
mes "[Premium Refiner]";
mes "All done! Enjoy!";
delitem .@ticket,1;
successrefitem .@part;
close;
It's pretty basic; refer to the documentation (trunk/doc/script_commands.txt) if you have questions about any of the commands.