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 06-03-2009, 06:20 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default sub EVENT_DEATH?

I have question on sub EVENT_DEATH

I like to make it so when NPC dies the player who killed him gets an item.

Scriptwise its seems simple

sub EVENT_DEATH
{
quest::summonitem(11242);
}


but what bothers me, what if player in a group? who will get the item? who ever was top on agro list at time of death? player who delt kiling blow? entire group?

thanks!
Reply With Quote
  #2  
Old 06-03-2009, 06:34 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Only the person that lands the killing blow will get anything from EVENT_DEATH. If you want the group to get it, you can use EVENT_KILLED_MERIT.

I think EVENT_DEATH isn't a very good way to give rewards, because someone from outside the group can come in and get the last hit and get the reward. At least with EVENT_KILLED_MERIT, you ensure that the group who got the exp will get the reward. If you only want 1 character to get the reward, you could probably do some kind of random to give a random chance for someone to get it, but it wouldn't be easy to ensure that only 1 person gets the reward each time.

You might be better off using the quest::addloot() command to add loot to the corpse during the fight. I don't think you can add loot upon death, but, it might be worth trying just to see if you can.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 06-03-2009, 06:41 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

ok to be more specific.

player is on a quest - prbaobly with usage of quest global

quest meant as solo quest.

so reward should be given ONLY if a player has a global variable flag set

at same time if using MERIT event - not entire group should get the reward item but only those who actualy had the flag set, since we do not know who a player may be groping with and do not want to give reward to entire group since some of them may be on the quest, whiel others are not

essentialy i am trying to emulate wow/eq2 system where mob ONLY drops a quest item for a player who is actualy on the quest for that item
Reply With Quote
  #4  
Old 06-03-2009, 06:51 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Yeah, then you want to use Merit for that. You would just have a check for the qglobal in the Merit event and give the item to anyone with that qglobal that is getting Merit for the kill.

You could also still do this during the fight if you wanted by using addloot(), but that all depends on how you want to do things. Also, if you are using the task system, you can avoid using qglobals for this completely. You would just be able to check if they had a certain task and were on a certain step and then give them the reward if so. Many of the same things can be accomplished by using either qglobals or Tasks. It is all just about how you want the quest to happen. Basically, if you want to use the task window and task system, then tasks are the way to go, but if not, then qglobals are another option.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 06-04-2009, 02:15 PM
caylah023
Sarnak
 
Join Date: May 2008
Location: oregon
Posts: 41
Default

ok i got a question is it possible to say....make that sub event death then quest summonitem thing work when you kill another player.

player one kills player two and suddenly he gets an item?
Reply With Quote
  #6  
Old 06-04-2009, 03:51 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

Probably the player.pl
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 11:04 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