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

doCreatureAddHealth. text color

kermaxpl

Pora na Nonsens Scripter
Joined
Aug 21, 2012
Messages
121
Reaction score
7
Location
Poland
Hi, how can i change color of text which say how many health was added to creature in function doCreatureAddHealth?
 
Example:
Lua:
doPlayerSendTextMessage(player1.uid,22,"+500 HP!")

where doPlayerSendTextMessage(player1.uid,22,"+500 HP!") is the color of the text. In this case white, changing it to 21 will give orange text.
You can find the colors and what reference number they have in data/lib/compat.lua
 
Yes but, I haven't doPlayerSendTextMessage(player1.uid,22,"+500 HP!"), it looks like doCreatureAddHealth send this text automatically, and I want to change color of text sended with this function.
 
The doCreatureAddHealth is the function to make the "creature" get more health, that line of text has nothing to do with what text will appear on usage. If you do not have the line doPlayerSendTextMessage then you must add this into the script for it to make text appear :)

If you can post the script maybe I can see what you mean, if this is not it.

Edit:
Here's another way when you use for example a manarune;

Lua:
local t = {
        min = 700,
        max = 1000,
        text = "Manarune B!",
        effect = CONST_ME_MAGIC_BLUE
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if isPlayer(itemEx.uid) then
                doCreatureAddMana(itemEx.uid, math.random(t.min, t.max))
                doCreatureSay(itemEx.uid, t.text, TALKTYPE_ORANGE_1)
                doSendMagicEffect(toPosition, t.effect)
        else
                doPlayerSendCancel(cid, "You can only use this rune on players.")
        end
        return true
end

Where TALKTYPE_ORANGE_1 is the color
 
Back
Top Bottom