summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/main.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index 5e897901b..e1b93fa46 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -337,6 +337,13 @@ function script gf_charname {
return .@value$[0];
}
+// Get some char ID from account ID, even if offline
+// ( Name )
+function script gf_charid {
+ .@nb = query_sql("SELECT char_id FROM `char` WHERE account_id="+escape_sql(getarg(0))+" LIMIT 1", .@value$);
+ return .@value$[0];
+}
+
// Request pincode and validate it. Use any non-4-digits code to cancel. Failure will dc you.
// Returns 1 if pin check is OK.
function script validatepin {