From 62d2b32affb15349faea803960fa40dc47123b9a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 6 Mar 2017 19:22:04 +0300 Subject: Update script_commands.txt from hercules. --- server/scripts/script_commands.txt | 80 ++++++++++++++++++++++++++++---------- 1 file changed, 60 insertions(+), 20 deletions(-) diff --git a/server/scripts/script_commands.txt b/server/scripts/script_commands.txt index 82471ae..6df1f6e 100644 --- a/server/scripts/script_commands.txt +++ b/server/scripts/script_commands.txt @@ -1409,6 +1409,27 @@ getvariableofnpc() should not be used on them. --------------------------------------- +*getvariableofpc(, {, }) + +Returns a reference to a PC variable from the target player. +If 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(