if check help

  • JTP
  • JTP's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
5 months 2 weeks ago - 5 months 2 weeks ago #7210 by JTP
JTP created the topic: if check help
Hi

How will an if check look like to prevent usage of a skill, if im grouped with the victim ?
Both if im the leader or just a member when im using the skill.

Iwe made a befriend skill, and atm i can befriend someone that im grouped with. Result that the char joins the group again and group info lists the char twice.
Last Edit: 5 months 2 weeks ago by JTP.

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago - 5 months 2 weeks ago #7211 by thomas
thomas replied the topic: if check help
if ( GROUP(ch) 
  && GROUP(vict) 
  && ( (ch->master && ch->master == vict) || (vict->master && vict->master == ch) )
) 
{
  // both are grouped with each other
}

edit: var names mismatched
Last Edit: 5 months 2 weeks ago by thomas.

Please Log in or Create an account to join the conversation.

  • JTP
  • JTP's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
5 months 2 weeks ago #7212 by JTP
JTP replied the topic: if check help
Thanks alot, that worked.

Please Log in or Create an account to join the conversation.

Time to create page: 0.861 seconds