|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
03-25-2017, 02:35 AM
|
Hill Giant
|
|
Join Date: Mar 2015
Posts: 126
|
|
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?
|
03-25-2017, 02:44 AM
|
Discordant
|
|
Join Date: Oct 2016
Posts: 445
|
|
Is that planning on rewarding only one player or, if a group, all players for the kill ?
|
03-25-2017, 02:50 AM
|
Hill Giant
|
|
Join Date: Mar 2015
Posts: 126
|
|
All players would be nice, or both.
|
03-25-2017, 02:53 AM
|
Discordant
|
|
Join Date: Oct 2016
Posts: 445
|
|
Did you try setting that second value "theme" to 0 ? Not sure if that would work, haha
|
03-25-2017, 10:27 AM
|
|
Dragon
|
|
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
|
|
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).
|
03-25-2017, 06:47 PM
|
Hill Giant
|
|
Join Date: Mar 2015
Posts: 126
|
|
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.
|
03-25-2017, 06:54 PM
|
|
Dragon
|
|
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
|
|
Quote:
Originally Posted by Excuses
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
|
03-25-2017, 06:58 PM
|
|
Dragon
|
|
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
|
|
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.
|
03-26-2017, 03:33 AM
|
|
Developer
|
|
Join Date: Dec 2012
Posts: 515
|
|
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);
}
|
03-27-2017, 12:53 AM
|
Hill Giant
|
|
Join Date: Mar 2015
Posts: 126
|
|
That's awesome, thanks alot Nate!
Quote:
Originally Posted by NatedogEZ
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);
}
|
|
03-27-2017, 02:14 AM
|
Hill Giant
|
|
Join Date: Mar 2015
Posts: 126
|
|
Hmm afraid not Nate, didn't seem to update? Does it matter if it is a version of a zone i have edited?
|
03-27-2017, 03:17 AM
|
Discordant
|
|
Join Date: Oct 2016
Posts: 445
|
|
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.
|
03-27-2017, 11:03 AM
|
Hill Giant
|
|
Join Date: Jun 2010
Posts: 105
|
|
With sub_event_killed_merit I found that alot of the currency's would not update until you zone.
|
03-27-2017, 11:14 AM
|
|
Dragon
|
|
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
|
|
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.
|
03-27-2017, 11:16 AM
|
|
Dragon
|
|
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
|
|
I mean you are looking to give ldon points for a players death right, it's how your OP reads anyway.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 06:53 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|