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-09-2009, 05:37 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default Get item when NPC kills another

I am making a quest where you have to heal an NPC and keep it alive while it kill another npc. I want you to be able to get an item if the one npc kills the other, but I can't figure out how. I have already tried a ton of different things.
Reply With Quote
  #2  
Old 05-09-2009, 05:46 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

and is there any way other than making the one NPC the persons pet to be able to heal him
Reply With Quote
  #3  
Old 05-09-2009, 07:41 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default

On this one, I would probably set up a script on the NPC you are supposed to keep alive to attack and wait for a signal. I would have the NPC that is supposed to die signal the NPC you are supposed to keep alive. Then the one you keep alive can give you the item. Not sure how you are going to keep any PC from helping to kill, though... unless you do an aggro check and check to see the npc type/id.
Reply With Quote
  #4  
Old 07-08-2009, 12:06 PM
litlamzetiv
Fire Beetle
 
Join Date: Jun 2009
Location: Alaska
Posts: 12
Default

Perhaps you could have the target walk a path, and when he gets to the end of the path, despawn and repop as a quest mob that hands out the item you want. Halfway down the path, the mob is attacked and defends itself, and that's when you want to heal it.

The thought is, if it doesn't make it to the end, then it can't give out the item, and it can't make it to the end without living through the attack?
Reply With Quote
  #5  
Old 07-08-2009, 12:50 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

joligario's solution is probably the best way to do it. In event_death on the other npc use quest::signal() to send a signal to the one you heal and have that event_signal code in the healed npc give you the item. not sure how to deal with the heal issue.
__________________
The Realm
Reply With Quote
  #6  
Old 07-08-2009, 01:20 PM
Yeormom
Discordant
 
Join Date: Apr 2004
Location: 127.0.0.1
Posts: 402
Default

I would add an entire new function to your zone server source code to put the item inputted through the new quest function directly on the corpse of other when desired and add the quester(s) as an authorized looter. It might be out of scope for you but if not, have fun!
__________________
Yeorwned
Bane of Life [Custom Classic/PvP]
Reply With Quote
  #7  
Old 07-13-2009, 02:23 PM
Dibalamin
Hill Giant
 
Join Date: Dec 2007
Posts: 182
Default

You'll need a player.pl using the sub EVENT_CAST to check for all your heal spells, give you a global variable and then send a signal to the OTHER mob (the dying one) that will check all possible targets in range, reward the item to the PC that has the global variable upon his death, then clear the variable.

You can also use the sub EVENT_CAST_ON I believe.
__________________
Retired EMarr
Project1999 Developer
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 04:13 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3