Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::LUA

Quests::LUA Section regarding LUA scripts, help, questions, answers

Reply
 
Thread Tools Display Modes
  #1  
Old 01-02-2019, 09:00 AM
phate8908
Fire Beetle
 
Join Date: Dec 2018
Posts: 12
Default Client:GetAccountName()

this adds GetAccountName() to client in lua since for some reason we don't have it there

Append to client_ext.lua
Code:
function Client:AccountName()
	local AccountName = ""
	local MySQLi = require('MySQLi')
	local connection = MySQLi:Connect()
	connection:query("select name from account where id = '" .. self:AccountID() .. "'")
	local result = connection:store_result()
	for i,name in result:rows() do
      AccountName = name
	end
	result:free()
	return AccountName
end
WARNING: requires MySQL Connect to work
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:32 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3