New version:
http://otland.net/f163/lua-modules-socket-luasql-etc-libs-v1-2-a-96609/
-
Hello, with this script you can install lua socket, lua ex, luasql, lua wathever on your server!
Its verry easy, it works on all otserv, the real problem its the bad instalation.
With this you can config with an XML all modules:
Its just add one line and files on folder.
To instal:
You can download more libs here: LuaForge: Top Downloads
Recomended libs:
You can create you own modules using this example:
How to install one module.
First download one module.
Lets use GD lib how as example. http://luaforge.net/frs/download.php/1594/lua-gd-2.0.33r2-win32.zip (1.6mb)
When you finish open .zip and open folder.
Inside it will have aprox 8dlls (in some libs only one dll)
Copy all DLLS an paste on data/modules/scripts and add it on modules.xml
http://otland.net/f163/lua-modules-socket-luasql-etc-libs-v1-2-a-96609/
-
Hello, with this script you can install lua socket, lua ex, luasql, lua wathever on your server!
Its verry easy, it works on all otserv, the real problem its the bad instalation.
With this you can config with an XML all modules:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<modules>
<module name="example"/>
<module name="socket"/>
<module name="rings"/>
<module name="luasql.mysql"/>
<module name="ex"/>
</modules>
To instal:
Code:
1º - download the attached file.
2º - Put folder modules on data.
32º -
If you use TFS 0.3.6 just put modules.lua on data/lib
-----------
If you use TFS 0.3.5 or less put modules on data/lib and on last line of data.lua add it:
dofile('data/lib/modules.lua')
-----------
If you use Open tibia put modules.lua on data and add it on global.lua:
dofile('data/modules.lua')
-----------
4º - Reload and done!
You can download more libs here: LuaForge: Top Downloads
Recomended libs:
- GD lib
- Lua file system
You can create you own modules using this example:
Lua:
--[[
Example how to create a module.
]]
--declare all used libs to save memory
local string = require("string")
local base = _G
-- Module name
module('example')
-- Module version
_VERSION = "Example lib 1.0"
--- and here functions
function myprint(...) --example.myprint
local arg = {...}
for i,b in base.pairs(arg) do
io.write(tostring(b))
if i ~= #arg then
io.write(', ')
end
end
end
function array(...) -- example.array
return {...}
end
function replace(s,m,d) --example.replace
return s:gsub(m,d)
end
How to install one module.
First download one module.
Lets use GD lib how as example. http://luaforge.net/frs/download.php/1594/lua-gd-2.0.33r2-win32.zip (1.6mb)
When you finish open .zip and open folder.
Inside it will have aprox 8dlls (in some libs only one dll)
Copy all DLLS an paste on data/modules/scripts and add it on modules.xml
Code:
<module name="gd"/>
Attachments
-
modules.zip1 MB · Views: 593 · VirusTotal
Last edited: