PDA

View Full Version : preventing a spell cast


blackdragonsdg
03-29-2012, 03:53 PM
Is there anyway to prevent a specific spell or set of spells from being cast without trashing normal spell function. Basicly I want to stop players from casting any gate or teleportation spell while in a specific zone so that they have to complete a quest before leaving. I was thinking something along the lines of the following.

player.pl

sub EVENT_CAST {

if($spell_id == 36 || 16234) {
InterruptSpell(spellid);
}
}

But InterruptSpell(spellid); doesn't exist outside of $mob-> and I don't think it would work in the manner I am wanting. To top off the problem list with this idea I read that sub EVENT_Cast only detects successful spell casts and not the attempt. Any ideas?

Jeknos
03-29-2012, 07:12 PM
I think your best bet is to add those spells to the blocked_spells table for that zone and then use the quest to add a teleporter npc.

blackdragonsdg
03-29-2012, 09:44 PM
That certainly would be alot easier than what I was trying to do. I can't believe I forgot about that table.