mleo1 36 Posted May 17, 2013 please give me sample on 1 check if item is refine-able 2 then refine to whatever Quote Share this post Link to post Share on other sites
0 icabit 4 Posted May 17, 2013 (edited) 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$); if(!getequipisenableref(.@part)) { // checks the item if not refine-able mes "[" + getarg(0) + "]"; mes "I don't think I can"; mes "refine this item at all..."; close; }// write the lines you want to execute if the item is refine-able below this this line Edited May 17, 2013 by icabit 1 mleo1 reacted to this Quote Share this post Link to post Share on other sites
0 mleo1 36 Posted May 17, 2013 thanks, I learned alot, I browsed the script_command doc tooI made this from your sample.. prontera,155,177,5 script test 99,{ callfunc("refinedeed",1,10);}function script refinedeed {/*1 Head Upper2 Body3 Left Hand4 Right Hand5 Robe6 Footgear7 Accessory Left8 Accessory Right9 Head Mid10 Head Low*/ set .@itempos, getarg(0); set .@refinex, getarg(1); if( !getequipisenableref(.@itempos) ) end; if( getequiprefinerycnt(.@itempos)==.@refinex ) end; for( set .@i,1; .@i <= .@refinex; set .@i,.@i+1 ) successrefitem .@itempos;} Quote Share this post Link to post Share on other sites
please give me sample on
1 check if item is refine-able
2 then refine to whatever
Share this post
Link to post
Share on other sites