Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Quests

Archive::Quests Archive area for Quests's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-12-2004, 03:50 PM
Malignus Wingnut
Hill Giant
 
Join Date: Sep 2004
Posts: 233
Default Spawning/Casting from Inside HP Events

Hello all. I'm having some errors with a quest file i have. It involves casting and spawning monsters from inside HP Events. Here's the file.

Code:
#Kaldra
#zone - Kod`Taz
#quest - Final Event

sub EVENT_SPAWN
{
	quest::shout("WHO DARES CHALLENGE ME?  I AM THE FINAL ARBITER OF MOLIMO, YOUR QUEST ENDS HERE, MORTALS!");
	quest::setnexthpevent(70);
}

sub EVENT_ATTACK
{

	quest::spawn(291096,0,0,($x-10),$y,$z);
	quest::spawn(291096,0,0,($x+10),$y,$z);
	quest::spawn(291096,0,0,($x-20),$y,$z);
	quest::spawn(291096,0,0,($x+20),$y,$z);
	quest::spawn(291096,0,0,$x,($y+10),$z);
}


sub EVENT_HP
{
	if($hpevent == 70)
	{
		quest::selfcast(3150);
		quest::setnexthpevent(30);
	}

	if($hpevent == 30)
	{
		quest::spawn(281097,0,0,($x-20),$y,$z);
		quest::spawn(281097,0,0,($x+20),$y,$z);
	}
}



sub EVENT_DEATH
{

	quesT::shout("I underestimated you, Mortals.  Very well, though you have bested me, Molimo will not relinquish his throne.");
}

When it hits the part of quest::selfcast and quest::spawn (inside the if statements about $hpevent==x)zone.exe gives me CastToClient errors. Is this an error in my source code of zone.exe or an error in my quest file? Heh...or both?

I do have an Idea though... since both spawn and selfcast work outside of the hp events, is there a Goto like function? To go to a certain label in the quest file, and then return to where it was called after it is done? Using that i could just have it jump to another section of the code upon the if($hpevent==x) statements returning true.

If you have any ideas of what could be wrong, please post.
Reply With Quote
  #2  
Old 09-12-2004, 04:28 PM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

Try this:
Code:
#Kaldra 
#zone - Kod`Taz 
#quest - Final Event 

sub EVENT_SPAWN { 
   quest::shout("WHO DARES CHALLENGE ME?  I AM THE FINAL ARBITER OF MOLIMO, YOUR QUEST ENDS HERE, MORTALS!"); 
   quest::setnexthpevent(70); 
} 

sub EVENT_ATTACK { 
   quest::spawn(291096,0,0,($x-10),$y,$z); 
   quest::spawn(291096,0,0,($x+10),$y,$z); 
   quest::spawn(291096,0,0,($x-20),$y,$z); 
   quest::spawn(291096,0,0,($x+20),$y,$z); 
   quest::spawn(291096,0,0,$x,($y+10),$z); 
} 

sub EVENT_HP { 
   if($hpevent == 70) { 
      firstevent();
   } 
   if($hpevent == 30) { 
      secondevent(); 
   } 
} 

sub EVENT_DEATH { 
   quesT::shout("I underestimated you, Mortals.  Very well, though you have bested me, Molimo will not relinquish his throne."); 
}

sub firstevent {
   quest::selfcast(3150);
   quest::setnexthpevent(30);
}

sub secondevent {
   quest::spawn(281097,0,0,($x-20),$y,$z);
   quest::spawn(281097,0,0,($x+20),$y,$z);
}
Apologies if I missed an error somewhere that could be causing it, but I'm tired heh.
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
  #3  
Old 09-12-2004, 04:31 PM
Malignus Wingnut
Hill Giant
 
Join Date: Sep 2004
Posts: 233
Default

Ahah! Exactly the kind of function i wanted. Thanks Killspree.
Reply With Quote
  #4  
Old 09-13-2004, 01:32 AM
m0oni9
Hill Giant
 
Join Date: Dec 2003
Posts: 166
Default

A while ago I submitted a change that I think might fix this. It doesn't look like it actually got merged in. Would you mind giving it a try? http://www.eqemulator.net/forums/viewtopic.php?t=13906. Where it says to change line 342, the line number is now 351, The other couple line numbers are probably off too, but should be somewhere near. This might also fix some other odd problems you could run into.
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 11:19 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3