View Single Post
  #5  
Old 07-03-2008, 01:05 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

You could use a quest to add loot to the loot table, which is only temporary, then on the NPC's death, define a Quest Global to prevent it from dropping again. Since quests can be reloaded without having to reboot the server, it allows you to do it pretty much on the fly.

Here would be an example:

Code:
sub EVENT_SPAWN {
	if (!$scavenger_hunt_item_1) {
		# Adds 1 of item # 12345 to the loot table temporarily unless someone already killed this mob
		quest::addloot(12345, 1);
	}
}

sub EVENT_DEATH {
	if (!$scavenger_hunt_item_1) {
		# Sets a global so the mob knows he's already been killed. Will clear after 1 day.
		quest::setglobal("scavenger_hunt_item_1", 1, 0, D1);
	}
}
Hope this helps.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote