Jump to content
  • 0

Check item if bounded to the player


Rebel

Question


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  436
  • Reputation:   31
  • Joined:  02/19/12
  • Last Seen:  

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.

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 1

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


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
Link to comment
Share on other sites

  • 1

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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.

 

 

try again

http://pastebin.com/raw.php?i=SFnXUqmg

fixed the wrong variable

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

R25uk0g.jpg

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  436
  • Reputation:   31
  • Joined:  02/19/12
  • Last Seen:  

Hi can you provide a simple script on using that command to check if players item is bounded.. thanks i appreciate any kind of help..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  436
  • Reputation:   31
  • Joined:  02/19/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


if( @inventorylist_bound[.@i] && @inventorylist_equip[.@i] ){

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  436
  • Reputation:   31
  • Joined:  02/19/12
  • Last Seen:  

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;
	}
}
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  436
  • Reputation:   31
  • Joined:  02/19/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  436
  • Reputation:   31
  • Joined:  02/19/12
  • Last Seen:  

Bounded Items now cannnot be converted. - OK

Normal Items too. - FAIL

 

it says "This is bounded items." even if its an normal headgears

 

you can find the whole npc and patch here.

 

http://rathena.org/board/topic/82370-costume-npc-and-costumeitem/?hl=costume

Edited by Rebel
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...