• 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 OTCv8 settings button on EnterGame panel

BigDoink

New Member
Joined
Apr 15, 2023
Messages
7
Reaction score
0
I just started learning Lua a couple days ago, Have been working on this script said in the Title for like the pass day or so, I didn't really wanna ask for help just yet because I wanted to try and figure it out on my own but at this point I'm pretty stumped lol. I may just be over complicating it to much and I'm to stupid to figure it out.

I got it to where it will open the client_options and hide EnterGame but can't get it to work when doing isVisible or onClose callbacks to reopen EnterGame.

Here is the code that is being placed in entergame.lua and being called by @onClick: EnterGame.openOptions() in entergame.OTUI

Lua:
function EnterGame.openOptions()

  print("Loaded Options")
  modules.client_options.show()
  if modules.client_options.show then
    EnterGame.hide()
  elseif not modules.client_options.isVisible and EnterGame.hide then
    print("EnterGame Show")
    EnterGame.show()
  end
end

-- Another function I tried using onClose

function EnterGame.openOptions()

  print("Loaded Options")
  modules.client_options.show()
  if modules.client_options.show then
    EnterGame.hide()
    print("EnterGame is Hid")
  end
  if modules.client_options.onClose then
    print("EnterGame Show")
  end
end
 
Back
Top