Ancores
Active Member
- Joined
- Jan 17, 2010
- Messages
- 538
- Reaction score
- 28
In need of a creature event, onCastSpell(cid, target, group, spell).
group as in SPELLGROUP_ATTACK or SPELLGROUP_SUPPORT etc.
spell as in "light" or "fierce berserk" etc.
Also, returning false would cancel the spell.
so I could use it like this:
Using TFS 0.3.7.
group as in SPELLGROUP_ATTACK or SPELLGROUP_SUPPORT etc.
spell as in "light" or "fierce berserk" etc.
Also, returning false would cancel the spell.
so I could use it like this:
Code:
function onCastSpell(cid, target, group, spell)
if(group == SPELLGROUP_ATTACK) then
doPlayerSendCancel(cid, "You are not allowed to cast attack spells.")
return false
elseif(group == SPELLGROUP_HEALING) then
doPlayerSendCancel(cid, "You healed yourself.")
end
if(spell == "light") then
doPlayerSendCancel(cid, "Utevo Lux :)")
end
return true
end
Using TFS 0.3.7.
Last edited: