I don't see why not, just look at the player onlookIs it possible to edit a monsters description.
For example making its description say the players name.
elseif thing:isCreature() then
local str = "%s\nHealth: %d / %d"
if thing:getMaxMana() > 0 then
str = string.format("%s, Mana: %d / %d", str, thing:getMana(), thing:getMaxMana())
end
description = string.format(str, description, thing:getHealth(), thing:getMaxHealth()) .. "."
end
You are a programmer correct?Yes, that creates a default description but I want to edit that description with a new one that isn't just a one time check. Plus that isn't used on players only staff.
I gave you a hint of where to start... just because it is only seen by staff or players with x group level doesn't mean you can't write a function/method to do what you want it to do.Pretty much I want it so:
A player catchs a monster from the water
The monsters description is set to show that the player is the one who caught it
so instead of:
"You see a dragon."
it would be
"You see a dragon. It was caught by playername."
function Player:onLook(thing, position, distance)
local x = ''
if Monster(thing:getId()) then
-- uncertain if it returns userdata or a name..
local s = thing:getMaster()
if s and s:getName() ~= thing:getName() then
x = 'it belongs to [' .. s:getName() .. ']'
end
end
local description = "You see " .. thing:getDescription(distance)
if self:getGroup():getAccess() then
-- rest of the code
self:sendTextMessage(MESSAGE_INFO_DESCR, description..x)
end
Unfortunately you do have problems writing code, which is ok, I don't know everything when it comes to writing code, but at least I own up to it (unless you piss me off hehe then I just tell you to @#$% off)I have no problem getting the code in, also its not a summon or anything. It just doesn't show when I look at the monster. Nothing does. I have tried all types of things which I know work but it just doesn't accept it. It could be because im using otclient rather then the regular tibia client.
I did answer your question, and I even gave you an example, you are just lazy and somewhat incompetent.I have never said I know everything about coding. I swear something is wrong with you. Its obvious you cant answer my question so please stop commenting here now.