• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Right 2 panel and blocking movement

Harakiri842

New Member
Joined
May 19, 2017
Messages
12
Reaction score
0
Hello, I have a problem with the second right panel. I was looking to add it and I do it:
I am new to code / lua otclient, so can anyone help me with this? : <
Lua:
 6 gameRightPanel2 = nil

43  gameRightPanel2 = gameRootPanel:getChildById('gameRightPanel2')

46 connect(gameRightPanel2, { onVisibilityChange = onRightPanel2VisibilityChange })

119 disconnect(gameRightPanel2, { onVisibilityChange = onRightPanel2VisibilityChange })

788  function getRightPanel2()
789     return gameRightPanel2
790    end

805   function onRightPanel2VisibilityChange(RightPanel2, visible)
           if not visible and g_game.isOnline() then
             local children = RightPanel2:getChildren()
                for i=1,#children do
             children[i]:setParent(gameRightPanel)
            end
          end
        end

[I]823  gameMapPanel:addAnchor(AnchorRight, 'gameRightPanel2', AnchorTop)

830 gameRightPanel2:setImageColor('white')

833 gameRightPanel2:setMarginTop(0)

858  gameRightPanel2:setImageColor('alpha')

862  gameRightPanel2:setMarginTop(modules.client_topmenu.getTopMenu()
863      :getHeight() - gameRightPanel2:getPaddingTop())

868  gameRightPanel2:setOn(true)
869  gameRightPanel2:setVisible(true)

Lua:
 64 GameSidePanel
    id: gameRightPanel2
    anchors.right: parent.left
    anchors.top: parent.top
    anchors.bottom: parent.bottom
    focusable: false
    visible: true
    on: true
    $!on:
      width: 0
      visible: false

Lua:
 18 showRightPanel2 = false,
205 elseif key == 'showRightPanel2' then
       modules.game_interface.getRightPanel2():setOn(value)

Lua:
 29
  OptionCheckBox
    id: showLeftPanel
    !text: tr('Show right panel2')
When I click one of them, my left panel has disappeared, I don't know why, I would like to have rightpanel2 next to the first right panel.


panel.png
I saw someone doing it here: Klik, but I do not know how to do it. Can anyone help me with this?
And problem 2 blocks the effect like here: Klik i don't know how and where do this
 
Last edited:
Solution
Here's my panels improvement from otland otclient fork.

You can take the.code.from.otclient.v8

Not working. I have this error:
Code:
    [C]: ?
    /corelib/util.lua:56: in function 'connect'
    /game_interface/gameinterface.lua:54: in function 'init'
    /game_interface/interface.otmod:30:[@onLoad]:1: in main chunk
    [C]: in function 'ensureModuleLoaded'
    /init.lua:43: in main chunk
FATAL ERROR: Unable to load 'game_interface' module

When i do step by step from here Klik
 
Here's my panels improvement from otland otclient fork.

 
Solution
Here's my panels improvement from otland otclient fork.

Yes i know, i doing your all panels instructions, but it's not working.
Everything is good to this moment when i start write interface.lua and interface.otui..

And here is with out interface.lua and otui:
v1 problem.png
v2 problem.png

And now:
with interface.otui i get this error
Code:
ERROR: Unable to load module 'game_interface': LUA ERROR:
/corelib/util.lua:56: attempt to index local 'object' (a nil value)
stack traceback:
    [C]: ?
    /corelib/util.lua:56: in function 'connect'
    /game_interface/gameinterface.lua:43: in function 'init'
    /game_interface/interface.otmod:30:[@onLoad]:1: in main chunk
    [C]: in function 'ensureModuleLoaded'
    /init.lua:43: in main chunk

with interface.lua i get this error
Code:
ERROR: Unable to load module 'game_interface': LUA ERROR:
/corelib/util.lua:56: attempt to index local 'object' (a nil value)
stack traceback:
    [C]: ?
    /corelib/util.lua:56: in function 'connect'
    /game_interface/gameinterface.lua:61: in function 'init'
    /game_interface/interface.otmod:30:[@onLoad]:1: in main chunk
    [C]: in function 'ensureModuleLoaded'
    /init.lua:43: in main chunk
FATAL ERROR: Unable to load 'game_interface' module

I don't know what's going on, only when i do last thing from here here this error appears, but i do all steps
 
Dat/items.otb conflict. Check in which file there is unpassable flag checked for that item - uncheck it.
 
Which TFS do you use?
I don't know what is the TFS?

Dat/items.otb conflict. Check in which file there is unpassable flag checked for that item - uncheck it.
Not conflict in dat/items.otb, same thing doing when i try to get to house where i don't have invite :/

#edit
i'm trying to get effect like on normal 7.6 client :p
 
Back
Top