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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 04-15-2015, 11:44 PM
markusdabrave's Avatar
markusdabrave
Sarnak
 
Join Date: Jan 2012
Location: Plano, TX
Posts: 70
Default

Ok so the spell effect is working and the move command works great. I definitely like this better. However, timers still aren't cooperating. I'm so close I can taste it:

Code:
sub EVENT_SPAWN {
	quest::settimer("portercast",10);
}

sub EVENT_TIMER {
	if($timer eq "portercast") {
	quest::say("Casting...");
	quest::stoptimer("portercast");
	quest::say("Moved");
	}
}

sub EVENT_SAY {
	if ($text=~/Hail/i) {
	plugin::Whisper("Hail! Where would you like to go? [Butcherblock] Mountains, The [Feerrott], North [Karana], [Lavastorm] Mountains, [Misty] Thicket, [South Ro], [Steamfont] Mountains, West [Commonlands] or [Toxxulia] Forest?");
	}
	elsif ($text=~/Commonlands/i) {
	quest::say("Off to West Commonlands!");
	quest::settimer("portercast",10);
	}
#	quest::movepc(21, 1427, 479, -51, 0);
}
I think maybe this is an order thing. What happens is:
1. I /say commonlands
2. NPC says "Off to West Commonlands!"
3. NPC starts spell effect
4. 10 seconds later NPC says "Casting..." immediately followed by "Moved".

Seems like I'm getting hung up in the EVENT_TIMERS sub. The "Casting..." and "Moved" are something I just added in for testing instead of loading constantly. "Moved" is where my move line would be. So if I move it down past where the portercast timer is called in EVENT_SAY, it triggers simultaneously as the timer and I end up with "Moved" before "Casting..."

I could put the move command in the EVENT_TIMERS sub, but then I would have to mess with multiple timers, which seems like it would be defeating the purpose of using the timer. When you call a timer like that, where does the actual timer pause take place? Within EVENT_TIMERS would seem to be the obvious answer. Is there not a way to make the EVENT_SAY steps pause until the timer call is complete?

Edit:
I tried adding the move command to the EVENT_TIMERS sub but it doesn't function at all there.
Reply With Quote
 


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 07:29 PM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3