From 03b2023e72364675159447dc4b328ab8c775e3bd Mon Sep 17 00:00:00 2001 From: gumi Date: Tue, 12 May 2020 18:22:36 -0400 Subject: add functions to get Legacy and Vault account data --- npc/functions/main.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'npc/functions/main.txt') 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); } -- cgit v1.2.3-70-g09d2