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

were do i change the color of the healing text? the numbers is purple! want them green!

Casper1996

New Member
Joined
Mar 15, 2012
Messages
9
Reaction score
0
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
local health_minimum = 1200
local health_maximum = 1750
local health_add = math.random(health_minimum, health_maximum)

doPlayerAddMana(cid, health_add)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_GREEN)
doCreatureSay(cid,"Second healing!",19)
return TRUE
end
 
I would likely guess the 19 is what is indicating the color of the text. I am not sure what type of engine you are using, but there are some numbers listed here:


Good luck!
 
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
local health_minimum = 1200
local health_maximum = 1750
local health_add = math.random(health_minimum, health_maximum)

doPlayerAddMana(cid, health_add)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_GREEN)
doCreatureSay(cid,"Second healing!",19)
return TRUE
end
change
Code:
doCreatureSay(cid,"Second healing!",19)
to
Code:
doSendAnimatedText(getPlayerPosition(cid), "Second healing!", TEXTCOLOR_PURPLE)
 
Im not sure I understand what you want.

Do you want it to display the number of what its healing in green?
In the script you've changed every sentance to health except the doPlayerAddMana. Which is standard dark purple in sources.
Looking at this: exhaustion between manarune and Healing spells (https://otland.net/threads/exhaustion-between-manarune-and-healing-spells.269097/#post-2596950) I can see thats its pretty much the same script.

If you want it to add health instead just do like this
Lua:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local health_minimum = 1200
    local health_maximum = 1750
    local health_add = math.random(health_minimum, health_maximum)
   
    doPlayerAddHealth(cid, health_add)
    doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_GREEN)
    doCreatureSay(cid,"Heal!",19)
    doRemoveitem(item.uid)
    return TRUE
end
Healing HP is green text as a standard in sources. Healing mana is Dark Purple in sources.
Do you want this script to give mana or health?
If you want it to give mana and have the textcolor green you'd have to overwrite it.
 
[25/03/2020 22:23:45] [Error - Action Interface]
[25/03/2020 22:23:45] data/actions/scripts/xhealrune.lua:eek:nUse
[25/03/2020 22:23:45] Description:
[25/03/2020 22:23:45] data/actions/scripts/xhealrune.lua:8: attempt to call global 'doPlayerAddHealth' (a nil value)
[25/03/2020 22:23:45] stack traceback:
[25/03/2020 22:23:45] data/actions/scripts/xhealrune.lua:8: in function <data/actions/scripts/xhealrune.lua:3>
 
[25/03/2020 22:23:45] [Error - Action Interface]
[25/03/2020 22:23:45] data/actions/scripts/xhealrune.lua:eek:nUse
[25/03/2020 22:23:45] Description:
[25/03/2020 22:23:45] data/actions/scripts/xhealrune.lua:8: attempt to call global 'doPlayerAddHealth' (a nil value)
[25/03/2020 22:23:45] stack traceback:
[25/03/2020 22:23:45] data/actions/scripts/xhealrune.lua:8: in function <data/actions/scripts/xhealrune.lua:3>

Replace doPlayerAddHealth with doCreatureAddHealth
 
Back
Top