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
  #4  
Old 09-30-2008, 03:22 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default

Correct. I was only giving you an example of what to do with it. It will not choose the random until he is actually at 99% health. EVENT_ATTACK executes before he gets to 99%.

Maybe if I know a little more how you want it to work, I can give you better code. Looking from what you have, try this:

Code:
my $Random;

sub EVENT_SPAWN {
  quest::setnexthpevent(99);
  $Random = quest::ChooseRandom(Warrior,Cleric,Paladin,Ranger,Shadowknight,Druid,Monk,Bard,Rogue,Shaman,Necromancer,Wizard,Magician,Enchanter,Beastlord,Berserker);
}

sub EVENT_HP {	
  if($hpevent == 99) {
    quest::shout("Only The powers of a $Random can defeat me!");
  }
}

sub EVENT_ATTACK {
  if($class eq $Random) {
    quest::say("You are the right one to kill me");
  }
  else {
    quest::say("You can not kill me you are a $class and you need to be a $Random");
  }
}
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 10:15 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