Finally! OTAL has been released!
You can use 188 lua functions!
Is just enter on O.T.A.L - Open Tibia Advanced Lib
and download, it's good read manual.
This lib have an self install, you just need add
in last line of data.lua or global.lua (unzip all content on folder lib)
This lib, wne executed at first time this lib will set all tables on DB and create folder data/storage to save files .tbl (to functions (saveTable(table,name) andgetTable(name), Save tables in files)
and create file called Your Server Function List.txt, it contains ALL lua functions of your server, and file called OTAL-REINSTALL, delete it to reinstall lib.
Use TFS console to see it:
TFS gui dont show it.
All functions:
Please report bugs!
You can use 188 lua functions!
Is just enter on O.T.A.L - Open Tibia Advanced Lib
and download, it's good read manual.
This lib have an self install, you just need add
Code:
dofile(getDataDir() .. 'lib/index.lua')
This lib, wne executed at first time this lib will set all tables on DB and create folder data/storage to save files .tbl (to functions (saveTable(table,name) andgetTable(name), Save tables in files)
and create file called Your Server Function List.txt, it contains ALL lua functions of your server, and file called OTAL-REINSTALL, delete it to reinstall lib.
Use TFS console to see it:
TFS gui dont show it.
All functions:
Lua:
xml:open(file[,kind]) --- Xmls
xml:setSess(sessname,tagname,name)
xml:getSess(SessName)
xml:readSess(SessName)
xml:readFree(tagname)
vip.getVip(cid) --- Vip
vip.getVipByAcc(acc)
vip.setVip(cid,time)
vip.getVipByAccount(acc)
vip.hasVip(cid)
vip.accountHasVip(acc)
vip.getDays(days)
vip.addVipByAccount(acc,time)
vip.setVipByAccount(acc,time)
vip.returnVipString(cid)
doScrollMessage(uid, message) -- Tibia
doSummonCreatureWithCheck(name, pos)
isLevel(cid,level)
stringcontains(txt, str)
isWalkable(pos)
getStringCount(msg)
isOnline(name)
getAccountStorageValue(accid,value_id)
setAccountStorageValue(accid,value_id,value)
doInArea(pos,radius,luaString,var)
setPlayerName(cid,name,msg)
string.trim(str)
string.explode(str, sep[,limit])
doActionForAllPlayers(luaString)
isWeapon(uid)
isArmor(uid)
hasSqm(pos)
getFileString(file[,limit])
getPlayerInfo(cid,val)
executeInArea(cmd, pos, area)
math.percent(v, t, f)
math.module(x)
math.interval(x, y)
findItemById(pos, id)
doPlayerAddDepotItem(cid, item, count)
getInstantSpells(vocid)
setPlayerRecoveryKey(cid)
getPlayerTotalDefense(cid)
ddNumberOnArray(array, number)
getArrPosByName(array, name)
getCountOnArr(array, search)
doCalculateArray(array, calc)
changeLookDir(cid, dir)
getLuaFunctions()
doFindItemInPos(itens, pos)
doDelayAttack(cid, delay, min, max, type, effect, projectile, frompos, topos)
tableToString(tb)
saveTable(table,name)
getTable(name)
getItemIdByName2(name)
string.expand(s)
var_dump(...)
printT(tx,t)
string.impode(arr,sep)
animatedTextBig(pos,text,color)
doWriteLogFile(file, text,line)
getDirFiles(dir, ext)
getPlayerTotalArmor(cid)
getPlayerTotalAttack(cid)
onFile(type, directory, content)
isStair(uid, stepin, rope, ground, ladder)
table.find(t, v, c)
table.totext(t, i)
table.countv(t, i)
table.maxv(t)
table.clean(t, ...)
table.asort(t, s)
table.tofile(t, nf, tn)
utf8Decode(str)
utf8Encode(str)
socket.dns.toip(ip) -- Dns --- Socket
socket.dns.gethostname()
socket.dns.tohostname(address)
socket.http.request(url [, body]) --- HTTP
ltn12.filter.chain(filter1, filter2 [, ... filterN]) --- lnt12
ltn12.filter.cycle(low [, ctx, extra])
ltn12.pump.all(source, sink)
ltn12.pump.step(source, sink)
ltn12.sink.chain(filter, sink)
ltn12.sink.error(message)
ltn12.sink.file(handle, message)
ltn12.sink.null()
ltn12.sink.simplify(sink)
ltn12.sink.table([table])
ltn12.source.cat(source1 [, source2, ..., sourceN])
ltn12.source.chain(source, filter)
ltn12.source.empty()
ltn12.source.error(message)
ltn12.source.file(handle, message)
ltn12.source.simplify(source)
ltn12.source.string(string)
mime.normalize([marker]) -- Mime functions
mime.decode(vr)
mime.encode(vt)
mime.stuff()
mime.wrap("text" [, length])
mime.b64(C [, D])
mime.dot(m [, B])
mime.eol(C [, D, marker])
mime.qp(C [, D, marker])
mime.qpwrp(n [, B, length])
mime.unb64(C [, D])
mime.unqp(C [, D])
mime.wrp(n [, B, length])
socket.bind(address, port [, backlog]) -- Socket
socket.connect(address, port [, locaddr, locport])
socket.newtry(finalizer)
socket.protect(func)
socket.select(recvt, sendt [, timeout])
socket.sink(mode, socket)
socket.skip(d [, ret1, ret2 ... retN])
socket.sleep(time)
socket.source(mode, socket [, length])
socket.gettime()
socket.try(ret1 [, ret2 ... retN])
socket.tcp() -- Tcp functions
server:accept()
master:bind(address, port)
master:close()
master:connect(address, port)
client:getpeername()
master:getsockname()
master:getstats()
master:listen(backlog)
client:receive([pattern [, prefix]])
client:send(data [, i [, j]])
client:setoption(option [, value])
master:setstats(received, sent, age)
master:settimeout(value [, mode])
client:shutdown(mode)
socket.udp() -- Udp functions
connected:close()
connected:getpeername()
connected:getsockname()
connected:receive([size])
unconnected:receivefrom([size])
connected:send(datagram)
unconnected:sendto(datagram, ip, port)
unconnected:setpeername(address, port)
connected:setpeername('*')
unconnected:setsockname(address, port)
connected:setoption(option [, value])
connected:settimeout(value)
ex.getenv(name) --- Ex lib
ex.setenv(name, value)
ex.environ()
ex.chdir(pathname)
ex.mkdir(pathname)
ex.currentdir()
ex.dir(pathname)
ex.dirent(pathname)
ex.lock(file, mode, offset, length)
ex.unlock(file, offset, length)
ex.pipe()
ex.sleep(interval, [unit])
ex.spawn(...)
ex.wait(proc)
conn:close() --- Luasql
conn:commit()
conn:execute(statement)
conn:rollback()
conn:setautocommit(boolean)
cur:close()
cur:fetch([table[,modestring]])
cur:getcolnames()
cur:numrows()
env:connect(sourcename[,username[,password[,hostname[,port]]]])
rings.new(env) --- Rings
state:close ()
state:dostring(string, ...)
remotedostring(string, ...)
stable.get(key)
stable.set(key, value)
coxpcall(f, err) --- Coexpcall [url]http://coxpcall.luaforge.net/index.htm[/url]
copcall(f, ...)
copas.addserver(server, handler[, timeout]) --- Copas [url=http://www.keplerproject.org/copas/index.html]Copas - Coroutine Oriented Portable Asynchronous Services for Lua[/url] (Coroutine Oriented Portable Asynchronous Services)
copas.addthread(thrd[, ...])
copas.loop(timeout)
copas.step(timeout)
copas.flush(skt)
copas.receive(skt, pattern)
copas.send(skt, data)
copas.wrap(skt)
Please report bugs!
Attachments
-
otal.rar808.2 KB · Views: 329 · VirusTotal
Last edited: