Hi-Tech API
Post url:
http://luac.mtasa.com/index.php
Post arguments:Name | Type | Description |
---|---|---|
luasource | file | The file content |
compile | value | Set to 1 to enable compilation |
debug | value | Set to 1 to enable debug information |
obfuscate | value | Set to 1 to enable some obfuscation Set to 2 to enable more obfuscation (From 1.5.2-9.07903) Set to 3 to enable even more obfuscation (From 1.5.6-9.18728) |
Linux example using curl:
FROM="example.lua"
TO="compiled.lua"
curl -s -X POST -F compile=1 -F debug=0 -F obfuscate=3 -F luasource=@$FROM http://luac.mtasa.com/ > $TO
TO="compiled.lua"
curl -s -X POST -F compile=1 -F debug=0 -F obfuscate=3 -F luasource=@$FROM http://luac.mtasa.com/ > $TO
Linux example using luac replacement:
luac_mta -e3 -o compiled.lua example.lua
if [ $? -ne 0 ]; then
echo "Error"
fi
if [ $? -ne 0 ]; then
echo "Error"
fi
Get luac_mta (R13 2019-07-12) for Linux 32 bit or Linux 64 bit
Windows batch file example using curl:
set FROM="example.lua"
set TO="compiled.lua"
curl.exe -s -X POST -F compile=1 -F debug=0 -F obfuscate=3 -F luasource=@%FROM% http://luac.mtasa.com/ > %TO%
set TO="compiled.lua"
curl.exe -s -X POST -F compile=1 -F debug=0 -F obfuscate=3 -F luasource=@%FROM% http://luac.mtasa.com/ > %TO%
Get curl.exe from http://luac.mtasa.com/files/windows/x86/curl.exe
(Original from http://curl.haxx.se/download.html)
Windows example using luac.exe replacement:
luac_mta.exe -e3 -o compiled.lua example.lua
IF NOT ERRORLEVEL 1 goto lp1
echo "Error"
:lp1
IF NOT ERRORLEVEL 1 goto lp1
echo "Error"
:lp1
Get luac_mta.exe (R12 2019-07-12) for Micro$oft Windows
Lua example:
local FROM="example.lua"
local TO="compiled.lua"
fetchRemote( "http://luac.mtasa.com/?compile=1&debug=0&obfuscate=3", function(data) fileSave(TO,data) end, fileLoad(FROM), true )
local TO="compiled.lua"
fetchRemote( "http://luac.mtasa.com/?compile=1&debug=0&obfuscate=3", function(data) fileSave(TO,data) end, fileLoad(FROM), true )