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

Discussion in 'OTClient' started by Ygor Castro, May 15, 2018.

Tags:
  1. Ygor Castro

    Ygor Castro New Member

    Joined:
    Feb 22, 2016
    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    I need a little help, anyone can make this for me? CHAR_UI.png
     
  2. bayview

    bayview Codex NG

    Joined:
    Jan 25, 2018
    Messages:
    375
    Likes Received:
    153
    Best Answers:
    17
    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...
     
  3. Gesior.pl

    Gesior.pl Mega Noob&LOL 2012

    Joined:
    Sep 18, 2007
    Messages:
    1,869
    Likes Received:
    726
    Best Answers:
    4
    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.

    [​IMG]

    otclient\modules\game_mymodule\mymodule.otmod:
    PHP:
    1.  
    2. Module
    3.   name: game_mymodule
    4.   description: My creepy duck with hp and mana bars
    5.   author: gesior
    6.   website: www.skalski.pro
    7.   sandboxed: true
    8.   scripts: [ mymodule ]
    9.   @onLoad: init()
    10.   @onUnload: terminate()
    11.  
    otclient\modules\game_mymodule\mymodule.otui
    PHP:
    1.  
    2. HealthBar < ProgressBar
    3.   id: healthBar
    4.   background-color: #ff4444
    5.  anchors.bottom: parent.bottom
    6.   anchors.right: parent.right
    7.   margin-bottom: 45
    8.  
    9. ManaBar < ProgressBar
    10.   id: manaBar
    11.   background-color: #4444ff
    12.  anchors.top: prev.bottom
    13.   anchors.right: parent.right
    14.   margin: 1
    15.   margin-top: 5
    16.  
    17. Panel
    18.   id: mymodule
    19.   image-source: /images/duck
    20.   image-smooth: true
    21.   image-fixed-ratio: true
    22.   anchors.left: parent.left
    23.   anchors.bottom: parent.bottom
    24.   margin-top: 1
    25.   focusable: false
    26.   HealthBar
    27.   ManaBar
    28.  
    otclient\modules\game_mymodule\mymodule.lua
    PHP:
    1.  
    2. -- private variables
    3. local mymodule
    4.  
    5. local healthBar = nil
    6. local manaBar = nil
    7. -- public functions
    8. function init()
    9.   mymodule = g_ui.loadUI('mymodule', modules.game_interface.getMapPanel())
    10.  
    11.   healthBar = mymodule:recursiveGetChildById('healthBar')
    12.   manaBar = mymodule:recursiveGetChildById('manaBar')
    13.  
    14.   connect(LocalPlayer, { onHealthChange = onHealthChange,
    15.                          onManaChange = onManaChange })
    16.   connect(g_game, { onGameStart = show,
    17.                     onGameEnd = hide })
    18.  
    19. function terminate()
    20.   disconnect(LocalPlayer, { onHealthChange = onHealthChange,
    21.                             onManaChange = onManaChange })
    22.   disconnect(g_game, { onGameStart = show,
    23.                        onGameEnd = hide })
    24.  
    25.   mymodule:destroy()
    26.   mymodule = nil
    27.  
    28. function onHealthChange(localPlayer, health, maxHealth)
    29.   healthBar:setValue(health, 0, maxHealth)
    30.  
    31. function onManaChange(localPlayer, mana, maxMana)
    32.   manaBar:setValue(mana, 0, maxMana)
    33.  
    34. function hide()
    35.   mymodule:hide()
    36.  
    37. function show()
    38.   mymodule:show()
    39.  
    and in otclient\modules\game_interface\interface.otmod add at end of list:
    PHP:
    1. - game_mymodule
    so it will look like this:
    PHP:
    1. ...
    2.     - game_modaldialog
    3.     - game_unjustifiedpoints
    4.     - game_mymodule
    5.   @onLoad: init()
    6. ...
    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.
     
    e.e, Sun, Chriistian.L.B and 8 others like this.
  4. Ygor Castro

    Ygor Castro New Member

    Joined:
    Feb 22, 2016
    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    It sends me a error when i try to open the Client.exe: Unable to load 'game_interface' module
     
    Last edited: May 18, 2018
  5. Gesior.pl

    Gesior.pl Mega Noob&LOL 2012

    Joined:
    Sep 18, 2007
    Messages:
    1,869
    Likes Received:
    726
    Best Answers:
    4
    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.
     

Share This Page

Loading...