|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
|
|
|
03-26-2016, 01:52 PM
|
Hill Giant
|
|
Join Date: May 2010
Posts: 125
|
|
$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!"); }
}
|
|
|
|
03-26-2016, 01:59 PM
|
Hill Giant
|
|
Join Date: May 2010
Posts: 125
|
|
Update: $client->Duck() is a ghetto workaround.
-Hate
|
03-26-2016, 10:05 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
Just add a blocked_spells entry for all these spells or something.
|
03-26-2016, 10:45 PM
|
Hill Giant
|
|
Join Date: May 2010
Posts: 125
|
|
Quote:
Originally Posted by Kingly_Krab
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
|
03-26-2016, 11:03 PM
|
|
Discordant
|
|
Join Date: Jan 2007
Posts: 443
|
|
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.
|
03-29-2016, 06:58 AM
|
Developer
|
|
Join Date: Mar 2009
Location: -
Posts: 228
|
|
$client->Stun(1)
|
03-29-2016, 03:25 PM
|
Hill Giant
|
|
Join Date: May 2010
Posts: 125
|
|
Quote:
Originally Posted by Kayen
$client->Stun(1)
|
Also does not stop casting Kayen.
- Hate
|
03-29-2016, 04:51 PM
|
|
Developer
|
|
Join Date: Dec 2012
Posts: 515
|
|
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
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 11:23 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|