• 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!

OTClient "Show customizable top status bar"

Eldora

Banned User
Joined
Oct 19, 2009
Messages
604
Reaction score
26
Question, I have one problem im trying to solve with otcv8
The "topbar" (see this image):

image.png


The only way for me to activate it, is to switch from profile 1 to any other profile and then the "Show customizable top status bar" will start working.
But, if i restart the Client, it will stop working again and requires me to switch profiles in order to make it work again.

image.png


Do you have any idea why I cannot activate the top bar immediately by just checking the "Show customizable top status bar"?
It is almost like if it is not "loading" when I launch the client, and that when I switch profile it loads the module or something? I am not sure

Anyone knows?
 
Noticed that this part: @onOptionChange: modules.client_options.setOption(self:getId(), self.currentIndex)

In this code:
Lua:
  ComboBox
    id: profile
    margin-top: 3
    @onOptionChange: modules.client_options.setOption(self:getId(), self.currentIndex)
    @onSetup: |
      self:addOption("1")
      self:addOption("2")
      self:addOption("3")
      self:addOption("4")
      self:addOption("5")
      self:addOption("6")
      self:addOption("7")
      self:addOption("8")
      self:addOption("9")
      self:addOption("10")
  Label

Are responsible for the "change" that enables the top bar.
Anyone know how I can get it to perform this without me having to change profile in the settings?
 
It may be due to the fact that the status bar module is not loaded when the client is launched. You can try adding the module loading code to the otcv8 configuration file. Here is an example code that you can add to the config.lua file:

Module.New('top_bar', function()
if not modules.game_topmenu then
g_game.loadUI('game_topmenu.otui')
end
end)


Make sure that the config.lua file is located in the otcv8 directory and the code is entered at the proper level in the file, i.e., inside the Module.New() function. You can also try running the client in debug mode to see if there are any errors during the module loading process.
 
It may be due to the fact that the status bar module is not loaded when the client is launched. You can try adding the module loading code to the otcv8 configuration file. Here is an example code that you can add to the config.lua file:

Module.New('top_bar', function()
if not modules.game_topmenu then
g_game.loadUI('game_topmenu.otui')
end
end)


Make sure that the config.lua file is located in the otcv8 directory and the code is entered at the proper level in the file, i.e., inside the Module.New() function. You can also try running the client in debug mode to see if there are any errors during the module loading process.

Where do I add that code?
I can find a config.lua file inside core/libs, but it does not contain any "Module.New" at all.
 
Back
Top