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

[HELP] Someone can make a character UI like this?

I am sure someone could, since we are looking at it someone already did. Unfortunately unlike scripts, acc's and a few tools not many people if not no one will make UI's, sprites or anything graphics related for free...
 
I was a little bored and made some crap like this :D

PNG with duck + health/mana bar.
Image and bars are 'clickable' like normal game screen - player run to position with autowalk.

otclient_duck.png


otclient\modules\game_mymodule\mymodule.otmod:
PHP:
Module
  name: game_mymodule
  description: My creepy duck with hp and mana bars
  author: gesior
  website: www.skalski.pro
  sandboxed: true
  scripts: [ mymodule ]
  @onLoad: init()
  @onUnload: terminate()
otclient\modules\game_mymodule\mymodule.otui
PHP:
HealthBar < ProgressBar
  id: healthBar
  background-color: #ff4444
  anchors.bottom: parent.bottom
  anchors.right: parent.right
  margin-bottom: 45

ManaBar < ProgressBar
  id: manaBar
  background-color: #4444ff
  anchors.top: prev.bottom
  anchors.right: parent.right
  margin: 1
  margin-top: 5

Panel
  id: mymodule
  image-source: /images/duck
  image-smooth: true
  image-fixed-ratio: true
  anchors.left: parent.left
  anchors.bottom: parent.bottom
  margin-top: 1
  focusable: false
  HealthBar
  ManaBar
otclient\modules\game_mymodule\mymodule.lua
PHP:
-- private variables
local mymodule

local healthBar = nil
local manaBar = nil
-- public functions
function init()
  mymodule = g_ui.loadUI('mymodule', modules.game_interface.getMapPanel())

  healthBar = mymodule:recursiveGetChildById('healthBar')
  manaBar = mymodule:recursiveGetChildById('manaBar')

  connect(LocalPlayer, { onHealthChange = onHealthChange,
                         onManaChange = onManaChange })
  connect(g_game, { onGameStart = show,
                    onGameEnd = hide })
end

function terminate()
  disconnect(LocalPlayer, { onHealthChange = onHealthChange,
                            onManaChange = onManaChange })
  disconnect(g_game, { onGameStart = show,
                       onGameEnd = hide })

  mymodule:destroy()
  mymodule = nil
end

function onHealthChange(localPlayer, health, maxHealth)
  healthBar:setValue(health, 0, maxHealth)
end

function onManaChange(localPlayer, mana, maxMana)
  manaBar:setValue(mana, 0, maxMana)
end

function hide()
  mymodule:hide()
end

function show()
  mymodule:show()
end
and in otclient\modules\game_interface\interface.otmod add at end of list:
PHP:
- game_mymodule
so it will look like this:
PHP:
...
    - game_modaldialog
    - game_unjustifiedpoints
    - game_mymodule
  @onLoad: init()
...

and then place duck.png in folder otclient/data/images/

Feeew more hours and it will look like on screenshot (nice), but I don't have time to do this.
Do not message me with offers, because I don't have time to make any script.
 
I was a little bored and made some crap like this :D

PNG with duck + health/mana bar.
Image and bars are 'clickable' like normal game screen - player run to position with autowalk.

otclient_duck.png


otclient\modules\game_mymodule\mymodule.otmod:
PHP:
Module
  name: game_mymodule
  description: My creepy duck with hp and mana bars
  author: gesior
  website: www.skalski.pro
  sandboxed: true
  scripts: [ mymodule ]
  @onLoad: init()
  @onUnload: terminate()
otclient\modules\game_mymodule\mymodule.otui
PHP:
HealthBar < ProgressBar
  id: healthBar
  background-color: #ff4444
  anchors.bottom: parent.bottom
  anchors.right: parent.right
  margin-bottom: 45

ManaBar < ProgressBar
  id: manaBar
  background-color: #4444ff
  anchors.top: prev.bottom
  anchors.right: parent.right
  margin: 1
  margin-top: 5

Panel
  id: mymodule
  image-source: /images/duck
  image-smooth: true
  image-fixed-ratio: true
  anchors.left: parent.left
  anchors.bottom: parent.bottom
  margin-top: 1
  focusable: false
  HealthBar
  ManaBar
otclient\modules\game_mymodule\mymodule.lua
PHP:
-- private variables
local mymodule

local healthBar = nil
local manaBar = nil
-- public functions
function init()
  mymodule = g_ui.loadUI('mymodule', modules.game_interface.getMapPanel())

  healthBar = mymodule:recursiveGetChildById('healthBar')
  manaBar = mymodule:recursiveGetChildById('manaBar')

  connect(LocalPlayer, { onHealthChange = onHealthChange,
                         onManaChange = onManaChange })
  connect(g_game, { onGameStart = show,
                    onGameEnd = hide })
end

function terminate()
  disconnect(LocalPlayer, { onHealthChange = onHealthChange,
                            onManaChange = onManaChange })
  disconnect(g_game, { onGameStart = show,
                       onGameEnd = hide })

  mymodule:destroy()
  mymodule = nil
end

function onHealthChange(localPlayer, health, maxHealth)
  healthBar:setValue(health, 0, maxHealth)
end

function onManaChange(localPlayer, mana, maxMana)
  manaBar:setValue(mana, 0, maxMana)
end

function hide()
  mymodule:hide()
end

function show()
  mymodule:show()
end
and in otclient\modules\game_interface\interface.otmod add at end of list:
PHP:
- game_mymodule
so it will look like this:
PHP:
...
    - game_modaldialog
    - game_unjustifiedpoints
    - game_mymodule
  @onLoad: init()
...

and then place duck.png in folder otclient/data/images/

Feeew more hours and it will look like on screenshot (nice), but I don't have time to do this.
Do not message me with offers, because I don't have time to make any script.

It sends me a error when i try to open the Client.exe: Unable to load 'game_interface' module
 
Last edited:
It sends me a error when i try to open the Client.exe: Unable to load 'game_interface' module
Any other message in console? Try to run .exe by console (cmd), it should show then better descrption of error.

Probably you did too many spaces/not enough spaces in interface.otmod or added new line (ENTER) by mistake.
 
Any other message in console? Try to run .exe by console (cmd), it should show then better descrption of error.

Probably you did too many spaces/not enough spaces in interface.otmod or added new line (ENTER) by mistake.
I fixed this, but now it won't show nothing. help me
 
Back
Top