when Monster :Bograider atk paralyze that error apear in my console!
Here is my paralyze Script
please somebody help to fix it!
Code:
[error - spell interface] data/spells/scripts/support/paralyze rune.lue:on cast spell
Description:<luadoplayersendcancel> player not found
Here is my paralyze Script
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 7000)
setConditionFormula(condition, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
if getPlayerMana(cid) >= 1400 and getPlayerSoul(cid) >= 3 and isInArray({6, 10}, getPlayerVocation(cid)) then
return doPlayerAddMana(cid, -1400, false) and doPlayerAddSoul(cid, -3) and doCombat(cid, combat, var)
else
doPlayerSendCancel(cid, getPlayerMana(cid) < 1400 and "You don't have enough mana." or getPlayerSoul(cid) < 3 and "You don't have enough soul points." or "Your vocation cannot use this rune.")
end
end