View Single Post
  #5  
Old 09-26-2018, 02:03 AM
Anon.GM's Avatar
Anon.GM
Fire Beetle
 
Join Date: Apr 2018
Posts: 19
Default

Here is what I'm running on Anon. I know it could be tweaked better by an expert, but this works. Just change the ids to the range of items you want for the zone.

My default.pl from the zone warrens that drops crude defiant weapons and armor. Its a modified version from this link.

http://www.eqemulator.org/forums/showthread.php?t=38286

Code:
sub EVENT_SPAWN {
  $roll = int(rand(100)) + 1;
  
  $roll_chance = $roll - 70;
  $roll2_chance = $roll - 85;
  $WPlower_limit = 50500;
  $WPupper_limit = 50519;
  $ARlower_limit = 50005;
  $ARupper_limit = 50033;
	
  if($roll >= 85)
  {
       my $itemid = int(rand($WPupper_limit-$WPlower_limit)) + $WPlower_limit;
		#quest::shout("I rolled a $roll have an extra item at $roll_chance percent. Number 1 statement");
        $npc->AddItem($itemid);
		if($roll >= 75 && $mlevel >= 15)
		{
		my $itemid2 = int(rand($ARupper_limit-$ARlower_limit)) + $ARlower_limit;
		#quest::shout("I have rolled higher than 85 an extra item at $roll2_chance percent chance. Number 2 statement");
		$npc->AddItem($itemid2);
		}
	}
	
}
__________________
email:anon.gm@protonmail.com
servers: Anon (bots) and Anon (solo)
Reply With Quote