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 01-27-2012, 11:51 PM
Durge
Sarnak
 
Join Date: Jan 2010
Location: USA
Posts: 51
Default Boss trigger event

Hey guys, I'm totally baffled as to why this won't work, but maybe you guys can help? I dumbed this down a ton to try and get the boss to move, but he still wont move

Code:
##Test Boss Quest
##Created by Durge

sub EVENT_SPAWN
{
	quest::setnexthpevent(75);
}
sub EVENT_COMBAT
{
	$combat_state = 1;
	quest::shout("How dare you attack me $name! You shall die for your heracy!");
}

sub EVENT_HP
{
	if($hpevent == 75)
	{
		quest::shout("Stupid mortals! You think you can defeat me?");
		quest::moveto(-324, 778, -10, 128, 1);
	}
}
__________________
Reply With Quote
  #2  
Old 01-28-2012, 12:56 AM
Tabasco's Avatar
Tabasco
Discordant
 
Join Date: Sep 2009
Posts: 270
Default

This looks fine to me, except you might want to correct 'heresy.'

Upon further inspection, these commands try to give the mob a waypoint, which they seem to ignore in combat.
I even tried $npc->GMMove to same effect, but the source doesn't force an update.

Try updating the final command in perl_mob.cpp, XS_Mob_GMMove to:
THIS->GMMove(x, y, z, heading, true);

I can test this further tomorrow.
Reply With Quote
  #3  
Old 01-28-2012, 01:01 AM
Durge
Sarnak
 
Join Date: Jan 2010
Location: USA
Posts: 51
Default

Ok, thanks I'll give it a shot
__________________
Reply With Quote
  #4  
Old 01-28-2012, 01:59 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I think GMMove makes them warp/gate to whatever location you use. Unfortuantely, due to how combat works, you can't really make an NPC walk to another location during combat without using a few tricks.

You could set the special attacks to H so it won't aggro and then wipe the hate list both using quest objects. Then, it should be able to walk to another location, but you will also want to set it to save its guard point.

Before the move, you probably have to do something like this:
Code:
$npc->NPCSpecialAttacks("H", 0);
$npc->WipeHateList();
Then, the move:
Code:
$npc->MoveTo(-324, 778, -10, 128, 1);
And after it gets to the destination, you would turn aggro back on like this:
Code:
$npc->NPCSpecialAttacks("H", 0, 0 1);
But, the NPC would not be attacking the whole time it is moving. If you wanted it to attack while walking, you would need to simulate it using Damage() or something on a timer.

I don't know the details of exactly what you are wanting to do, but it is probably not going to be as simple as you may have expected.

Also, I don't know why you are setting $combat_state to 1 in EVENT_COMBAT. That is not how it works. You would do something more like this:

Code:
	if ($combat_state)
	{
		quest::shout("How dare you attack me, $name! You shall die for your heresy!");
	}
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 01-28-2012, 03:41 PM
Tabasco's Avatar
Tabasco
Discordant
 
Join Date: Sep 2009
Posts: 270
Default

I suppose you could depop and pop if the move needs to be instant.
Reply With Quote
  #6  
Old 01-28-2012, 04:27 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

That depends on if they want the NPC to walk to a destination or if they are ok with them warping to a destination. If they don't need it to walk there, then they can just have it warp there with GMMove() like you said.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
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 09:58 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3