View Single Post
  #3  
Old 12-29-2016, 10:04 PM
Splose
Banned
 
Join Date: Apr 2014
Posts: 279
Default

The AddLoot plugin is the best way to do loot imo.

This is in the default.pl of one of my custom zones.. As you can see you can easily seperate it from the rest of your code and still easily be able to change your loot on the fly with a simple #reloadqst and #repop while still retaining the mobs original loot. If you aren't already familiar with it can read up on it here.

Code:
sub EVENT_SPAWN {
	if($instanceversion == 1) {
		my $SP = $npc->GetSp2();
		my @roamers = (119506,119507);
		my $StartMove = int(rand(15)) + 5;
		$nn = $npc->GetCleanName();
	if(grep( /^$SP$/i, @roamers)) {quest::settimer("roam", $StartMove);} #:: Start Yard Trash Roam Timers

#::		Loot	::#
	my @tablet = (1660);		#:: Tablet to start quest with researcher maeryn
	my @scarab_loot = (1658);
	my @scarab_rare_aug = (1659);
	my @ghoul_loot = (1661);
	my @scarecrow_loot = (1662);
	my @mummy_loot = (1663);
	my @worm_loot = (1664);
        my @t1_set = (133200..133255);        
	plugin::AddLoot(1,500,@tablet);
	if($nn=~/scarab/i) {plugin::AddLoot(1,4,@scarab_loot); plugin::AddLoot(1,5000,@scarab_rare_aug);}
	if($nn=~/ghoul/i) {plugin::AddLoot(1,4,@ghoul_loot);}
	if($nn=~/scarecrow/i) {plugin::AddLoot(1,4,@scarecrow_loot);}
	if($nn=~/mummy/i) {plugin::AddLoot(1,4,@mummy_loot);}
	if($nn=~/worm/i) {plugin::AddLoot(1,4,@worm_loot);}
	
###################	
	
	}
}
Reply With Quote