questlib.lua das befindet sich in deiner Quest ordner.
dann öffnest du die questlib (Notepad++ empfohlen) suchst nach mysql_query
dann kommt sowas:
PHP Code:
mysql_query = function(query)
local rt = io.open('CONFIG','r'):read('*all')
local pre= string.gsub(rt,'.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+)%s(%S+).+','-h%1 -u%2 -p%3 -D%4')
math.randomseed(os.time())
local fi,t,out = 'mysql_data_'..math.random(10^9)+math.random(2^4,2^10),{},{}
os.execute('mysql '..pre..' --e='..string.format('%q',query)..' > '..fi)
for av in io.open(fi,'r'):lines() do table.insert(t,split(av,'\t')) end; os.remove(fi);
for i = 2, table.getn(t) do table.foreach(t[i],function(a,b)
out[i-1] = out[i-1] or {}
out[i-1][a] = b
out[t[1][a]] = out[t[1][a]] or {}
out[t[1][a]][i-1] = b
end) end
return out
end
dann machst du
os.execute('mysql '..pre..' --e='..string.format('%q',query)..' > '..fi)
zu
os.execute('mysql '..pre..' -e'..string.format('%q',query)..' > '..fi)