View Single Post
  #2  
Old 02-01-2015, 04:16 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Quote:
Originally Posted by provocating View Post
I can also access the inventory on the NPC before it is a corpse and I can delete the inventory if I know the item number, but this does not really help me much. The end goal is to remove a percentage of the loot based on conditions. Sure I could make another loottable and assign it based on the condition but spread out over hundreds of mobs doing it via Perl or Lua will simplify my life hundreds of times over.
Not quite sure what is is you're after. Are you concealing information, so that it remains secret? (Wouldn't blame you for doing so, just want to know if it's that or a comprehension issue on my part, likely the latter.)

But I'll focus on this:
Quote:
The end goal is to remove a percentage of the loot based on conditions. Sure I could make another loottable and assign it based on the condition but spread out over hundreds of mobs doing it via Perl or Lua will simplify my life hundreds of times over.
Just a percentage of the entire loottable or, specific loot? The latter of course being a bit more involved.

$npc->RemoveItem ($itemid, <quantity>);

In the EVENT_DEATH, would accomplish that, though it (was) unreliable the last time I toyed with RemoveItem, when in EVENT_DEATH

I'm thinking setting entity variables may be helpful here, but again, I don't believe I'm grasping your goal and the requirements that goal has to be met under, entirely.
Reply With Quote