|
@@ -521,7 +521,7 @@ forever, and no trace remains of it even if it was stored with character or
|
|
account data.
|
|
account data.
|
|
|
|
|
|
Some variables are special, that is, they are already defined for you by the
|
|
Some variables are special, that is, they are already defined for you by the
|
|
-scripting engine. You can see the full list in 'src/map/script_constants.h', which
|
|
|
|
|
|
+scripting engine. You can see the full list in 'src/map/script_constants.hpp', which
|
|
is a file you should read, since it also allows you to replace lots of numbered
|
|
is a file you should read, since it also allows you to replace lots of numbered
|
|
arguments for many commands with easier to read text. The special variables most
|
|
arguments for many commands with easier to read text. The special variables most
|
|
commonly used are all permanent character-based variables:
|
|
commonly used are all permanent character-based variables:
|
|
@@ -565,7 +565,7 @@ setting it will make the character own this number of Zeny.
|
|
If you try to set Zeny to a negative number, the script will be terminated with an error.
|
|
If you try to set Zeny to a negative number, the script will be terminated with an error.
|
|
|
|
|
|
Some source-end constants can also be accessed in scripts. This list is located in
|
|
Some source-end constants can also be accessed in scripts. This list is located in
|
|
-'src/map/script_constants.h', which contains constants such as server defines and status options:
|
|
|
|
|
|
+'src/map/script_constants.hpp', which contains constants such as server defines and status options:
|
|
|
|
|
|
PACKETVER, MAX_LEVEL, MAX_STORAGE, MAX_INVENTORY, MAX_CART, MAX_ZENY, MAX_PARTY,
|
|
PACKETVER, MAX_LEVEL, MAX_STORAGE, MAX_INVENTORY, MAX_CART, MAX_ZENY, MAX_PARTY,
|
|
MAX_GUILD, MAX_GUILDLEVEL, MAX_GUILD_STORAGE, MAX_BG_MEMBERS, MAX_CHAT_USERS,
|
|
MAX_GUILD, MAX_GUILDLEVEL, MAX_GUILD_STORAGE, MAX_BG_MEMBERS, MAX_CHAT_USERS,
|
|
@@ -1002,7 +1002,7 @@ and called label is in NPC that has trigger area, that label must end with
|
|
"Global" to work globally (i.e. if RID is outside of the trigger area, which
|
|
"Global" to work globally (i.e. if RID is outside of the trigger area, which
|
|
usually happens since otherwise there would be no point calling the label with
|
|
usually happens since otherwise there would be no point calling the label with
|
|
doevent, because OnTouch would do the job). For further reference look for
|
|
doevent, because OnTouch would do the job). For further reference look for
|
|
-npc_event in npc.c.
|
|
|
|
|
|
+npc_event in npc.cpp.
|
|
|
|
|
|
Scripting commands and functions
|
|
Scripting commands and functions
|
|
--------------------------------
|
|
--------------------------------
|
|
@@ -2391,7 +2391,7 @@ Also useful when passing arrays to functions or accessing another npc's arrays:
|
|
|
|
|
|
This function will return the specified stat of the invoking character, or, if a
|
|
This function will return the specified stat of the invoking character, or, if a
|
|
character name or character id is specified, of that player. The stat can either
|
|
character name or character id is specified, of that player. The stat can either
|
|
-be a number or parameter name, defined in 'src/map/script_constants.h'.
|
|
|
|
|
|
+be a number or parameter name, defined in 'src/map/script_constants.hpp'.
|
|
|
|
|
|
Some example parameters:
|
|
Some example parameters:
|
|
|
|
|
|
@@ -3747,7 +3747,7 @@ list (cloak, cart, ruwach, etc). if flag is 1 (default when omitted),
|
|
the option will be added to what the character currently has; if 0, the option is removed.
|
|
the option will be added to what the character currently has; if 0, the option is removed.
|
|
|
|
|
|
This is definitely not a complete list of available option flag numbers. Ask a
|
|
This is definitely not a complete list of available option flag numbers. Ask a
|
|
-core developer (or read the source: src/map/status.h) for the full list.
|
|
|
|
|
|
+core developer (or read the source: src/map/status.hpp) for the full list.
|
|
|
|
|
|
---------------------------------------
|
|
---------------------------------------
|
|
|
|
|
|
@@ -3921,7 +3921,7 @@ more:
|
|
|
|
|
|
*checkre(<type>)
|
|
*checkre(<type>)
|
|
|
|
|
|
-Checks if a renewal feature is enabled or not in renewal.h, and returns 1 if
|
|
|
|
|
|
+Checks if a renewal feature is enabled or not in renewal.hpp, and returns 1 if
|
|
enabled and 0 for disabled.
|
|
enabled and 0 for disabled.
|
|
|
|
|
|
The renewal feature to check is determined by type.
|
|
The renewal feature to check is determined by type.
|
|
@@ -4283,7 +4283,7 @@ This command will change the job class of the invoking character.
|
|
|
|
|
|
This command does work with numbers, but you can also use job names. The full
|
|
This command does work with numbers, but you can also use job names. The full
|
|
list of job names and the numbers they correspond to can be found in
|
|
list of job names and the numbers they correspond to can be found in
|
|
-'src/map/script_constants.h'.
|
|
|
|
|
|
+'src/map/script_constants.hpp'.
|
|
|
|
|
|
// This would change your player into a Swordman
|
|
// This would change your player into a Swordman
|
|
jobchange Job_Swordman;
|
|
jobchange Job_Swordman;
|
|
@@ -4509,7 +4509,7 @@ you can look at: 'npc/custom/stylist.txt'
|
|
|
|
|
|
This command will push the currently attached player to given direction by given
|
|
This command will push the currently attached player to given direction by given
|
|
amount of square cells. Direction is the same as used when declaring NPCs, and
|
|
amount of square cells. Direction is the same as used when declaring NPCs, and
|
|
-can be specified by using one of the DIR_* constants (src/map/script_constants.h).
|
|
|
|
|
|
+can be specified by using one of the DIR_* constants (src/map/script_constants.hpp).
|
|
|
|
|
|
The knock-back is not restricted by items or map flags, only obstacles are taken
|
|
The knock-back is not restricted by items or map flags, only obstacles are taken
|
|
into account. If there is not enough space to perform the push (e.g. due to a
|
|
into account. If there is not enough space to perform the push (e.g. due to a
|
|
@@ -5634,8 +5634,8 @@ Used in reset NPC's (duh!)
|
|
These commands will bestow a status effect on a character.
|
|
These commands will bestow a status effect on a character.
|
|
|
|
|
|
The <effect type> determines which status is invoked. This can be either a number
|
|
The <effect type> determines which status is invoked. This can be either a number
|
|
-or constant, with the common statuses (mostly negative) found in 'src/map/script_constants.h'
|
|
|
|
-with the 'SC_' prefix. A full list is located in 'src/map/status.h', though
|
|
|
|
|
|
+or constant, with the common statuses (mostly negative) found in 'src/map/script_constants.hpp'
|
|
|
|
+with the 'SC_' prefix. A full list is located in 'src/map/status.hpp', though
|
|
they are not currently documented.
|
|
they are not currently documented.
|
|
|
|
|
|
The duration of the status is given in <ticks>, or milleseconds.
|
|
The duration of the status is given in <ticks>, or milleseconds.
|
|
@@ -5920,7 +5920,7 @@ Types:
|
|
1: Buff
|
|
1: Buff
|
|
2: Debuff
|
|
2: Debuff
|
|
|
|
|
|
-Status_icon: See "Status Icon" section in 'src/map/script_constants.h'. Default is SI_BLANK (-1).
|
|
|
|
|
|
+Status_icon: See "Status Icon" section in 'src/map/script_constants.hpp'. Default is SI_BLANK (-1).
|
|
|
|
|
|
Example:
|
|
Example:
|
|
// Apple gives you +5 Str bonus for 1 minute when it's consumed.
|
|
// Apple gives you +5 Str bonus for 1 minute when it's consumed.
|
|
@@ -6756,7 +6756,7 @@ This command will broadcast a message to all or most players, similar to
|
|
The region the broadcast is heard in (target), source of the broadcast
|
|
The region the broadcast is heard in (target), source of the broadcast
|
|
and the color the message will come up as is determined by the flags.
|
|
and the color the message will come up as is determined by the flags.
|
|
|
|
|
|
-The flag values are coded as constants in 'src/map/script_constants.h' to make them easier to use.
|
|
|
|
|
|
+The flag values are coded as constants in 'src/map/script_constants.hpp' to make them easier to use.
|
|
|
|
|
|
Target flags:
|
|
Target flags:
|
|
- bc_all: Broadcast message is sent server-wide (default).
|
|
- bc_all: Broadcast message is sent server-wide (default).
|
|
@@ -7514,7 +7514,7 @@ must be used.
|
|
|
|
|
|
This command makes an object display an emotion sprite above their own as
|
|
This command makes an object display an emotion sprite above their own as
|
|
if they were doing that emotion. For a full list of emotion numbers,
|
|
if they were doing that emotion. For a full list of emotion numbers,
|
|
-see 'src/map/script_constants.h' under 'ET_'. The not so obvious ones are 'ET_QUESTION'
|
|
|
|
|
|
+see 'src/map/script_constants.pph' under 'ET_'. The not so obvious ones are 'ET_QUESTION'
|
|
(a question mark) and 'ET_SURPRISE' (the exclamation mark).
|
|
(a question mark) and 'ET_SURPRISE' (the exclamation mark).
|
|
|
|
|
|
The optional target parameter specifies who will get the emotion on top of
|
|
The optional target parameter specifies who will get the emotion on top of
|
|
@@ -8120,7 +8120,7 @@ Parameter (indexes) for NPCs are:
|
|
|
|
|
|
*Notes:
|
|
*Notes:
|
|
- *_SIZE: small (0); medium (1); large (2)
|
|
- *_SIZE: small (0); medium (1); large (2)
|
|
- - *_MAPID: this refers to the map_data index (from src/map/map.c), not the mapindex_db index (from src/common/mapindex.c)
|
|
|
|
|
|
+ - *_MAPID: this refers to the map_data index (from src/map/map.cpp), not the mapindex_db index (from src/common/mapindex.cpp)
|
|
-- For 'setunitdata', map name can also be passed in as a valid value instead of map ID
|
|
-- For 'setunitdata', map name can also be passed in as a valid value instead of map ID
|
|
- *_SPEED: 20 - 1000
|
|
- *_SPEED: 20 - 1000
|
|
- *_MODE: see doc/mob_db_mode_list.txt
|
|
- *_MODE: see doc/mob_db_mode_list.txt
|
|
@@ -8707,7 +8707,7 @@ Each of these can be 'on' or 'off'. Together they define a cell's behavior.
|
|
|
|
|
|
This command lets you alter these flags for all map cells in the specified
|
|
This command lets you alter these flags for all map cells in the specified
|
|
(x1,y1)-(x2,y2) rectangle. The 'flag' can be 0 or 1 (0:clear flag, 1:set flag).
|
|
(x1,y1)-(x2,y2) rectangle. The 'flag' can be 0 or 1 (0:clear flag, 1:set flag).
|
|
-The 'type' defines which flag to modify. Possible options see 'src/map/script_constants.h'.
|
|
|
|
|
|
+The 'type' defines which flag to modify. Possible options see 'src/map/script_constants.hpp'.
|
|
|
|
|
|
Example:
|
|
Example:
|
|
|
|
|
|
@@ -8741,7 +8741,7 @@ remove a nonwalkable row of cells after the barricade mobs.
|
|
|
|
|
|
This command will return 1 or 0, depending on whether the specified cell has
|
|
This command will return 1 or 0, depending on whether the specified cell has
|
|
the 'type' flag set or not. There are various types to check, all mimicking
|
|
the 'type' flag set or not. There are various types to check, all mimicking
|
|
-the server's cell_chk enumeration. The types can be found in 'src/map/script_constants.h'.
|
|
|
|
|
|
+the server's cell_chk enumeration. The types can be found in 'src/map/script_constants.hpp'.
|
|
|
|
|
|
The meaning of the individual types can be confusing, so here's an overview:
|
|
The meaning of the individual types can be confusing, so here's an overview:
|
|
- cell_chkwall/water/cliff
|
|
- cell_chkwall/water/cliff
|
|
@@ -9462,7 +9462,7 @@ NOTE: Currently ONLY supported for bonuses that used by 'bonus' script.
|
|
This command will make the pet cure a specified status condition. The curing
|
|
This command will make the pet cure a specified status condition. The curing
|
|
actions will occur once every Delay seconds. For a full list of status
|
|
actions will occur once every Delay seconds. For a full list of status
|
|
conditions that can be cured, see the list of 'SC_' status condition constants
|
|
conditions that can be cured, see the list of 'SC_' status condition constants
|
|
-in 'src/map/script_constants.h'.
|
|
|
|
|
|
+in 'src/map/script_constants.hpp'.
|
|
|
|
|
|
---------------------------------------
|
|
---------------------------------------
|
|
|
|
|
|
@@ -9946,7 +9946,7 @@ solution rather than sending the map and the monster_id.
|
|
|
|
|
|
This will set a Hat Effect onto the player. The state field allows you to
|
|
This will set a Hat Effect onto the player. The state field allows you to
|
|
enable (true) or disable (false) the effect on the player.
|
|
enable (true) or disable (false) the effect on the player.
|
|
-The Hat Effect constants can be found in 'src/map/script_constants.h' starting
|
|
|
|
|
|
+The Hat Effect constants can be found in 'src/map/script_constants.hpp' starting
|
|
with HAT_EF_*.
|
|
with HAT_EF_*.
|
|
|
|
|
|
Requires client 2015-05-13aRagEXE or newer.
|
|
Requires client 2015-05-13aRagEXE or newer.
|