Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 03-25-2017, 02:35 AM
Excuses
Hill Giant
 
Join Date: Mar 2015
Posts: 126
Default Event death

Hey guys,

In regards to event on death and death complete, i was wondering if it's possible to reward players a LDoN currency, when they die? i have tried a few ways, even the simplest way:

sub EVENT_DEATH_COMPLETE {

quest::addldonpoints("15", 1);

}

But obviously, not exactly like that because it would have to reward the $name of who killed him, i have tried several ways but cannot seem to pinpoint it, any hints?
  #2  
Old 03-25-2017, 02:44 AM
GRUMPY
Discordant
 
Join Date: Oct 2016
Posts: 445
Default

Is that planning on rewarding only one player or, if a group, all players for the kill ?
  #3  
Old 03-25-2017, 02:50 AM
Excuses
Hill Giant
 
Join Date: Mar 2015
Posts: 126
Default

All players would be nice, or both.
  #4  
Old 03-25-2017, 02:53 AM
GRUMPY
Discordant
 
Join Date: Oct 2016
Posts: 445
Default

Did you try setting that second value "theme" to 0 ? Not sure if that would work, haha
  #5  
Old 03-25-2017, 10:27 AM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

EVENT_DEATH_COMPLETE's initiator is the one who did the killing, I believe. (I'd have to look again). But, I assume you were using that code in the /quests/global/global_player.pl

If so, and it didn't work, then, I suspect the one doing the killing is indeed the initiator.

So try this instead:

Code:
sub EVENT_DEATH_COMPLETE
{
	if ($entity_list->GetMobByID($killer_id)->IsNPC())
	{
		$client->UpdateLDoNPoints(15, 1);
	}
}
Points is a long integer last time I checked, so, there is no need to place it in quotes (though I'm assuming what you posted was just one of many iterations trying to get it to work, so it's just a fyi).
  #6  
Old 03-25-2017, 06:47 PM
Excuses
Hill Giant
 
Join Date: Mar 2015
Posts: 126
Default

Yea i was wondering if i needed it in the global_player.pl, i shall try that, i actually used it on the npc being killed's .pl script, so i could make only those npcs give the credit.
  #7  
Old 03-25-2017, 06:54 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Quote:
Originally Posted by Excuses View Post
Yea i was wondering if i needed it in the global_player.pl, i shall try that, i actually used it on the npc being killed's .pl script, so i could make only those npcs give the credit.
Well no you dont need to use global_player (it's just another angle one could go), if you want to use this on only specific NPC's then, you have two choices. Use the global NPC script /quests/global/global_npc.pl, or zone based "global" NPC script /quests/<zonesn>/default.pl in either case you'd use EVENT_SLAY
  #8  
Old 03-25-2017, 06:58 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Actually, I'd have to test. I'm not even sure (yet) if the NPC has a target, thus able to identify the entity that it slayed, in the EVENT_SLAY. I'll have to look, however, going by the wiki, I don't see any exported variables for that particular event.
  #9  
Old 03-26-2017, 03:33 AM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Use "EVENT_KILLED_MERIT" as it will give credit to all players that were in the party /raid that killed the NPC.


This would be used on an NPC type script.

Code:
sub EVENT_KILLED_MERIT {
$client->UpdateLDoNPoints(15, 1);
}
  #10  
Old 03-27-2017, 12:53 AM
Excuses
Hill Giant
 
Join Date: Mar 2015
Posts: 126
Default

That's awesome, thanks alot Nate!

Quote:
Originally Posted by NatedogEZ View Post
Use "EVENT_KILLED_MERIT" as it will give credit to all players that were in the party /raid that killed the NPC.


This would be used on an NPC type script.

Code:
sub EVENT_KILLED_MERIT {
$client->UpdateLDoNPoints(15, 1);
}
  #11  
Old 03-27-2017, 02:14 AM
Excuses
Hill Giant
 
Join Date: Mar 2015
Posts: 126
Default

Hmm afraid not Nate, didn't seem to update? Does it matter if it is a version of a zone i have edited?
  #12  
Old 03-27-2017, 03:17 AM
GRUMPY
Discordant
 
Join Date: Oct 2016
Posts: 445
Default

I tried this just for the fun of it, but it didn't work for me either. I even tried getting the
task, then trying it and still nothing.
  #13  
Old 03-27-2017, 11:03 AM
atrayas
Hill Giant
 
Join Date: Jun 2010
Posts: 105
Default

With sub_event_killed_merit I found that alot of the currency's would not update until you zone.
  #14  
Old 03-27-2017, 11:14 AM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

EVENT_KILLED_MERIT I believed was an NPC event, where initiators are those individuals, group or raid that received experience from the kill. Id have to confirm with the source to be sure in case of behavior change or such. However, the event death complete code I provided should do just fine?

You could try to $client->UpdateAdmin() after giving the points.
  #15  
Old 03-27-2017, 11:16 AM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

I mean you are looking to give ldon points for a players death right, it's how your OP reads anyway.
Closed Thread


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 12:24 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