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 11-06-2008, 01:48 PM
Slingshot
Fire Beetle
 
Join Date: Oct 2008
Location: New Jersey
Posts: 19
Default party flaged after kill

I searched the forums and couldn't find an answer to this.

How would I flag a party after killing an NPC?

For instance I'm writing the pit fiend quest in tutorialb. I want it to flag the entire party for killing krenshin for when a party members hail guard maddoc.

I was going to use the quest::flagclient command but I wasn't sure if that affects all the clients in the group.
Reply With Quote
  #2  
Old 11-06-2008, 09:38 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

You can use sub EVENT_KILLED_MERIT and then use quest globals to define the flags. Quest globals are much better IMO, as I think flags may have some issues.

You will need to make sure to enable the NPC for quest globals as well as any NPC who is supposed to see that flag. You do that by changing the qglobal field in the npc_types table from 0 to 1.

Then, you should be able to use something like this on your flagging NPC when it dies:

Code:
sub EVENT_KILLED_MERIT {

  quest::setglobal("myflag",1,5,"F");

}
Then, to check for the flag, you would just use:

Code:
if($qglobals{myflag} == 1);
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 11-06-2008, 11:08 PM
Slingshot
Fire Beetle
 
Join Date: Oct 2008
Location: New Jersey
Posts: 19
Default

Thanks, That looks like exactly what I need. Do I have to delete the global at some point or does it really matter?

I guess if I left it in I could use it to make the quest non repeatable. Which is something else I was trying to figure out how to do. Just change the value to 2 after the turn in then if the client hails the quest giver again I can have him check the value and if it's 2 I can have him say something like "great job on killing that thing for me, thanks again.".
Reply With Quote
  #4  
Old 11-07-2008, 11:34 AM
Slingshot
Fire Beetle
 
Join Date: Oct 2008
Location: New Jersey
Posts: 19
Default

Hey! This actually worked:

Code:
sub EVENT_DEATH{

  quest::emote("'s corpse stops moving");
  quest::say("Cave Rats killed so far = $qglobals{caveratskilled}");
   
 }

sub EVENT_KILLED_MERIT {

  quest::setglobal("caveratskilled",($qglobals{caveratskilled}+1),5,"F");

}
Now I can do quests that involve killing multiple monsters, like 10 cave rats or something.
Reply With Quote
  #5  
Old 11-07-2008, 04:16 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

Have you seen the task system yet?
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:16 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3