View Single Post
  #11  
Old 11-21-2020, 05:14 PM
Xirtnil
Fire Beetle
 
Join Date: Oct 2010
Posts: 3
Default

This still seems to work.

Code:
sub EVENT_SPAWN {

   $roll = int(rand(100)) + 1;
   

   $roll_chance = $roll;
   $roll2_chance = $roll;
   if($roll >= 50)
   {
        my $itemid = ( int rand 95000 ) + 1001;
		quest::shout("I rolled a $roll have an extra item at $roll_chance percent. Number 1 statement");

        $npc->AddItem($itemid);
        
      
		if($roll >= 88 && $mlevel >= 51)
		{
		my $itemid2 = ( int rand 95000 ) + 1001;
		quest::shout("I have rolled higher than 85 an extra item at $roll2_chance percent chance. Number 2 statement");

		$npc->AddItem($itemid2);
		
		}
	}
	
}
Reply With Quote