Hello, with this script you can install lua socket, lua ex, luasql, lua wathever on your server!
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
This version is 1.2.
Features:
With this v 1.2 it came with
Here is the attach :View attachment modules1.2.rar
With this you can config with an XML all modules:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<modules>
<module name="socket"/>
<module name="socket.http"/>
<module name="luasql.sqlite3"/>
<module name="luasql.mysql"/>
<module name="ex"/>
<module name="rings"/>
<module name="coxpcall"/>
<module name="copas"/>
<module name="ltn12"/>
<module name="gd"/>
<!--Example-->
<module name="example"/>
<module dofile="dofile example.lua"/>
</modules>
To instal:
Code:
1º - download the attached file.
2º - Put folder modules on data.
3º -
If you use TFS 0.3.6 just put modules.lua on data/lib
-----------
If you use TFS 0.3.4 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 [B]global.lua[/B]:
dofile('data/modules.lua')
-----------
4º - Reload and done!
You can download more libs here: LuaForge: Top Downloads
Recomended libs:
- GD lib
- Lua file system
- Lua SSL
- Lua conio
- CURL
You can create you own modules using this example:
Lua:
--[[
Example how to create a module.
]]
--Module example
module('example')
_VERSION = "V 1.0"
-- In scripts you use: example.foo(v)
function foo(v)
return type(v)..' '..tostring(#(v or ''))
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"/>
This version is 1.2.
Features:
- You can require a lib
- You can dofile in a script <module dofile="dofile example.lua"/>
- At same time you can require and dofile: <module name="conio" dofile="conio.luac"/>
With this v 1.2 it came with
- socket
- luasql
- ex
- rings
- coxpcall
- copas
- gd
Here is the attach :View attachment modules1.2.rar
Last edited: