Unofficial Noxious Open Tibia Wiki: info, downloads, tools, calculators...
Welcome to the holy bible of OTClientV8 scripting. Here's all the documentation you need to get yourself started and build powerful macros, cavebots and UIs.
/modules/game_bot/functions/
callback(callbackType, callback)
onKeyDown(callback)
onKeyPress(callback)
onKeyUp(callback)
onTalk(callback)
onTextMessage(callback)
onLoginAdvice(callback)
onAddThing(callback)
onRemoveThing(callback)
onCreatureAppear(callback)
onCreatureDisappear(callback)
onCreaturePositionChange(callback)
onCreatureHealthPercentChange(callback)
onUse(callback)
onUseWith(callback)
onContainerOpen(callback)
onContainerClose(callback)
onContainerUpdateItem(callback)
onMissle(callback)
onAnimatedText(callback)
onStaticText(callback)
onChannelList(callback)
onOpenChannel(callback)
onCloseChannel(callback)
onChannelEvent(callback)
onTurn(callback)
onWalk(callback)
listen(name, callback)
onPlayerPositionChange(callback)
onPlayerHealthChange(callback)
Config.exist(dir)
Config.create(dir)
Config.list(dir)
Config.parse(data)
Config.load(dir, name)
Config.loadRaw(dir, name)
Config.save(dir, name, value, forcedExtension)
Config.remove(dir, name)
Config.setup(dir, widget, configExtension, callback)
local refresh()
widget.list.onOptionChange(widget)
widget.switch.onClick()
widget.add.onClick()
widget.edit.onClick()
widget.remove.onClick()
isOn()
isOff()
setOn(val)
setOff(val)
save(data)
getActiveConfigName()
North = 0 East = 1 South = 2 West = 3 NorthEast = 4 SouthEast = 5 SouthWest = 6 NorthWest = 7 InventorySlotOther = 0 InventorySlotHead = 1 InventorySlotNeck = 2 InventorySlotBack = 3 InventorySlotBody = 4 InventorySlotRight = 5 InventorySlotLeft = 6 InventorySlotLeg = 7 InventorySlotFeet = 8 InventorySlotFinger = 9 InventorySlotAmmo = 10 InventorySlotPurse = 11 InventorySlotFirst = 1 InventorySlotLast = 10
botWidget = true botIcon = true
setOn(val)
onClick(widget)
onGeometryChange(widget)
context.macro(timeout, name, hotkey, callback, parent)
macro.isOn()
macro.isOff()
macro.toggle(widget)
macro.setOn(val)
macro.setOff(val)
macro.callback(macro)
context.hotkey(keys, name, callback, parent, single)
hotkeyData.callback()
context.singlehotkey(keys, name, callback, parent)
context.schedule(timeout, callback)
context.delay(duration)
context.getMapView()
context.zoomIn()
context.zoomOut()
context.getSpectators(param1, param2)
context.getCreatureById(id, multifloor)
context.getCreatureByName(name, multifloor)
context.getPlayerByName(name, multifloor)
context.findAllPaths(start, maxDist, params)
context.translateAllPathsToPath(paths, destPos)
context.findPath(startPos, destPos, maxDist, params)
context.autoWalk(destination, maxDist, params)
context.getTileUnderCursor()
context.canShoot(pos, distance)
context.isTrapped(creature)
context.NPC.talk(text)
context.NPC.isTrading()
context.NPC.getSellItems()
context.NPC.getBuyItems()
context.NPC.getSellQuantity(item)
context.NPC.canTradeItem(item)
context.NPC.sell(item, count, ignoreEquipped)
context.NPC.buy(item, count, ignoreCapacity, withBackpack)
context.NPC.sellAll()
context.NPC.closeTrade()
context.hasCondition()
context.isPoisioned()
context.isBurnining()
context.isEnergized()
context.isDrunk()
context.hasManaShield()
context.isParalyzed()
context.hasHaste()
context.hasSwords()
context.isInFight()
context.canLogout()
context.isDrowning()
context.isFreezing()
context.isDazzled()
context.isCursed()
context.hasPartyBuff()
context.hasPzLock()
context.hasPzBlock()
context.isPzLocked()
context.isPzBlocked()
context.isInProtectionZone()
context.hasPz()
context.isInPz()
context.isBleeding()
context.isHungry()
context.name()
context.hp()
context.mana()
context.hppercent()
context.manapercent()
context.maxhp()
context.maxmana()
context.hpmax()
context.manamax()
context.cap()
context.freecap()
context.maxcap()
context.capmax()
context.exp()
context.lvl()
context.level()
context.mlev()
context.magic()
context.mlevel()
context.soul()
context.stamina()
context.voc()
context.vocation()
context.bless()
context.blesses()
context.blessings()
context.pos()
context.posx()
context.posy()
context.posz()
context.direction()
context.speed()
context.skull()
context.outfit()
context.setOutfit(outfit)
context.setSpeed(value)
context.walk(dir)
context.turn(dir)
context.getChannels()
context.getChannelId(name)
context.yell(text)
context.talkChannel(channel, text)
context.talkPrivate(receiver, text)
context.talkNpc(text)
context.saySpell(text, lastSpellTimeout)
context.setSpellTimeout()
context.use(thing, subtype)
context.usewith(thing, target, subtype)
context.useRune(itemid, target, lastSpellTimeout)
context.findItem(itemId, subType)
context.loadScript(path, callback)
context.loadRemoteScript(url, callback)
context.BotServer.init(name, channel)
onMessage(message, socketId)
onClose(message, socketId)
context.BotServer.terminate()
context.BotServer.listen(topic, callback) – callback(name, message, topic) – message is parsed json = table
context.BotServer.send(topic, message)
context.getSoundChannel()
context.playSound(file)
context.stopSound()
context.playAlarm()
context.test()
context.encode(data, indent)
context.decode(text) local status, result = pcall(function()
context.displayGeneralBox(title, message, buttons, onEnterCallback, onEscapeCallback)
context.doScreenshot(filename)
context.getVersion()
UI.createWidget(name, parent)
UI.createWindow(name)
UI.Button(text, callback, parent)
UI.Config(parent)
UI.Container(callback, unique, parent, widget)
local updateItems()
widget.setItems(self, items)
widget.getItems()
UI.DualScrollPanel(params, callback, parent) – callback(widget, newParams)
widget.title.onClick()
widget.text.onTextChange(widget, text)
local update (dontSignal)
widget.scroll1.onValueChange(scroll, value)
widget.scroll2.onValueChange(scroll, value)
UI.DualScrollItemPanel(params, callback, parent) – callback(widget, newParams)
widget.title.onClick()
widget.item.onItemChange()
local update (dontSignal)
widget.scroll1.onValueChange(scroll, value)
widget.scroll2.onValueChange(scroll, value)
UI.Label(text, parent)
UI.Separator(parent)
UI.TextEdit(text, callback, parent)
UI.TwoItemsAndSlotPanel(params, callback, parent)
widget.title.onClick()
widget.slot.onOptionChange()
widget.item1.onItemChange()
widget.item2.onItemChange()
UI.EditorWindow(text, options, callback)
UI.SinglelineEditorWindow(text, options, callback)
UI.MultilineEditorWindow(text, options, callback)
UI.ConfirmationWindow(title, question, callback)
local onConfirm()
local closeWindow()
Discussion