Dankoo
Active Member
- Joined
- Sep 4, 2010
- Messages
- 1,007
- Reaction score
- 27
:}
I have an event on my OT, where players weren't suppose to summon monsters and trow magic wall runes.
I've added one protection for magic wall, by adding this in it's script:
But the summon creature spell isn't a script, but a function:
How can I add something similar to that code to block that specific spell in a area?
Thanks ^_^
I have an event on my OT, where players weren't suppose to summon monsters and trow magic wall runes.
I've added one protection for magic wall, by adding this in it's script:
Lua:
function onCastSpell(cid, var)
local fromPosition = {x = 32079, y = 32206, z = 6} -- top left cornor of the playground
local toPosition = {x = 32124, y = 32256, z = 6 } -- bottom right cornor of the playground
if isInArea(getThingPosition(cid), fromPosition, toPosition) then
return false, doPlayerSendCancel(cid, "You're not allowed to use it here.")
end
return doCombat(cid, combat, var)
end
But the summon creature spell isn't a script, but a function:
Lua:
<instant name="Summon Creature" words="utevo res" lvl="1" params="1" exhaustion="2000" needlearn="0" event="function" value="summonMonster">
<vocation id="1"/>
<vocation id="2"/>
<vocation id="5"/>
<vocation id="6"/>
</instant>
How can I add something similar to that code to block that specific spell in a area?
Thanks ^_^