mirror of
https://github.com/OTCv8/otclientv8.git
synced 2026-01-21 01:46:22 +01:00
Version 0.998 BETA, mostly bug fixes
This commit is contained in:
@@ -8,7 +8,6 @@ configEditorText = nil
|
|||||||
configList = nil
|
configList = nil
|
||||||
botPanel = nil
|
botPanel = nil
|
||||||
local botMessages = nil
|
local botMessages = nil
|
||||||
local showingDocumentation = false
|
|
||||||
local configCopy = ""
|
local configCopy = ""
|
||||||
local enableButton = nil
|
local enableButton = nil
|
||||||
local executeEvent = nil
|
local executeEvent = nil
|
||||||
@@ -144,6 +143,16 @@ function online()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function offline()
|
||||||
|
botButton:hide()
|
||||||
|
configWindow:hide()
|
||||||
|
clearConfig()
|
||||||
|
removeEvent(executeEvent)
|
||||||
|
removeEvent(checkMsgsEvent)
|
||||||
|
executeEvent = nil
|
||||||
|
checkMsgsEvent = nil
|
||||||
|
end
|
||||||
|
|
||||||
function toggleBot()
|
function toggleBot()
|
||||||
botConfig.enabled = not botConfig.enabled
|
botConfig.enabled = not botConfig.enabled
|
||||||
if botConfig.enabled then
|
if botConfig.enabled then
|
||||||
@@ -176,7 +185,6 @@ function editConfig()
|
|||||||
configEditorText:setEditable(true)
|
configEditorText:setEditable(true)
|
||||||
activeTab = mainTab
|
activeTab = mainTab
|
||||||
configTab:selectTab(mainTab)
|
configTab:selectTab(mainTab)
|
||||||
showingDocumentation = false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function split2(str, delimiter)
|
local function split2(str, delimiter)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ ConfigTabBarPanel < MoveableTabBarPanel
|
|||||||
|
|
||||||
MainWindow
|
MainWindow
|
||||||
id: configWindow
|
id: configWindow
|
||||||
size: 650 500
|
size: 650 497
|
||||||
!text: tr("Config editor")
|
!text: tr("Config editor")
|
||||||
|
|
||||||
Label
|
Label
|
||||||
|
|||||||
@@ -25,9 +25,6 @@ macro(5000, "macro send link", "f5", function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
macro(1000, "flag tiles", function()
|
macro(1000, "flag tiles", function()
|
||||||
local staticText = StaticText.create()
|
|
||||||
staticText:addMessage("t", 9, "xDDD")
|
|
||||||
local tile = player:getTile()
|
|
||||||
tile:setText("Hello =)", "red")
|
tile:setText("Hello =)", "red")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
@@ -155,6 +155,7 @@ function executeBot(config, storage, panel, msgCallback)
|
|||||||
hotkey = hotkey,
|
hotkey = hotkey,
|
||||||
switch = switch
|
switch = switch
|
||||||
})
|
})
|
||||||
|
return context._macros[#context._macros]
|
||||||
end
|
end
|
||||||
|
|
||||||
-- hotkey(keys, callback)
|
-- hotkey(keys, callback)
|
||||||
@@ -184,6 +185,7 @@ function executeBot(config, storage, panel, msgCallback)
|
|||||||
switch = switch,
|
switch = switch,
|
||||||
single = false
|
single = false
|
||||||
}
|
}
|
||||||
|
return context._hotkeys[keys]
|
||||||
end
|
end
|
||||||
|
|
||||||
-- singlehotkey(keys, callback)
|
-- singlehotkey(keys, callback)
|
||||||
@@ -213,6 +215,7 @@ function executeBot(config, storage, panel, msgCallback)
|
|||||||
switch = switch,
|
switch = switch,
|
||||||
single = true
|
single = true
|
||||||
}
|
}
|
||||||
|
return context._hotkeys[keys]
|
||||||
end
|
end
|
||||||
|
|
||||||
-- schedule(timeout, callback)
|
-- schedule(timeout, callback)
|
||||||
@@ -283,7 +286,7 @@ function executeBot(config, storage, panel, msgCallback)
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- delay(duration)
|
-- delay(duration) -- block execution of current macro/hotkey/callback for x milliseconds
|
||||||
context.delay = function(duration)
|
context.delay = function(duration)
|
||||||
if not context._currentExecution then
|
if not context._currentExecution then
|
||||||
return context.error("Invalid usage of delay function, it should be used inside callbacks")
|
return context.error("Invalid usage of delay function, it should be used inside callbacks")
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ function updateFeatures(version)
|
|||||||
g_game.resetFeatures()
|
g_game.resetFeatures()
|
||||||
|
|
||||||
-- you can add custom features here, list of them in modules\gamelib\const.lua
|
-- you can add custom features here, list of them in modules\gamelib\const.lua
|
||||||
g_game.getFeature(GameBot)
|
g_game.enableFeature(GameBot)
|
||||||
|
--g_game.enableFeature(GameMinimapLimitedToSingleFloor)
|
||||||
|
|
||||||
if(version >= 770) then
|
if(version >= 770) then
|
||||||
g_game.enableFeature(GameLooktypeU16);
|
g_game.enableFeature(GameLooktypeU16);
|
||||||
|
|||||||
@@ -280,9 +280,10 @@ function onUseWith(clickedWidget, mousePosition)
|
|||||||
if clickedWidget:getClassName() == 'UIGameMap' then
|
if clickedWidget:getClassName() == 'UIGameMap' then
|
||||||
local tile = clickedWidget:getTile(mousePosition)
|
local tile = clickedWidget:getTile(mousePosition)
|
||||||
if tile then
|
if tile then
|
||||||
if selectedThing:isFluidContainer() then
|
if selectedThing:isFluidContainer() or selectedThing:isMultiUse() then
|
||||||
g_game.useWith(selectedThing, tile:getTopMultiUseThing(), selectedSubtype)
|
g_game.useWith(selectedThing, tile:getTopMultiUseThing(), selectedSubtype)
|
||||||
else
|
else
|
||||||
|
print("normal")
|
||||||
g_game.useWith(selectedThing, tile:getTopUseThing(), selectedSubtype)
|
g_game.useWith(selectedThing, tile:getTopUseThing(), selectedSubtype)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ GameAdditionalSkills = 76
|
|||||||
GameDistanceEffectU16 = 77
|
GameDistanceEffectU16 = 77
|
||||||
|
|
||||||
GameExtendedOpcode = 80
|
GameExtendedOpcode = 80
|
||||||
|
GameMinimapLimitedToSingleFloor = 81
|
||||||
|
|
||||||
GameNewWalking = 90
|
GameNewWalking = 90
|
||||||
GameSlowerManualWalking = 91
|
GameSlowerManualWalking = 91
|
||||||
|
|||||||
BIN
otclient_dx.exe
BIN
otclient_dx.exe
Binary file not shown.
BIN
otclient_gl.exe
BIN
otclient_gl.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user