Updated to OTCv8 3.1 rev 224

This commit is contained in:
OTCv8
2022-06-06 22:04:52 +00:00
parent 00ca45bd62
commit 9cfff63e16
111 changed files with 2292 additions and 1465 deletions

View File

@@ -73,12 +73,15 @@ function executeBot(config, storage, tabs, msgCallback, saveConfigCallback, relo
onGroupSpellCooldown = {},
onSpellCooldown = {},
onRemoveItem = {},
onInventoryChange = {},
onGameQuestLog = {},
onGameQuestLine = {}
}
-- basic functions & classes
context.print = print
context.bit32 = bit32
context.bit = bit
context.pairs = pairs
context.ipairs = ipairs
context.tostring = tostring
@@ -118,6 +121,7 @@ function executeBot(config, storage, tabs, msgCallback, saveConfigCallback, relo
context.g_sounds = g_sounds
context.g_window = g_window
context.g_mouse = g_mouse
context.g_keyboard = g_keyboard
context.g_things = g_things
context.g_settings = g_settings
context.g_platform = {
@@ -391,9 +395,9 @@ function executeBot(config, storage, tabs, msgCallback, saveConfigCallback, relo
callback(container, slot, item)
end
end,
onStatesChange = function(states, oldStates)
onStatesChange = function(player, states, oldStates)
for i, callback in ipairs(context._callbacks.onStatesChange) do
callback(states, oldStates)
callback(player, states, oldStates)
end
end,
onGroupSpellCooldown = function(iconId, duration)
@@ -406,6 +410,16 @@ function executeBot(config, storage, tabs, msgCallback, saveConfigCallback, relo
callback(iconId, duration)
end
end,
onSpellCooldown = function(iconId, duration)
for i, callback in ipairs(context._callbacks.onSpellCooldown) do
callback(iconId, duration)
end
end,
onInventoryChange = function(player, slot, item, oldItem)
for i, callback in ipairs(context._callbacks.onInventoryChange) do
callback(player, slot, item, oldItem)
end
end,
onGameQuestLog = function(quests)
local tmp = {}
for j,questEntry in pairs(quests) do