Azarth Posted August 7, 2018 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 26 Reputation: 0 Joined: 05/28/14 Last Seen: June 8, 2019 Share 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 Link to comment Share on other sites More sharing options...
0 Alayne Posted August 9, 2018 Group: Members Topic Count: 54 Topics Per Day: 0.01 Content Count: 342 Reputation: 170 Joined: 02/25/12 Last Seen: January 24, 2022 Share 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 Link to comment Share on other sites More sharing options...
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 ?
Link to comment
Share on other sites
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.