Jump to content
  • 0
Winter1992

Refiner / Unrefine check

Question

Any one can help me? how to edit this here is my script. then i want to put this modification on that so that the refiner will check if the item can refine or not 

gonryun,177,118,3    script    Instant +10 TCG    950,{

mes "What item do you want to be refined?";
next;
set @refine,.equip_part[select(getequipname(.equip_part[0]),
                getequipname(.equip_part[1]), // shoes
                getequipname(.equip_part[2]), // muffler
                getequipname(.equip_part[3]), // lower gear
                getequipname(.equip_part[4]), // mid gear
                getequipname(.equip_part[5]), // headgear
                getequipname(.equip_part[6]), // armor
                getequipname(.equip_part[7]), // shield
                getequipname(.equip_part[8]), // weapon
                getequipname(.equip_part[9]))-1];

if(countitem(7227) < 1) {
mes "You are missing:";
mes ""+((countitem(7227) < 1)?"1 TCG Cards":"")+"";
close;
}

if(getequiprefinerycnt(@refine) >= 7) {
mes "+10 Item cannot be refined anymore.";
close;
}
else { 
delitem 7227,1;
successrefitem @refine,10;
mes "Clang Clang! Success!";
close;

}


OnInit:

    setarray .equip_part[1],2,3,5,6,7,8,9;

}


where should i put this code?? 

(!getequipisenableref(@part)) {
        mes "Go find another Blacksmith. You can't refine this thing.";
        close;
    }
 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

also it would be better to organize your script 

gonryun,177,118,3	script	Instant +10 TCG	950,{
	disable_items;
	mes "What item do you want to be refined?";
	next;
	for([email protected]i=1;[email protected]i<getarraysize(.pos);[email protected]i){
		if(getequipisequiped(.pos[[email protected]i])){
			[email protected]equips$ += F_getpositionname(.pos[[email protected]i]) + " [ " + getequipname(.pos[[email protected]i]) + " ]";
		}
		[email protected]equips$ += ":";
	}
	[email protected]part = .pos[select([email protected]equips$)];
	if(!getequipisenableref([email protected]part)) {
		mes "Go find another Blacksmith. You can't refine this thing.";
		close;
	}
	if(countitem(7227) < 1) {
		mes "You are missing 1 TCG Cards";
		close;
	}
	if(getequiprefinerycnt([email protected]part) >= 7){
		mes "+10 Item cannot be refined anymore.";
		close;
	}else{ 
		delitem 7227,1;
		successrefitem [email protected]part,10;
		mes "Clang Clang! Success!";
		close;
	}
end;
OnInit:
	setarray .pos[1],EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_HEAD_MID, EQI_HEAD_LOW;
end;
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

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