Jump to content
  • 0
Sign in to follow this  
mleo1

refine func

Question

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

2 answers to this question

Recommended Posts

  • 0
 
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 by icabit

Share this post


Link to post
Share on other sites
  • 0

thanks, I learned alot, I browsed the script_command doc too

I 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;}

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.