Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 03-26-2016, 01:59 PM
Hateborne
Hill Giant
 
Join Date: May 2010
Posts: 125
Default

Update: $client->Duck() is a ghetto workaround.


-Hate
Reply With Quote
  #3  
Old 03-26-2016, 10:05 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

Just add a blocked_spells entry for all these spells or something.
Reply With Quote
  #4  
Old 03-26-2016, 10:45 PM
Hateborne
Hill Giant
 
Join Date: May 2010
Posts: 125
Default

Quote:
Originally Posted by Kingly_Krab View Post
Just add a blocked_spells entry for all these spells or something.
I would like to be able to disable spells, except when the appropriate zone. The items are click effects on items to summon creatures. Right now, if $zonesn not equal to 'airplane', it forces an interrupt via duck.

Even so, does anyone else have experience with it work/not-working?


-Hate
Reply With Quote
  #5  
Old 03-26-2016, 11:03 PM
N0ctrnl's Avatar
N0ctrnl
Discordant
 
Join Date: Jan 2007
Posts: 443
Default

As another option, you could just have a blank spell that triggers a quest script. Then you can check for the zone or whatever you want before even allowing the spell to trigger.
__________________
Ender - Lead GM/Developer
Vegarlson Asylum Server - http://www.vegarlson-server.org/
Reply With Quote
  #6  
Old 03-29-2016, 06:58 AM
Kayen
Developer
 
Join Date: Mar 2009
Location: -
Posts: 228
Default

$client->Stun(1)
Reply With Quote
  #7  
Old 03-29-2016, 03:25 PM
Hateborne
Hill Giant
 
Join Date: May 2010
Posts: 125
Default

Quote:
Originally Posted by Kayen View Post
$client->Stun(1)
Also does not stop casting Kayen.


-Hate
Reply With Quote
  #8  
Old 03-29-2016, 04:51 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Code:
sub EVENT_CAST_BEGIN {
	quest::settimer("stopcast", 1);
	
}

sub EVENT_TIMER {
	if ($timer eq "stopcast") {
		$client->InterruptSpell();
		$client->Message(335, "Stop casting..");
		quest::stoptimer("stopcast");
	}
}
One way to get it to work.. but shorter spell cast times might be an issue :p
Reply With Quote
Reply

Tags
casting, interruptspell, perl, spell


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:23 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3