Jump to content
  • 0
Tio Akima

condition if () in skill

Question

I'm trying to put a condition on a custom skill ... But I'm having problems.
 
the condition is an if () that identifies the class of player .... and depending on the class, the skill performs a particular function.
 
I tried this:
 
if(pc->jobchange == 15 || 4016 || 4077){...break;} 

 

then I tried this:

 

if(sd->status.class_ == JOB_MONK || JOB_CHAMPION || JOB_SURA ){...break;}

 

And it did not work.
 
The intention is to verify the player's class that is using the skill.
 
help-me? 0/

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

(sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR

 

by the way you might want to change "sd" to "tsd" or "dstsd" depending on where you are using it

Share this post


Link to post
Share on other sites
  • 0
oh thank Evilpuncker
 
in my case would be:
if(sd->class_&MAPID_UPPERMASK) == MAPID_MONK  ||  MAPID_CHAMPION ||  MAPID_SURA ){...break;}
 
you could explain to me the difference between them, '' sd '', '' tsd '' and '' dstsd '' or, in which case they apply better?
 
thank!  very thanks!

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

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