Jump to content
  • 0
Sign in to follow this  
bWolfie

How to use eA Job System to detect certain range of class

Question

Hi,

I want to use the eA Job System to check an 'if' statement, having some trouble.
I want the statement to check:

  • If user is fully advanced class (e.g. Lord Knight, Paladin) OR user is at the end of the baby line (e.g. Baby Knight, Baby Hunter).
  • User is NOT first class (can the classes above).

This is my script.

.@eac = eaclass();
// if (2-1/2-2 + rebirth OR 2-1/2-2 + baby BUT NOT FIRST CLASS)
if (.@eac&EAJL_2&(EAJL_UPPER|EAJL_BABY))
{
     dothis();
}
Edited by Myriad

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
// if (2-1/2-2 + rebirth OR 2-1/2-2 + baby BUT NOT FIRST CLASS)
if ((.@eac & (EAJL_2_1 | EAJL_2_2)) && (.@eac & EAJL_BABY || .@eac & EAJL_UPPER)) { dothis(); }

Something like this? I think the "user is not a first class" will need to be done within the case, since the result of checking .@eac against anything above the first class would include its first class.

Share this post


Link to post
Share on other sites
  • 0
19 minutes ago, Smoke said:

// if (2-1/2-2 + rebirth OR 2-1/2-2 + baby BUT NOT FIRST CLASS)
if ((.@eac & (EAJL_2_1 | EAJL_2_2)) && (.@eac & EAJL_BABY || .@eac & EAJL_UPPER)) { dothis(); }

Something like this?

Sadly still triggering for 1-1 class like Swordman, Mage, Taekwon.

Share this post


Link to post
Share on other sites
  • 0
5 minutes ago, Myriad said:

Sadly still triggering for 1-1 class like Swordman, Mage, Taekwon.

Yeah, edited my post to say that you'll need to include the 1-1 check within that one (which narrows it down to the user's class hierarchy).

Something like 

 

if ((.@eac & (EAJL_2_1 | EAJL_2_2)) && (.@eac & EAJL_BABY || .@eac & EAJL_UPPER)) {
	if (Class != Swordman && Class != Mage ...)
		dothis();
}

 

Share this post


Link to post
Share on other sites
  • 0

Hm okay. Thanks Smoke. I was hoping not to use a long if or switch statement, but I guess it can't be avoided :astonished:

Share this post


Link to post
Share on other sites
  • 0
19 minutes ago, Myriad said:

Hm okay. Thanks Smoke. I was hoping not to use a long if or switch statement, but I guess it can't be avoided :astonished:

Yeah the EAJ masking system was built this way, although you could make a utility script function that returns if a class is a 1st, 2nd or 3rd job class.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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