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 10-17-2013, 03:45 PM
kimura
Hill Giant
 
Join Date: Oct 2011
Posts: 132
Default linking NPCs in Quest

I'm not entirely sure how to describe this, but I guess I want to link 3 npc's together in a quest.

Example, NPC1 and NPC2 have a battle and if NPC1 wins then NPC3 does one thing, but if NPC2 wins then NPC3 will do something else. I know this is very vague, but I don't want to give away the script idea lol.

Just want to know if this is possible I guess lol.

Thanks, please be nice...lmao
Reply With Quote
  #2  
Old 10-17-2013, 04:01 PM
Dunge0nMastr
Hill Giant
 
Join Date: Oct 2002
Location: Rockville, MD
Posts: 124
Default

The best way I have found to do this is using Signals. I know you could set timers with entity_id checks but i find them cumbersome.

An example of a signal system would be:

NPC 1:
If NPC Dies (for example)
Code:
sub EVENT_DEATH {
quest::signalwith(NPCIDTOSIGNAL,#of signal,Time(i leave this at zero 99% of the time);
}
then on NPC2:
Code:
sub EVENT_SIGNAL{
if ($signal == X) {
do whatever you want him to do here;
}
}
and so forth.

Alot of stuff can be done using this method and its what i prefer to use. often times i will set up invisble NPCs to track events and have mobs send signals back and forth b/w the tracker and the ones actively engaged.

I used signals extensively in my Temple of Veeshan Ring of Vulak Event which i think are somewhere on these forums ill dig up a link for ya so u can look @ the trackers and how its all working.

Edit: heres the thread, http://www.eqemulator.org/forums/showthread.php?t=35922
I believe theres a zip at the end of it too for referencing.
__________________
Bront -Server Admin/Owner and Lead Quest Dev for Kildrukaun's Prophecy
http://kpemu.com/
Reply With Quote
  #3  
Old 10-17-2013, 04:05 PM
nenelan
Hill Giant
 
Join Date: Feb 2008
Posts: 116
Default

What you want to use is a signal/signalwith. A real simple example of how they work together to pick through is in Sleeper's Tomb, Bittles the Lost on hail will signal Ferrin Q`Nyil to say something. On that signal, he says something and signals back to Bittles.

A bit of work and research from there should allow you to do what you want, it's not too bad. If I recall correctly, you can only pass a number, but with some creative work, you can have that number mean whatever you need it to.

If you have any specific questions, feel free, but that SHOULD steer you in the correct direction!
Reply With Quote
  #4  
Old 10-17-2013, 04:18 PM
kimura
Hill Giant
 
Join Date: Oct 2011
Posts: 132
Default

so awesome! thanks so much guys! I will look into this information! :P
Reply With Quote
  #5  
Old 10-19-2013, 10:57 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default

Basically for NPC1
Code:
sub EVENT_DEATH {
 quest::signalwith(999299,3);
	}
}
and NPC2
Code:
sub EVENT_DEATH {
 quest::signalwith(999299,9);
	}
}
Obviously changing out your npc id. But your recieving NPC3 would look like
Code:
sub EVENT_SIGNAL {
  if($signal == 3) {
         quest::spawn2(999353,0,0,965,254,-239,192);
	}
    
   elsif($signal == 9) {
    quest::depopall(999292);
    quest::depopall(999291);
    quest::depopall(999287);
    quest::depopall(999288);
    quest::depopall(999289);
    quest::depopall(999290);
    quest::spawn2(999290,0,0,813,176,-239,254);
    quest::spawn2(999291,0,0,958,347,-239,128);
    quest::spawn2(999292,0,0,1102,176,-239,254);
    quest::spawn2(999287,0,0,812,344,-239,128);
    quest::spawn2(999288,0,0,1103,345,-239,128);
    quest::spawn2(999289,0,0,958,177,-239,253);
    }
}


sub CheckForRavs {
    if(!$entity_list->GetMobByNpcTypeID(999297) && !$entity_list->GetMobByNpcTypeID(999298) && !$entity_list->GetMobByNpcTypeID(999287)) {
	}
}

sub EVENT_TIMER
{
if ($timer eq "repop")
  {
    quest::stoptimer("repop");
    quest::depopall(999292);
    quest::depopall(999291);
    quest::depopall(999287);
    quest::depopall(999288);
    quest::depopall(999289);
    quest::depopall(999290);
    quest::spawn2(999290,0,0,813,176,-239,254);
    quest::spawn2(999291,0,0,958,347,-239,128);
    quest::spawn2(999292,0,0,1102,176,-239,254);
    quest::spawn2(999287,0,0,812,344,-239,128);
    quest::spawn2(999288,0,0,1103,345,-239,128);
    quest::spawn2(999289,0,0,958,177,-239,253);
  }
}
This was a script for my zombie event in frostcrypt. certain zombies had to be killed in order to get the chest to spawn and if the wrong zombie was killed it reset the event entirely and you had to do it over.
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 07: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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3