Trivial random loot help
I use a variation of the following to add a random item to an NPC when it spawns (from global_npc.pl):
Code:
sub EVENT_SPAWN { Any help is appreciated :) Just can't come up with a good way to do this so far. |
This is what I went with. It's not perfect, but it's good enough for my uses.
Code:
sub EVENT_DEATH { |
Nice, this is something to help with a different idea I wanted to experiment with.
What I want to have happen, is when a certain lower level mob is killed, there would be a mob spawn from EVENT_DEATH, but the spawned mob would be at a level closer to the toon that killed the PH. In a nutshell, for example, if a level 15 kills the PH, the mob that spawns would be 15-20'ish. But if a level 40 toon kills the PH, it would spawn a level 40-45'ish mob. |
What I had hoped to do was remove the drop if a higher level even got on the hatelist - which would be the right way do to it - but that's above my skill level to figure out. Assuming it's even possible :)
|
Quote:
You could verify it by adding this code: (found in http://wiki.eqemulator.org/p?Ultimate_Perl_Reference) Code:
my @hatelist = $npc->GetHateList(); Then, just change the code logic to get each entity's level and remove loot if a higher level is there. |
I can't remember for the life of me, but way back on eqlive, I seem to remember some kind of named that dropped something for a specific class and if the wrong class killed the named, the item would not drop ? I'm not 100% positive on that. (memory fizzles a lot).
|
This should work for you...
Code:
sub EVENT_HATE_LIST { |
Quote:
|
That is exactly what I was trying to get to. Thanks Natedog :)
|
All times are GMT -4. The time now is 12:17 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.