mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-04-29 18:59:20 +02:00
Updated to OTCv8 3.1 rev 217
This commit is contained in:
parent
a160f49cc8
commit
c70abbdfdd
@ -497,7 +497,9 @@ function initCallbacks()
|
|||||||
onRemoveItem = botContainerRemoveItem,
|
onRemoveItem = botContainerRemoveItem,
|
||||||
onGameEditText = botGameEditText,
|
onGameEditText = botGameEditText,
|
||||||
onSpellCooldown = botSpellCooldown,
|
onSpellCooldown = botSpellCooldown,
|
||||||
onSpellGroupCooldown = botGroupSpellCooldown
|
onSpellGroupCooldown = botGroupSpellCooldown,
|
||||||
|
onQuestLog = botGameQuestLog,
|
||||||
|
onQuestLine = botGameQuestLine
|
||||||
})
|
})
|
||||||
|
|
||||||
connect(Tile, {
|
connect(Tile, {
|
||||||
@ -560,7 +562,9 @@ function terminateCallbacks()
|
|||||||
onAttackingCreatureChange = botAttackingCreatureChange,
|
onAttackingCreatureChange = botAttackingCreatureChange,
|
||||||
onGameEditText = botGameEditText,
|
onGameEditText = botGameEditText,
|
||||||
onSpellCooldown = botSpellCooldown,
|
onSpellCooldown = botSpellCooldown,
|
||||||
onSpellGroupCooldown = botGroupSpellCooldown
|
onSpellGroupCooldown = botGroupSpellCooldown,
|
||||||
|
onQuestLog = botGameQuestLog,
|
||||||
|
onQuestLine = botGameQuestLine
|
||||||
})
|
})
|
||||||
|
|
||||||
disconnect(Tile, {
|
disconnect(Tile, {
|
||||||
@ -789,4 +793,14 @@ end
|
|||||||
function botGroupSpellCooldown(iconId, duration)
|
function botGroupSpellCooldown(iconId, duration)
|
||||||
if botExecutor == nil then return false end
|
if botExecutor == nil then return false end
|
||||||
safeBotCall(function() botExecutor.callbacks.onGroupSpellCooldown(iconId, duration) end)
|
safeBotCall(function() botExecutor.callbacks.onGroupSpellCooldown(iconId, duration) end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function botGameQuestLog(quests)
|
||||||
|
if botExecutor == nil then return false end
|
||||||
|
safeBotCall(function() botExecutor.callbacks.onGameQuestLog(quests) end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function botGameQuestLine(quests)
|
||||||
|
if botExecutor == nil then return false end
|
||||||
|
safeBotCall(function() botExecutor.callbacks.onGameQuestLine(questId, questMissions) end)
|
||||||
end
|
end
|
@ -72,7 +72,9 @@ function executeBot(config, storage, tabs, msgCallback, saveConfigCallback, relo
|
|||||||
onGameEditText = {},
|
onGameEditText = {},
|
||||||
onGroupSpellCooldown = {},
|
onGroupSpellCooldown = {},
|
||||||
onSpellCooldown = {},
|
onSpellCooldown = {},
|
||||||
onRemoveItem = {}
|
onRemoveItem = {},
|
||||||
|
onGameQuestLog = {},
|
||||||
|
onGameQuestLine = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- basic functions & classes
|
-- basic functions & classes
|
||||||
@ -404,6 +406,26 @@ function executeBot(config, storage, tabs, msgCallback, saveConfigCallback, relo
|
|||||||
callback(iconId, duration)
|
callback(iconId, duration)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
onGameQuestLog = function(quests)
|
||||||
|
local tmp = {}
|
||||||
|
for j,questEntry in pairs(quests) do
|
||||||
|
local id, name, completed = unpack(questEntry)
|
||||||
|
table.insert(tmp, { id = id, name = name, completed = completed })
|
||||||
|
end
|
||||||
|
for i, callback in ipairs(context._callbacks.onGameQuestLog) do
|
||||||
|
callback(tmp)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
onGameQuestLine = function(questId, questMissions)
|
||||||
|
local tmp = {}
|
||||||
|
for i,questMission in pairs(questMissions) do
|
||||||
|
local name, description = unpack(questMission)
|
||||||
|
table.insert(tmp, { name = name, description = description })
|
||||||
|
end
|
||||||
|
for i, callback in ipairs(context._callbacks.onGameQuestLine) do
|
||||||
|
callback(questId, tmp)
|
||||||
|
end
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
@ -225,6 +225,16 @@ context.onGroupSpellCooldown = function(callback)
|
|||||||
return context.callback("onGroupSpellCooldown", callback)
|
return context.callback("onGroupSpellCooldown", callback)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- onGameQuestLog - callback = function(quests)
|
||||||
|
context.onGameQuestLog = function(callback)
|
||||||
|
return context.callback("onGameQuestLog", callback)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- onGameQuestLine - callback = function(questMission)
|
||||||
|
context.onGameQuestLine = function(callback)
|
||||||
|
return context.callback("onGameQuestLine", callback)
|
||||||
|
end
|
||||||
|
|
||||||
-- CUSTOM CALLBACKS
|
-- CUSTOM CALLBACKS
|
||||||
|
|
||||||
-- listen(name, callback) -- callback = function(text, channelId, pos)
|
-- listen(name, callback) -- callback = function(text, channelId, pos)
|
||||||
|
@ -94,6 +94,18 @@ function refreshContainerPages(container)
|
|||||||
nextPageButton:setEnabled(true)
|
nextPageButton:setEnabled(true)
|
||||||
nextPageButton.onClick = function() g_game.seekInContainer(container:getId(), container:getFirstIndex() + container:getCapacity()) end
|
nextPageButton.onClick = function() g_game.seekInContainer(container:getId(), container:getFirstIndex() + container:getCapacity()) end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local pagePanel = container.window:recursiveGetChildById('pagePanel')
|
||||||
|
if pagePanel then
|
||||||
|
pagePanel.onMouseWheel = function(widget, mousePos, mouseWheel)
|
||||||
|
if pages == 1 then return end
|
||||||
|
if mouseWheel == MouseWheelUp then
|
||||||
|
return prevPageButton.onClick()
|
||||||
|
else
|
||||||
|
return nextPageButton.onClick()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function onContainerOpen(container, previousContainer)
|
function onContainerOpen(container, previousContainer)
|
||||||
@ -126,6 +138,20 @@ function onContainerOpen(container, previousContainer)
|
|||||||
child:onDrop(widget, mousePos, true)
|
child:onDrop(widget, mousePos, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
containerWindow.onMouseRelease = function(widget, mousePos, mouseButton)
|
||||||
|
if mouseButton == MouseButton4 then
|
||||||
|
if container:hasParent() then
|
||||||
|
return g_game.openParent(container)
|
||||||
|
end
|
||||||
|
elseif mouseButton == MouseButton5 then
|
||||||
|
for i, item in ipairs(container:getItems()) do
|
||||||
|
if item:isContainer() then
|
||||||
|
return g_game.open(item, container)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- this disables scrollbar auto hiding
|
-- this disables scrollbar auto hiding
|
||||||
local scrollbar = containerWindow:getChildById('miniwindowScrollBar')
|
local scrollbar = containerWindow:getChildById('miniwindowScrollBar')
|
||||||
|
@ -211,6 +211,7 @@ GameCreaturesMana = 122 -- get mana from server for creatures other than Player
|
|||||||
GameQuickLootFlags = 123 -- enables quick loot feature for all protocols
|
GameQuickLootFlags = 123 -- enables quick loot feature for all protocols
|
||||||
GameDontMergeAnimatedText = 124
|
GameDontMergeAnimatedText = 124
|
||||||
GameMissionId = 125
|
GameMissionId = 125
|
||||||
|
GameItemCustomAttributes = 126
|
||||||
|
|
||||||
LastGameFeature = 130
|
LastGameFeature = 130
|
||||||
|
|
||||||
|
BIN
otclient_dx.exe
BIN
otclient_dx.exe
Binary file not shown.
BIN
otclient_gl.exe
BIN
otclient_gl.exe
Binary file not shown.
BIN
otclient_linux
BIN
otclient_linux
Binary file not shown.
BIN
otclient_mac
BIN
otclient_mac
Binary file not shown.
BIN
otclientv8.apk
BIN
otclientv8.apk
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user