summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorgumi <mekolat@users.noreply.github.com>2017-02-26 12:04:23 -0500
committergumi <mekolat@users.noreply.github.com>2017-02-26 13:38:18 -0500
commit1b0d3bd8f84db5b471646e0404193759afb908db (patch)
tree56b26ab76f9a20a3306267e52aa8759840408c33 /doc
parenta16fbb3c0abe63587280bb9ec744b8f65b4c8e38 (diff)
downloadhercules-1b0d3bd8f84db5b471646e0404193759afb908db.tar.gz
hercules-1b0d3bd8f84db5b471646e0404193759afb908db.tar.bz2
hercules-1b0d3bd8f84db5b471646e0404193759afb908db.tar.xz
hercules-1b0d3bd8f84db5b471646e0404193759afb908db.zip
add getvariableofpc() buildin
Diffstat (limited to 'doc')
-rw-r--r--doc/script_commands.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index ca7ebacca..7015feec1 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -1409,6 +1409,27 @@ getvariableofnpc() should not be used on them.
---------------------------------------
+*getvariableofpc(<variable>, <account id>{, <default value>})
+
+Returns a reference to a PC variable from the target player.
+If <default value> is passed, it will return this value if the player is
+not found.
+
+Examples:
+
+//This will return the value of @var, note that this can't be used, since
+//the value isn't caught.
+ getvariableofpc(@var, getcharid(CHAR_ID_ACCOUNT, "player"));
+
+//This will set the .@v variable to the value of the player's @var
+//variable.
+ .@v = getvariableofpc(@var, getcharid(CHAR_ID_ACCOUNT, "player"));
+
+//This will set the @var variable of the player to 1.
+ set(getvariableofpc(@var, getcharid(CHAR_ID_ACCOUNT, "player")), 1);
+
+---------------------------------------
+
*goto(<label>)
This command will make the script jump to a label, usually used in