• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

How to change admin and premium color?

henkas

Well-Known Member
Joined
Jul 8, 2015
Messages
1,067
Solutions
5
Reaction score
63
How can i change admin name color to a red and premium to yellow? Im using otc v8 and tfs 1.2
 
LUA:
function UICreatureButton:creatureSetup(creature)
    if self.creature ~= creature then
        self.creature = creature
        self.creatureWidget:setCreature(creature)   
    if self.creatureName ~= creature:getName() then
      self.creatureName = creature:getName()
      self.labelWidget:setText(creature:getName())
    end
    end

    self:updateLifeBarPercent()
    self:updateSkull()
    self:updateEmblem()
  self:update()
end

you will need to add this part after the condition if .... then
LUA:
    self.labelWidget:setColor(color) --color in HEX
after this line
LUA:
      self.labelWidget:setText(creature:getName())
from file gamelib/ui/uicreaturebutton.lua
 
LUA:
function UICreatureButton:creatureSetup(creature)
    if self.creature ~= creature then
        self.creature = creature
        self.creatureWidget:setCreature(creature)  
    if self.creatureName ~= creature:getName() then
      self.creatureName = creature:getName()
      self.labelWidget:setText(creature:getName())
    end
    end

    self:updateLifeBarPercent()
    self:updateSkull()
    self:updateEmblem()
  self:update()
end

you will need to add this part after the condition if .... then
LUA:
    self.labelWidget:setColor(color) --color in HEX
after this line
LUA:
      self.labelWidget:setText(creature:getName())
from file gamelib/ui/uicreaturebutton.lua
That will change color in Battle List only.

@topic
You will have to edit sources (yes, it's possible) and add such feature.
 
Back
Top