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 04-17-2009, 01:04 PM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

Have you tried $class eq "Shadowknight" ? I think they are capitalized.
Reply With Quote
  #2  
Old 04-17-2009, 01:22 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

Nice, that fixed it. Thanks
Reply With Quote
  #3  
Old 04-17-2009, 03:47 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

New problem. I am trying to make a monster spawn adds at 75% and 25% and on death, but the only time one spawns is on death. This is the monsters quest

Code:
sub EVENT_SPAWN{
 quest::attacknpctype(1211);
}

sub EVENT_HP{
if ($hpevent <=75){
 quest::spawn(1210,0,0,76,11,0.50);
}
 if ($hpevent <=25){
 quest::spawn(1210,0,0,76,11,0.50);
}
}
sub EVENT_DEATH{
quest::spawn(1209,0,0,76,11,0.50);
}
Reply With Quote
  #4  
Old 04-17-2009, 03:54 PM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

Are you using quest::setnexthpevent()?
Reply With Quote
  #5  
Old 04-17-2009, 04:01 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Here is an example from a simple script on my server:

Code:
my $x;
my $y;
my $z;
my $h;

sub EVENT_SPAWN {
       quest::setnexthpevent(91);
}

sub EVENT_HP {       
    if($hpevent == 91) {
        my $x = $npc->GetX();
        my $y = $npc->GetY();
        my $z = $npc->GetZ();
        my $h = $npc->GetHeading();
        quest::spawn2(quest::ChooseRandom(223002,223003),0,0,$x,$y + 10,$z,$h);
        quest::spawn2(quest::ChooseRandom(223002,223003),0,0,$x,$y - 10,$z,$h);
        quest::setnexthpevent(76);

}

    if($hpevent == 76) {
        my $x = $npc->GetX();
        my $y = $npc->GetY();
        my $z = $npc->GetZ();
        my $h = $npc->GetHeading();
        quest::spawn2(quest::ChooseRandom(223002,223003),0,0,$x,$y + 10,$z,$h);
        quest::spawn2(quest::ChooseRandom(223002,223003),0,0,$x,$y - 10,$z,$h);
        quest::setnexthpevent(56);
}

    if($hpevent == 56) {
        my $x = $npc->GetX();
        my $y = $npc->GetY();
        my $z = $npc->GetZ();
        my $h = $npc->GetHeading();
        quest::spawn2(quest::ChooseRandom(223002,223003),0,0,$x,$y + 10,$z,$h);
        quest::spawn2(quest::ChooseRandom(223002,223003),0,0,$x,$y - 10,$z,$h);
        quest::setnexthpevent(26);
}

    if($hpevent == 26) {
        my $x = $npc->GetX();
        my $y = $npc->GetY();
        my $z = $npc->GetZ();
        my $h = $npc->GetHeading();
        quest::spawn2(quest::ChooseRandom(223002,223003),0,0,$x,$y + 10,$z,$h);
        quest::spawn2(quest::ChooseRandom(223002,223003),0,0,$x,$y - 10,$z,$h);
}
 }

sub EVENT_DEATH {
	quest::shout ("$name and the others may have beaten me, but they are no match for the beast!");
    quest::depop(2700255);
	quest::depop(2700256);
}
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #6  
Old 04-19-2009, 01:03 AM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

Code:
sub EVENT_SPAWN{
 quest::attacknpctype(1211);
 quest::setnexthpevent(75);
}

sub EVENT_HP{
if ($hpevent <=75){
 quest::spawn(1210,0,0,76,11,0.50);
 quest::setnexthpevent(25);
}
 if ($hpevent <=25){
 quest::spawn(1232,0,0,76,11,0.50);
}
}
sub EVENT_DEATH{
quest::spawn(1209,0,0,76,11,0.50);
}
For some reason when the monster gets to 25%, he summons two monsters. I do not know why
Reply With Quote
  #7  
Old 04-19-2009, 05:01 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Probably something to do with your script. Looks like you have this:

Code:
if ($hpevent <=25){
instead of this, which is what you should be using:

Code:
if ($hpevent == 25){
Not completely sure that is the cause of your issue, but that is my best guess.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply

Thread Tools
Display Modes

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 03:42 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