Professional Documents
Culture Documents
0x0
0x1
0x2
0x3
0x4
0x5
0x6
0x7
0x9
0x10
- Branch: All classes can be classified as "1st Class", "2-1 Class" or "2-2 Clas
s":
EAJL_2_1
EAJL_2_2
EAJL_2 0x300
0x100
0x200
0x1000
0x2000
0x4000
So using these three categories, any job class can be constructed from the other
s. Let's take a swordman, for example.
The first step is basic swordman, with nothing else:
EAJ_SWORDMAN
The next step is to either become a 2-1 or a 2-2 job:
EAJ_SWORDMAN|EAJL_2_1 -> EAJ_KNIGHT
EAJ_SWORDMAN|EAJL_2_2 -> EAJ_CRUSADER
if a swordman is adopted...
EAJ_SWORDMAN|EAJL_BABY -> EAJ_BABY_SWORDMAN
Or getting out the rebirth versions of a swordman:
EAJ_SWORDMAN|EAJL_UPPER -> EAJ_SWORDMAN_HIGH
EAJ_SWORDMAN|EAJL_2_1|EAJL_UPPER
-> EAJ_LORD_KNIGHT
EAJ_SWORDMAN|EAJL_2_2|EAJL_UPPER
-> EAJ_PALADIN
Why are we using the bitwise OR operand ('|') rather than just adding? Because t
he OR is wreck-proof:
EAJ_SWORDMAN_HIGH|EAJL_UPPER -> EAJ_SWORDMAN_HIGH
If we had used addition, we would have gotten a completely different result.
The EAJL (eA Job Level) constants
------------------------------------------------------------------------------There are a few constants which can be used to filter out and make job c
omparisons easier.
EAJL_2_1:
Checks if the class is a 2-1 class:
if (@job&EAJL_2_1)
mes "Using the classic 2-1 job, huh?";
EAJL_2_2:
Checks if the class is 2-2.
EAJL_2:
Checks if the class is a 2nd Class. If the check fails, you can be sure
the character is a first class.
if (!(@job&EAJL_2))
mes "Will you wait until Job 50 to change?";
EAJL_UPPER:
Check if a class is Rebirth/Advanced:
if(@job&EAJL_UPPER)
mes "It must have taken you a LONG time...";
EAJL_BABY:
Check if a class is an adopted class.
if (@job&EAJ_BABY)
mes "Don't you hate being weak?";
EAJ_UPPERMASK:
The upper mask can be used to "strip" the upper/baby characteristics of
a class, used when you want to know if someone is a certain class regardless of
rebirth/adopted status. For example, the following code would go through for Mon
ks, Champions and Baby Monks:
if ((@job&EAJ_UPPERMASK) == EAJ_MONK)
mes "Aren't knuckles such a cool weapon?";
Note that if instead of EAJ_MONK you used EAJ_CHAMPION or EAJ_BABY_MONK,
the check would had never passed, since the upper/baby state has been removed f
rom the original job when checking.
EAJ_BASEMASK:
This mask strips also the 2nd class attributes. It can be used to check
against the basic job of a character. For example, the following code would go t
hrough for Merchants (+Baby Merchant and High Merchant), Blacksmiths (+Baby blac
ksmiths and Whitesmith) and Alchemist (+Baby Alchemist and +Creator):
if ((@job&EAJ_BASEMASK) == EAJ_MERCHANT)
mes "Why I can't have discount like you guys do?";
Note that, like before, if you try to check versus any of the other clas
ses (High merchant, blacksmith, etc) instead of basic merchant, the check will a
lways fail for the same reasons previously explained.
The script commands eaclass, roclass:
------------------------------------------------------------------------------These script commands are what you can use in scripts to convert between
the RO classic job id, and eA's job system. The following script code demonstra
tes how to use these script commands to guess what your next job will be:
set @eac, eaclass();
if (@eac&EAJL_2)
{
//2nd class
//If upper or baby, you can't rebirth
if (@eac&(EAJL_UPPER|EAJL_BABY)) {
mes "You can't go anywhere, can you?";
close;
}
//Note that if we remove the EAJL_BABY check up there, the follo
wing check
//will also fail, because there's no such thing as Rebirth-Baby
classes.
set @newclass, roclass(@eac|EAJL_UPPER);
if (@newclass == -1) {
//Don't you hate this of SG and SL?
mes "Haha, your class doesn't has a rebirth version yet!
";
close;
}