View Single Post
  #1  
Old 03-26-2016, 01:52 PM
Hateborne
Hill Giant
 
Join Date: May 2010
Posts: 125
Question $client->InterruptSpell($spell_id) not stopping spells?

Hello All,

I've run into an issue where $client->InterruptSpell($spell_id) inside of EVENT_CAST or EVENT_CAST_BEGIN does nothing when the spell is cast from an item or from spellbar. The spell is non-instant, cast time of 3 seconds (through item) or spellbar, but it does not stop. I get the interrupted message, but the casting continues until completion.

Any ideas?


-Hate


EDIT: Examples
Code:
sub EVENT_CAST_BEGIN
{
	my @pogtokens = (11853, 11854, 11855, 11856, 11857, 11858, 11859, 11860, 11861, 11862, 11863, 11864, 11865, 11866, 11867);
	if($zonesn ne "airplane" && $spell_id ~~ @pogtokens) { $client->InterruptSpell($spell_id); $client->Message(315, "You cannot use this item outside of the Plane of Gods!"); }
}

sub EVENT_CAST
{
	my @pogtokens = (11853, 11854, 11855, 11856, 11857, 11858, 11859, 11860, 11861, 11862, 11863, 11864, 11865, 11866, 11867);
	if($zonesn ne "airplane" && $spell_id ~~ @pogtokens) { $client->InterruptSpell($spell_id); $client->Message(315, "You cannot use this item outside of the Plane of Gods!"); }
}
Reply With Quote