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

onCastSpell(cid, target, group, spell)

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:
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:
Back
Top