Random item number generator
Using the global_npc.pl file with the subroutine EVENT_SPAWN and attempting to generate a random loot id number. Has anyone run into an issue where srand() is implicitly called to seed rand() and is causing a limited of possible numbers?
I am seeing issues of numbers being generated multiple times while others are never. rand(100000) for instance. I just do not feel 94823 should be generated 20 times, while 94823 never is generated. It looks like only a fraction of the numbers are being chosen , while a large amount are being repeated. my $addid = ( int rand 100000 ) + 1001; Thanks for your time. |
All times are GMT -4. The time now is 01:07 PM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.