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

Spell not working

Spaon

Member
Joined
Jul 3, 2011
Messages
44
Reaction score
5
I'm new at making spells and I finished one and got problem with it when I say the word of casting the spell this word is being said as if it is normal word not spell word Idk what is the problem and here is the code could anyone check whats wrong with it ? Thanks .
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, 256)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 1)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 35)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.0, 0, 0, 0)
local distanceCombat = createCombatObject()
setCombatParam(distanceCombat, COMBAT_PARAM_TYPE, 256)
setCombatParam(distanceCombat, COMBAT_PARAM_EFFECT, 1)
setCombatParam(distanceCombat, COMBAT_PARAM_DISTANCEEFFECT, 35)
setCombatFormula(distanceCombat, COMBAT_FORMULA_LEVELMAGIC, -1.0, 0, 0, 0)
function onCastSpell(cid, var)
if(variantToNumber(var) ~= 0) then
return doCombat(cid, distanceCombat, var)
end
return doCombat(cid, combat, var)
end
 
do u mean, that the words are normal? or the spell doesnt show?
if the name, then its in config.lua
 
ummm my spell casting word is " exevo max " when I say it in the game it comes as a normal word with yellow font and I can spam it like if its normal chatting word idk what is the problem maybe the problem in the code ?! or in something else ?
 
something like this ?

XML:
<instant name="Exevo max" words="Exevo max lvl="60" mana="850" prem="1" selftarget="1" exhaustion="1200" needlearn="0" event="script" value="attack/eternal winter.lua">
 
something like this ?

XML:
<instant name="Exevo max" words="Exevo max lvl="60" mana="850" prem="1" selftarget="1" exhaustion="1200" needlearn="0" event="script" value="attack/eternal winter.lua">

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, 256)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 1)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 35)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.0, 0, 0, 0)
local distanceCombat = createCombatObject()
setCombatParam(distanceCombat, COMBAT_PARAM_TYPE, 256)
setCombatParam(distanceCombat, COMBAT_PARAM_EFFECT, 1)
setCombatParam(distanceCombat, COMBAT_PARAM_DISTANCEEFFECT, 35)
setCombatFormula(distanceCombat, COMBAT_FORMULA_LEVELMAGIC, -1.0, 0, 0, 0)
function onCastSpell(cid, var)	
if(variantToNumber(var) ~= 0) then	
return doCombat(cid, combat, var)
end
 
Back
Top