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 01-18-2010, 05:18 PM
Digitala's Avatar
Digitala
Sarnak
 
Join Date: Dec 2006
Posts: 35
Default Npc Casting

Hey guys!

I just have a question regarding npc channeling.
I have been writing this perl port quests for an npc.

Player tells npc something and i want this npc to cast a portspell.
The thing is that the npc casts it instant. There is no casting time for some reason.
What should i do to force the npc to channel the spell instead of an insta translocation.

{quest::selfcast("####"); }

Any info is appreciated
Thx
Reply With Quote
  #2  
Old 01-18-2010, 05:40 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

The only way I can think of right now that uses the cast time is $npc->CastSpell, however you really need to use this with a Translocate target spell which pops up a confirmation box that the player must accept.

E.g. the following will cast translocate Nexus after the spell cast time is over:
Code:
sub EVENT_SAY
{
        if ($text=~/Nexus/i) {
                $npc->CastSpell(2943, $client->GetID());
        }
}
Reply With Quote
  #3  
Old 01-18-2010, 05:57 PM
Digitala's Avatar
Digitala
Sarnak
 
Join Date: Dec 2006
Posts: 35
Default

Thx Derision!

Been thinking.
Is there a way to maybe hold the cast for awhile?
Like /pause in a macro. So that wen the player asks for the port
the npc will que the cast for, lets say 30 sec?

Just trying to figgur something out.
Reply With Quote
  #4  
Old 01-18-2010, 06:09 PM
nilbog
Hill Giant
 
Join Date: Nov 2007
Posts: 197
Default

castspell should retain the casting time of the spell, but for other uses you can add timers

this should wait 10 seconds before starting the casting time of the translocate

Code:
sub EVENT_SAY {
if ($text=~/whatever/i) {
	quest::stoptimer("port");
        quest::settimer("port",10);
	}
        }
	
	sub_EVENT_TIMER {
	if($timer eq "port") {
	quest::stoptimer("port");
	$npc->CastSpell(2943, $client->GetID());
	}
	}
Reply With Quote
  #5  
Old 01-18-2010, 06:15 PM
Digitala's Avatar
Digitala
Sarnak
 
Join Date: Dec 2006
Posts: 35
Default

Awsome nilbog

Gonna try that one out =)
Thx!
Reply With Quote
Reply


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 02:33 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