Compare commits

...

5 Commits

Author SHA1 Message Date
Atemo
d9ee37d5ec Removed extra script_reportdata 2023-05-25 17:36:58 +02:00
Atemo
0bcc1f66b3 Small correction 2023-05-25 17:08:21 +02:00
Atemo
b0456b0e73 Clean-up 2023-05-24 21:54:01 +02:00
Atemo
b5413b0997 Removed SCRIPT_CMD_END
Terminate the script when SCRIPT_CMD_FAILURE is returned
2023-05-16 17:13:26 +02:00
Atemo
9c21d3af04 Clean-up script.cpp
* Introduced SCRIPT_CMD_END which display an error and put the script state to end
2023-05-10 21:49:15 +02:00
3 changed files with 797 additions and 1151 deletions

View File

@ -4446,7 +4446,6 @@ you have maximum. Like 'heal', this will not call up any animations or effects.
*recovery <type>{,<option>,<revive_flag>{,<map name>}}; *recovery <type>{,<option>,<revive_flag>{,<map name>}};
This command will revive and fully restore the HP/SP of the selected characters. This command will revive and fully restore the HP/SP of the selected characters.
It returns 1 upon successful use.
<type> is the target, and determines the <option> parameter: <type> is the target, and determines the <option> parameter:
0: Player -> Character ID number 0: Player -> Character ID number
@ -6484,8 +6483,7 @@ the invoking character. Example can be found in the wedding script.
This function will "un-marry" the invoking character from whoever they were This function will "un-marry" the invoking character from whoever they were
married to. Both will no longer be each other's marriage partner, (at least in married to. Both will no longer be each other's marriage partner, (at least in
current SVN, which prevents the cases of multi-spouse problems). It will return current SVN, which prevents the cases of multi-spouse problems).
1 upon success or 0 if the character was not married at all.
This function will also destroy both wedding rings and send a message to both This function will also destroy both wedding rings and send a message to both
players, telling them they are now divorced. players, telling them they are now divorced.
@ -7070,9 +7068,6 @@ the invoking NPC's actions, such as using an emotion or talking.
Whichever of the both NPCs is talked to, both will show a random emotion at the Whichever of the both NPCs is talked to, both will show a random emotion at the
same time. same time.
As of r16564, command now returns 1 or 0 on success and failure.
A debug message also shows on the console when no events are triggered.
--------------------------------------- ---------------------------------------
*cmdothernpc "<npc name>","<command>"; *cmdothernpc "<npc name>","<command>";
@ -7080,8 +7075,6 @@ A debug message also shows on the console when no events are triggered.
This is simply "donpcevent <npc name>::OnCommand<command>". This is simply "donpcevent <npc name>::OnCommand<command>".
It is an approximation of official server script language's 'cmdothernpc'. It is an approximation of official server script language's 'cmdothernpc'.
Returns true if the command was executed on the other NPC successfully, false if not.
--------------------------------------- ---------------------------------------
*npctalk "<message>"{,"<NPC name>",<flag>{,<color>}}; *npctalk "<message>"{,"<NPC name>",<flag>{,<color>}};

File diff suppressed because it is too large Load Diff

View File

@ -134,7 +134,7 @@
enum script_cmd_result { enum script_cmd_result {
SCRIPT_CMD_SUCCESS = 0, ///when a buildin cmd was correctly done SCRIPT_CMD_SUCCESS = 0, ///when a buildin cmd was correctly done
SCRIPT_CMD_FAILURE = 1, ///when an errors appear in cmd, show_debug will follow SCRIPT_CMD_FAILURE = 1, ///when an errors appear in cmd, show_debug will follow and the script terminate
}; };
#define SCRIPT_BLOCK_SIZE 512 #define SCRIPT_BLOCK_SIZE 512