Thread: Change of Loot
View Single Post
Old 11-08-2005, 09:49 AM   #4 (permalink)
ArteGordon
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by Nataq
thx, but how can i change drop rate of this item?
just add a random number test, like

Code:
if(Utility.Random(100) < 20)
{
   PackItem( new LesserPoisonPotion() );
}
which would give you a 20% drop rate. If you changed the 20 to a 5, then you would have a 5% chance of dropping it, change it to 90 and you have a 90% chance, etc.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline   Reply With Quote