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

Lua Spell

Joined
May 23, 2010
Messages
185
Reaction score
23
I'm getting a strange error from this script (8.54):

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_TICKS, 0.2 * 60 * 1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 2)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 3000)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
 if exhaustion.check(cid, 1002) == false then
                exhaustion.set(cid, 1002, 75)
				doCreatureSay(cid, "LIGHT HEALING!", TALKTYPE_ORANGE_1, cid)
        return doCombat(cid, combat, var)
             else
				doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
				doPlayerSendTextMessage(cid, 19, "Sorry " ..getCreatureName(cid) ..", you have to wait " ..exhaustion.get(cid, 1002).." second(s) to use Light Healing again.")
        end
end

OBS: I've fixed the error, but my char can't recovery his life o.0. And i get yellow skull and "infight" mode too.
 

Attachments

Last edited:
try this script.. /light healing.lua
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.5, 2)

function onCastSpell(cid, var)
        return doCombat(cid, combat, var)
end
 
Back
Top