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 05-19-2013, 09:57 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default Signal question

I have an encounter I am doing but i want the mobs to be killed in a specific order and if not then the signals get reset.

for instance: 6 mobs, 1,2,3 send signal 1 2 3 and the mobs depop and chest spawns. Is there a way to add a check for a signal 4 that would come from 4,5,6 and reset the entire event and repop mobs?
Reply With Quote
  #2  
Old 05-20-2013, 01:58 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

There are multiple ways you can do what it seems like you are asking. It all depends on how you want your event controlled. What is the current setup? i.e. one boss mob already popped with several others or invisible trigger/controller?
Reply With Quote
  #3  
Old 05-20-2013, 06:49 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default

6 mobs spawned that all have different ID's and I only want 3 of them to be killed in order to spawn the chest. IE: 999284, 285, and 286 but if 287, 288, 289 are killed it resets the event. My idea was to have the chest spawned after last singal was sent in order.
Reply With Quote
  #4  
Old 05-20-2013, 08:21 PM
nenelan
Hill Giant
 
Join Date: Feb 2008
Posts: 116
Default

One way that could work is as follows.
You could have the three correct ones pass a 1 as their signalwith to the event handler, have the incorrect ones pass a 4 as their signal to the event handler. Have the mob receiving signals add up the signals.
Once we hit "3", spawn the chest and depop all other mobs. If we end up going over 3 at all, completely reset the event.
That should give you an angle to how to get started, if you need anything else, post what you tried from using these suggestions and we'll help further!

EDIT: DOH! I read that wrong. You said specific order. Above would not work for that. Leaving it up for posterity though as it would work if a certain amount of mobs being killed.

For a specific order, the first mob could pass a "1", the second mob could pass a "2", and the third mob could pass a "3", with "0s" being passed by the incorrect mobs. Again have a counter variable that would start at 0. Test the signal being sent. If it is 0, reset the event. Then, if it does not reset, test the variable against the signal, if it was incremented by 1, we would consider that a correct kill, and store the signal as the variable. If it was incremented by anything but 1, reset the event. If 3 ever gets stored, spawn the chest. For example:
We start with a 0. We kill the wrong mob, a 0 gets passed and we reset the event.
We kill mob with signal 2, the variable test 0 vs 2, and it did NOT increment by 1, so we would reset the event.
We kill mob with signal 1, the variable would be tested 0 vs 1, and it did increment by 1. We replace the variable with the 1.
Next we kill mob 2, the variable would be tested 1 vs 2, and it did increment by 1. We would replace the variable with the 2.
Next we kill mob 3, the variable would be tested 2 vs 3, and it did increment by 1. We would replace the variable with the 3, and since that is what we were looking for for a successful win, we would end the event and pop a chest.
If, for instance, we killed mob 3 after mob 1, the variable would be tested 1 vs 3, and it would reset the event.

Hopefully that helps for the general gist of how it would work and you should be able to work from there. There might be easier ways to do this, but this is the first one that came to mind for me.

Last edited by nenelan; 05-20-2013 at 08:33 PM.. Reason: Reading comprehension fail on my part.
Reply With Quote
  #5  
Old 05-20-2013, 09:51 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default

I appreciate the input and help Ive already got most of it written im just curious as to what the command is to reset lol..

Like i know
Code:
sub EVENT_SIGNAL {
  if($signal == 1) {
quest::spawn2("your mom")
is what you enter to recieve the signal but what im actually asking for is there a specific command to reset the signal list so that it doesn't see it has already recieved signal 1?


Or should I make it less complicated and have it do an NPCentity check instead.
Reply With Quote
  #6  
Old 05-20-2013, 10:26 PM
nenelan
Hill Giant
 
Join Date: Feb 2008
Posts: 116
Default

There's no "resetting" the list. When it gets a signal, that's over and done with. Us storing and manipulating variables is kind of like that list you are talking about.
We'll go back to my tests I was talking about.
So, say we start with a variable $placeholder = 0, we'll set this when the Event Handler mob spawns in EVENT_SPAWN. This will be what we are going to use to test our signals with.
Now, rather than using
Code:
if ($signal == 1) {
we will instead use
Code:
if (($placeholder + 1) == $signal) {
     $placeholder = $signal;
     ##Anything else we want done
}
And then in the false condition of that test, put whatever you would do to reset the event, as well as resetting $placeholder to 0. Depop mobs, repop mobs, heal mobs, etc.
So, as long as you give your critters the code to pass the signals of 1, 2, 3 on their death, this SHOULD handle it quite easily, and the rest is just mob manipulation.

Hopefully that helps!
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 01: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