mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 03:24:55 +02:00
bot traceback, moveup function, chat setting default ongamestart
This commit is contained in:
@@ -194,8 +194,7 @@ function GameInterface.createThingMenu(menuPosition, lookThing, useThing, creatu
|
||||
if lookThing then
|
||||
local parentContainer = lookThing:getParentContainer()
|
||||
if parentContainer and parentContainer:hasParent() then
|
||||
local pos = lookThing:getPosition()
|
||||
menu:addOption('Move up', function() g_game.move(lookThing, { x=pos.x, y=pos.y, z=254 }, lookThing:getCount()) end)
|
||||
menu:addOption('Move up', function() g_game.moveToParentContainer(lookThing, lookThing:getCount()) end)
|
||||
end
|
||||
end
|
||||
|
||||
|
@@ -176,6 +176,12 @@ local function onChannelList(channelList)
|
||||
end
|
||||
end
|
||||
|
||||
local function onGameStart()
|
||||
local tab = Console.getTab('Default')
|
||||
if tab then
|
||||
addEvent(function() consoleTabBar:selectTab(tab) end, false)
|
||||
end
|
||||
end
|
||||
|
||||
-- public functions
|
||||
function Console.init()
|
||||
@@ -185,6 +191,7 @@ function Console.init()
|
||||
onOpenPrivateChannel = onOpenPrivateChannel,
|
||||
onOpenOwnPrivateChannel = onOpenOwnPrivateChannel,
|
||||
onCloseChannel = onCloseChannel,
|
||||
onGameStart = onGameStart,
|
||||
onGameEnd = Console.clear })
|
||||
|
||||
consolePanel = displayUI('console.otui', GameInterface.getBottomPanel())
|
||||
@@ -221,6 +228,7 @@ function Console.terminate()
|
||||
onOpenPrivateChannel = onOpenPrivateChannel,
|
||||
onOpenOwnPrivateChannel = onOpenPrivateChannel,
|
||||
onCloseChannel = onCloseChannel,
|
||||
onGameStart = onGameStart,
|
||||
onGameEnd = Console.clear })
|
||||
|
||||
for channelid, channelname in pairs(channels) do
|
||||
|
Reference in New Issue
Block a user