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

Lua Change life bar in Otc

cdpa2000

Member
Joined
Jan 6, 2015
Messages
58
Reaction score
5
Location
Venezuela
Hello, good to everyone!

Could someone help me edit my otc's interface? I am developing a Sword art online server and I was studying a bit about the OTC but for lack of knowledge in lua I wait to see if someone could help me.

Something like that:

kirito = PLAYER NAME.
18500/18500 = PLAYER HEALTH POINTS.
LV: 96 = PLAYER LEVEL

sao____kirito_health_bar_by_xxexternalhopexx-d63diy6.png


Thank you very much in advance and happy day
 

Attachments

  • Make this entire overlay as a PNG image, and leave the place where the health bar will be transparent.
  • Go to healthinfo module and change its anchors to gameMapPanel (top-left)
  • Delete all unnecessary stats from healthinfo and leave the ones you will be using (seems like only HP in this case), edit OTUI and lua file to achieve this.
  • Now change the health bar rectangle to fit the size of the transparent place you left behind in your overlay, and position it behind the overlay
Bam done :D
 
  • Make this entire overlay as a PNG image, and leave the place where the health bar will be transparent.
  • Go to healthinfo module and change its anchors to gameMapPanel (top-left)
  • Delete all unnecessary stats from healthinfo and leave the ones you will be using (seems like only HP in this case), edit OTUI and lua file to achieve this.
  • Now change the health bar rectangle to fit the size of the transparent place you left behind in your overlay, and position it behind the overlay
Bam done :D

EDIT protip: You don't need to use MainWindow widget type for this at all, just make an UIWidget element that will be your picture, and create it via the lua file with:
Code:
local hpoverlay = g_ui.createWidget('nameOfYourWidget', gameMapPanel)
^ make sure you store the game map panel into the gameMapPanel variable via

Code:
local gameMapPanel = modules.game_interface.getMapPanel()
 
Back
Top