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

OTClient Nick and Health bar - elevate

roriscrave

Advanced OT User
Joined
Dec 7, 2011
Messages
1,188
Solutions
34
Reaction score
200
How can I raise the nick and life bar of the character, monsters and NPCs in OTClient v8?
If i use onlogin, it work only players. I need it work too monster and npcs, not only for players.
Lua:
g_game.getLocalPlayer():setInformationOffset(0, -40)

 
I don't think I can put a link to other Tibia forums, but look in Brazilian forums

Lua:
creature-information-offset
Code:
otcv8-aumentar-altura-do-nome-e-barra-de-vida-no-otclient-v8


You could use that as a base.


but is better that the filter is by outfit, not by monster or npc
 
I don't think I can put a link to other Tibia forums, but look in Brazilian forums

Lua:
creature-information-offset
Code:
otcv8-aumentar-altura-do-nome-e-barra-de-vida-no-otclient-v8


You could use that as a base.


but is better that the filter is by outfit, not by monster or npc
please, send me the link?
 
On modules/gamelib/creature.lua
Lua:
function Creature:onAppear()
    local offsetX = -10
    local offsetY = -10

    if (self:isMonster()) then
        self:setInformationOffset(offsetX, offsetY)
    end
ned

If you dont have it, just add this code there and change offset for your required value.
 
On modules/gamelib/creature.lua
Lua:
function Creature:onAppear()
    local offsetX = -10
    local offsetY = -10

    if (self:isMonster()) then
        self:setInformationOffset(offsetX, offsetY)
    end
ned

If you dont have it, just add this code there and change offset for your required value.
Thank you very much... but i dont know if it is the better way to do it, i added print("Function Called"), for see how many times the function will be called.
Lua:
function Creature:onAppear()
    local offsetX = 10
    local offsetY = 10

    if (self:isCreature()) then
        print("Function Called")
        self:setInformationOffset(offsetX, offsetY)
    end
end

And the function is called all the time, when it goes up stairs, goes down stairs, for each monster that appears, can't this affect the OTC negatively?
Is there no way to change a single step, without the function being called all the time?
 
Use it without problem, also you can edit it on sources on draw information.

C++:
void Creature::drawInformation(const Point& point, bool useGray, const Rect& parentRect, int drawFlags)
 
Use it without problem, also you can edit it on sources on draw information.

C++:
void Creature::drawInformation(const Point& point, bool useGray, const Rect& parentRect, int drawFlags)
hmm nice, but exactly where do I need to change? looked at the code, but I don't understand C++
 
Back
Top