From 0e6c33c6ebb0f10ce1a7cddca8a6325ee241b658 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 11 Aug 2019 16:41:22 -0300 Subject: New function: gf_charid(accid). This is for Refeer System. --- npc/functions/main.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'npc/functions/main.txt') 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 { -- cgit v1.2.3-60-g2f50