Moj mistrz
Monster Creator
Hiho, can anyone make a spell which after execution will change outfit into itemid and hide health bar(if possible?)?
Thanks anyways.
Thanks anyways.
doSetItemOutfit(cid, itemid, time) works fine, but doCreatureSetHideHealth(cid, true/false) do not exist i guess. I couldn't find any alternatives though.in the onCast function in the spell simply use:
doCreatureSetHideHealth(cid, true/false)
and
doSetItemOutfit(cid, itemid, time)
not sure if these functions exist on 1.0, sorry if they do not! I am sure there are alternative functions in place of these if they do not exist though...
but doCreatureSetHideHealth(cid, true/false) do not exist i guess. I couldn't find any alternatives though.
creature:setHiddenHealth(hide)
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_NONE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
function onCastSpell(cid, var)
local hp = (getCreatureHealth(cid)/getCreatureMaxHealth(cid))*100
local creature = Creature(cid)
local fields = {1490, 1496, 1500}
if (hp < 99.99) and getCreatureName(cid) == "Zavarash" then
doSetItemOutfit(cid, 1548, 15*60*1000)
creature:setHiddenHealth(not creature:isHealthHidden())
elseif isInArray({1490, 1496, 1500}, getTileItemById(getCreaturePosition(cid))) then
doSetCreatureOutfit(cid, {lookType=12,lookHead=0,lookAddons=0,lookLegs=57,lookBody=15,lookFeet=85}, -1)
return doCombat(cid, combat, var)
end
end