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 09-09-2018, 03:47 PM
Almusious
Fire Beetle
 
Join Date: Sep 2012
Posts: 25
Default

Quote:
Originally Posted by Huppy View Post
I almost forgot about another question I had regarding this follow thing and wondering if an idea I had was possible.

For example, NPC starts following player, but then the player is moving too fast, creating a big distance between them.

Is there a way to set an "sfollow" when a certain distance happens ? Like if the player gets too far away, the NPC quits ?
You could set a timer when you initiate the follow, then use an event timer like:

Code:
sub EVENT_TIMER
{
	if ($npc->CalculateDistance($entity_list->GetClientByCharID($npc->GetEntityVariable("master"))->GetX(),
								$entity_list->GetClientByCharID($npc->GetEntityVariable("master"))->GetY(),
								$entity_list->GetClientByCharID($npc->GetEntityVariable("master"))->GetZ()) > 20)
	{
		quest::sfollow();
	}
}
This assumes you replaced $entity in the code earlier posted with $npc.
Reply With Quote
  #2  
Old 09-09-2018, 04:05 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,332
Default

Quote:
Originally Posted by Almusious View Post
You could set a timer when you initiate the follow, then use an event timer like:
That could be something that may help with my intentions here. You see, I am looking at a possible exploit with the follow event.

A player could end up using /warp and then wait for the NPC to arrive. That's why I thought a distance limit would help with that.
Reply With Quote
  #3  
Old 10-26-2018, 11:40 AM
JimB_1958
Sarnak
 
Join Date: Mar 2013
Location: Springfield MO
Posts: 66
Default

Weird thing:

I want to fire an event in player.pl when the player takes damage from a mob.

Kind of like damage shields work.

I would prefer to get the id of the mob that did the damage, but that is not 100% needed.

Thank you for any assistance.
__________________
"We are all on the same team, and I think not enough people realize this."
- Leetsauce
Reply With Quote
  #4  
Old 10-26-2018, 12:15 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Quote:
Originally Posted by JimB_1958 View Post
Weird thing:

I want to fire an event in player.pl when the player takes damage from a mob.

Kind of like damage shields work.

I would prefer to get the id of the mob that did the damage, but that is not 100% needed.

Thank you for any assistance.
If you're doing that, do it in LUA. There are serious performance indications to doing this.
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 12:16 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 - 2026, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3