mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-10-19 14:13:27 +02:00
Version 2.5 - http://otclient.net/showthread.php?tid=238
This commit is contained in:
@@ -335,7 +335,7 @@ function check()
|
||||
return
|
||||
end
|
||||
|
||||
checkEvent = scheduleEvent(check, 25)
|
||||
checkEvent = scheduleEvent(check, 10)
|
||||
|
||||
local status, result = pcall(function()
|
||||
return botExecutor.script()
|
||||
|
@@ -34,11 +34,16 @@ context.macro = function(timeout, name, hotkey, callback, parent)
|
||||
hotkey = retranslateKeyComboDesc(hotkey)
|
||||
end
|
||||
|
||||
-- min timeout is 50, to avoid lags
|
||||
if timeout < 50 then
|
||||
timeout = 50
|
||||
end
|
||||
|
||||
table.insert(context._macros, {
|
||||
enabled = false,
|
||||
name = name,
|
||||
timeout = timeout,
|
||||
lastExecution = context.now,
|
||||
lastExecution = context.now + math.random(0, 100),
|
||||
hotkey = hotkey,
|
||||
})
|
||||
local macro = context._macros[#context._macros]
|
||||
|
@@ -5,11 +5,27 @@ context.getMapPanel = context.getMapView
|
||||
context.zoomIn = function() modules.game_interface.getMapPanel():zoomIn() end
|
||||
context.zoomOut = function() modules.game_interface.getMapPanel():zoomOut() end
|
||||
|
||||
context.getSpectators = function(multifloor)
|
||||
if multifloor ~= true then
|
||||
multifloor = false
|
||||
context.getSpectators = function(param1, param2)
|
||||
--[[
|
||||
if param1 is table (position) then it's used for central position, then param2 is used as param1
|
||||
if param1 is true/false then it's used for multifloor, example: getSpectators(true)
|
||||
if param1 is string then it's used for getSpectatorsByPattern
|
||||
]]--
|
||||
local pos = context.player:getPosition()
|
||||
if type(param1) == 'table' then
|
||||
pos = param1
|
||||
param1 = param2
|
||||
end
|
||||
return g_map.getSpectators(context.player:getPosition(), multifloor)
|
||||
|
||||
if type(param1) == 'string' then
|
||||
return g_map.getSpectatorsByPattern(pos, param1)
|
||||
end
|
||||
|
||||
local multifloor = false
|
||||
if type(param1) == 'boolean' and param1 == true then
|
||||
multifloor = true
|
||||
end
|
||||
return g_map.getSpectators(pos, multifloor)
|
||||
end
|
||||
|
||||
context.getCreatureById = function(id, multifloor)
|
||||
|
@@ -161,3 +161,6 @@ context.cancelAttackAndFollow = g_game.cancelAttackAndFollow
|
||||
context.logout = g_game.forceLogout
|
||||
context.ping = g_game.getPing
|
||||
|
||||
modules.game_cooldown.isGroupCooldownIconActive(id)
|
||||
modules.game_cooldown.isCooldownIconActive(id)
|
||||
|
||||
|
@@ -32,6 +32,9 @@ context.getContainers = function() return g_game.getContainers() end
|
||||
context.getContainer = function(index) return g_game.getContainer(index) end
|
||||
|
||||
context.moveToSlot = function(item, slot, count)
|
||||
if type(item) == 'number' then
|
||||
item = context.findItem(item)
|
||||
end
|
||||
if not item then
|
||||
return
|
||||
end
|
||||
|
Reference in New Issue
Block a user