Advertisement
NatedogServer

Howtodoit

May 14th, 2015
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.66 KB | None | 0 0
  1. sub EVENT_SPAWN {
  2.  
  3.     my @drop_zones = ("nexus", "anguish", "commons");  #zones where this crap will drop
  4.     if( (grep { $_ eq $zonesn } @drop_zones) ) {
  5.         #usage...   (amount, chance, itemid)
  6.         #   (5, 1, 1001)  .. would drop 5x Cloth cap 100% of the time..
  7.         #   (5, 100, 1001) .. would try 5x to drop Cloth cap at a 1% chance
  8.         #   (5, 500, 1001) .. would try 5x to drop Cloth cap at a 1 / 500 chance
  9.         plugin::AddLoot(1, 400, 120026); #Upgrade stone
  10.  
  11.         #This allows arrays of items a chance to drop...
  12.         #This example is 4 items with a 1/50 chance to drop but only tries one time
  13.         my @itemlist = (1001, 1002, 1003, 1004);
  14.         plugin::AddLoot(1, 50, @itemlist);
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement