diff options
Diffstat (limited to 'npc/functions/main.txt')
-rw-r--r-- | npc/functions/main.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/npc/functions/main.txt b/npc/functions/main.txt index 6bcc6d515..8fc2accc1 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -368,28 +368,28 @@ function script delinventorylist { // Get some acc id, even if offline // ( Name ) function script gf_accid { - .@nb = query_sql("SELECT account_id FROM `char` WHERE name='"+escape_sql(getarg(0))+"' LIMIT 2", .@value); + .@nb = query_sql("SELECT `account_id` FROM `char` WHERE `name`='"+escape_sql(getarg(0))+"' LIMIT 1", .@value); return .@value[0]; } // Get some char id, even if offline // ( Name ) function script gf_charnameid { - .@nb = query_sql("SELECT char_id FROM `char` WHERE name='"+escape_sql(getarg(0))+"' LIMIT 2", .@value); + .@nb = query_sql("SELECT `char_id` FROM `char` WHERE `name`='"+escape_sql(getarg(0))+"' LIMIT 1", .@value); return .@value[0]; } // Get some char name from char ID, even if offline // ( Name ) function script gf_charname { - .@nb = query_sql("SELECT name FROM `char` WHERE char_id="+escape_sql(getarg(0))+" LIMIT 2", .@value$); + .@nb = query_sql("SELECT `name` FROM `char` WHERE `char_id`="+escape_sql(getarg(0))+" LIMIT 1", .@value$); 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$); + .@nb = query_sql("SELECT `char_id` FROM `char` WHERE `account_id`="+escape_sql(getarg(0))+" LIMIT 1", .@value$); return .@value$[0]; } |