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
  #3  
Old 01-06-2007, 06:21 PM
JrFaust
Sarnak
 
Join Date: Aug 2005
Location: Overthere
Posts: 82
Default

This is what I came up with.
The subroutine HEALING is the only way I got a pause.
For what ever reason nesting quest::selfcast(spellid); and castspell($userid,spellid); in the sub EVENT_TIMER or even in a sub EVENT_SIGNAL it doesn't cast the spell.

Code:
#Test for pausing a selfcast script.
#This can be added to any spawn in any zone.
#This script shows several way we should be able to pause the quest::selfcast();

sub EVENT_SAY {
  if ($text=~ /Hail/i) {
   quest::say("Why hello there, $name!  I can heal you.");
   quest::settimer("healme",5);   #This is a five second pause then the event timer call.
  }
  if ($text=~ /Hurt/i) {
   quest::say("Why hello there, $name!  Stand still for a few seconds this won't hurt much.");
   quest::pause(30);              #This should be a 30 second pause (but there isn't) then a heal.
   quest::say("There sould be a pause then a heal.");      #This is just a statement to see if the script is running.
   quest::selfcast(6110);
  }
  if ($text =~ /Heal/i) {
  	$h = 0;
  	HEALING();
  }
}

sub HEALING {                     #This works to get about a 10 second pause and it appears not to lag the server.
  while ($h <= 30000000) {
    #quest::say("$h");
	  $h ++;
  }
quest::say("Direct sub call to heal.");                     #This is just a statement to see if the script is running.
quest::selfcast(6110);
}

sub EVENT_TIMER {                 #This is the event timer call but the selfcast won't work nested here for what ever reason.
	if ($timername == "healme") {
		quest::say("Timer call to heal.");                       #This is just a statement to see if the script is running.
		quest::stoptimer("healme");
		quest::selfcast(6110);
  }
}
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 02:39 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3