Azarth Posted August 7, 2018 Posted August 7, 2018 hi im using this script as base : - script Bronze_Coin -1,{ OnNPCKillEvent: if ( rand( 100 ) <= 90 ) { .@item_id = F_Rand( 7539 ); getitem .@item_id,1; } end; } if i put 1 at 90 will be 1% right? how i make it to be 0,01 or 0,05 or 0,10 ? Quote
0 Alayne Posted August 9, 2018 Posted August 9, 2018 You need to change the range used for random. So this if ( rand( 100 ) <= 90 ) { Needs to become this if ( rand( 1000 ) <= 1 ) { //0.1% or if ( rand( 10000 ) <= 1 ) { //0.001% Quote
Question
Azarth
hi im using this script as base :
- script Bronze_Coin -1,{ OnNPCKillEvent: if ( rand( 100 ) <= 90 ) { .@item_id = F_Rand( 7539 ); getitem .@item_id,1; } end; }
if i put 1 at 90 will be 1% right? how i make it to be 0,01 or 0,05 or 0,10 ?
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.