Jump to content
  • 0

Check item if bounded to the player


Question

Posted

Hi Do we have a script command that check if an certain equipment like for example HEADGEAR is bounded to the player..

 

i want to make a script that checks if an certain equipment is bounded then it cannot be converted to costume. thanks.

10 answers to this question

Recommended Posts

  • 1
Posted


getinventorylist;

while( .@i < @inventorylist_count ){

if( @inventorylist_bound[.@i] ){

mes "This item "+getitemname( @inventorylist_id[.@i] )+" is bounded.";

close;

}

set .@i,.@i + 1;

}

close;

  • Upvote 2
Posted

Thank you very much Emistry. Godbless you.

Hi Emistry,

Thanks for that code. But what im asking is checking the equiped equipment of a player if its bounded.. not the equipment in its inventory..

like if the player is wearing a bounded headgear it cannot be turn to costume..

your code is checking the whole inventory if there is a bounded item and i cant turn normal headgears to costume.

Posted

Thank you again Emistry for replying.. Honestly, i am having a hard time in inserting that code in my script.

 

Here's my costume script:

-	script	Costume Clown	-1,{
	mes "[Clown]";
	mes "Here you can convert your headgears into a Costume Headgear.";
	switch(select("I want to convert.:No thanks.")) {
	case 1:
			next;
			mes "Please, select what to convert.";
			mes "Remember, cards and refine will be removed.";
			next;
				setarray .@Position$[1],"Top","Mid","Low";
				setarray .@Position[1],     1,    9,   10;
				set .@Menu$,"";
			for( set .@i, 1; .@i < 5; set .@i, .@i + 1 )
			{
				if( getequipisequiped(.@Position[.@i]) )
				set .@Menu$, .@Menu$ + .@Position$[.@i] + "-" + "[" + getequipname(.@Position[.@i]) + "]";
				set .@Menu$, .@Menu$ + ":";
			}
			set .@Part, .@Position[ select(.@Menu$) ];
			if( !getequipisequiped(.@Part) )
			{
				mes "[Clown]";
				mes "Your not wearing anything there...";
				close;
			}
			mes "[Clown]";
			mes "You want to Costume your " + getitemname(getequipid(.@Part)) + "?";
			next;
			if( select("Yes, proceed:No, I am sorry.") == 2 )
			{
				mes "[Clown]";
				mes "Need some time to think about it, huh?";
				mes "Alright, I can understand.";
				close;
			}
			costume .@Part; // Convert the Headgear
			mes "[Clown]";
			mes "Done, enjoy your costume headgear.";
			close;
	case 2:
		mes "[Clown]";
		mes "Very well. Return at once if you seek my services.";
		close;
	}
}
Posted

Its not working, always end up in
 

"Your not wearing anything there..."

even if im wearing full headgear equip.

 

 

both normal headgear and bounded headgears.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...