diff options
author | gumi <git@gumi.ca> | 2020-05-12 18:22:36 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2020-07-20 11:19:23 -0400 |
commit | 03b2023e72364675159447dc4b328ab8c775e3bd (patch) | |
tree | 432e235d3ee70b1a40caf133a1f76e36211c2b74 /npc/functions/main.txt | |
parent | 8a43be3ad6c70a866338ffcebe5fe40392dd23cd (diff) | |
download | serverdata-03b2023e72364675159447dc4b328ab8c775e3bd.tar.gz serverdata-03b2023e72364675159447dc4b328ab8c775e3bd.tar.bz2 serverdata-03b2023e72364675159447dc4b328ab8c775e3bd.tar.xz serverdata-03b2023e72364675159447dc4b328ab8c775e3bd.zip |
add functions to get Legacy and Vault account data
Diffstat (limited to 'npc/functions/main.txt')
-rw-r--r-- | npc/functions/main.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/npc/functions/main.txt b/npc/functions/main.txt index 81204400..1ae37a35 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -14,12 +14,14 @@ * @return the account id */ function script nameid2id { - if (getdatatype(getarg(0, "")) & DATATYPE_STR != 0) { + if ((getdatatype(getarg(0, "")) & DATATYPE_STR) != 0) { if (getarg(0, "") == "") { return playerattached(); } else { return getcharid(CHAR_ID_ACCOUNT, getarg(0)); } + } else if (getarg(0) == 0) { + return playerattached(); } else { return getarg(0); } |