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

How to change admin and premium color?

henkas

Well-Known Member
Joined
Jul 8, 2015
Messages
993
Solutions
5
Reaction score
55
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