mirror of
https://github.com/ProjectEQ/projecteqquests
synced 2026-08-12 00:26:10 -04:00
Copy the luasql_ext.lua from global/lib/lua/5.1/ and place that in the root game folder with your eqemu_config.json and edit the database information to mirror your connection requirements.
Example lua use:
```lua
local mysql = require("luasql_ext");
for id, level, locked_out in mysql.rows(con,string.format("SELECT DISTINCT c.`id`, c.`level` FROM group_id g INNER JOIN character_data c ON c.id = g.character_id WHERE g.group_id = %s", group:GetID())) do
if tonumber(level) <= dia_min_level then dia_min_level = tonumber(level) end
if tonumber(level) >= dia_max_level then dia_max_level = tonumber(level) end
dia_total_level = dia_total_level + tonumber(level);
dia_member_count = dia_member_count + 1;
end
```
```lua
local mysql = require("luasql_ext");
for id,name in mysql.rows(con,"SELECT id from npc_types WHERE id >= 211000 and id < 212000 and disable_instance = 1") do
disable_instance[id] = tonumber(id);
end
```
|
||
|---|---|---|
| .. | ||
| luasql | ||
| luasql_ext.lua | ||
| luasql_mysql.so | ||