Jump to content
  • 0

If compare to party.....


caspa

Question


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

how do you check a party's name using compare?

like if the leader's name is superman and 1 of his party member's name is shitty man... the npc would reject the party to go in the room because his member has a shit on his name......

I tried the if ( compare ( getcharid(1),"Shit" ) ){

but its not working..........

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

prontera,155,181,5	script	kjdfhskfhds	100,{
getpartymember getcharid(1), 0;
for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
	if ( compare( $@partymembername$[.@i], "ruru" ) ) {
		mes "sry, "+ $@partymembername$[.@i] +" is not allow to enter";
		close;
	}
}
mes "free to go";
close;
}

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

getcharid(1) returns their party_id.

To get the char's name, use strcharinfo(0)

and for the party name: strcharinfo(1)

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...