Skip to content

jobchange()

Warning

This page may contain outdated information, incompatible with the current version of Hercules and its coding standards.

Syntax

jobchange(<job number>{, <upper flag>});

Description

This command will change the job class of the invoking character. It does work using the job IDs, but you can also use job names. The full list of job names and the IDs they correspond to can be found in db/const.txt.

This command will also set a permanent character-based variable jobchange_level which will contain the job level at the time right before changing jobs, which can be checked for later in scripts.

Remark

upper flag can alternatively be used to specify the type of job one changes to.

Upper Values

Value Description
-1 or not set Preserves the current job type
0 Normal/Standard Classes
1 High/Advanced Classes
2 Baby Classes

Examples

Example

This would change your player into a Swordman

jobchange(1);

Example

This would change your player into a Swordman High

jobchange(4002);

Example

This would change your player into a Swordman

jobchange(Job_Swordman);

Example

This would change your player into a Swordman High

jobchange(Job_Swordman_High);

Example

This would change the character to a high swordsman.

jobchange(Job_Swordman, 1);