Ohmyuniverse Posted March 10, 2024 Group: Members Topic Count: 7 Topics Per Day: 0.02 Content Count: 11 Reputation: 0 Joined: 03/04/24 Last Seen: March 15, 2024 Share Posted March 10, 2024 - script Poring_Coin -1,{ OnNPCKillEvent: if ( rand( 100 ) <= 90 ) { .@item_id = F_Rand( 7539 ); getitem .@item_id,1; } end; } i have this script. but i want to make it like 0.01% drop rate but when i cahnge it to this: - script Poring_Coin -1,{ OnNPCKillEvent: if ( rand( 100 ) <= 0.01 ) { .@item_id = F_Rand( 7539 ); getitem .@item_id,1; } end; } i get this error: Quote Link to comment Share on other sites More sharing options...
1 Racaae Posted March 10, 2024 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 212 Reputation: 94 Joined: 06/02/12 Last Seen: 8 hours ago Share Posted March 10, 2024 Hi. Change 100 to 10000, and 0.01 to 1. You can't use decimal numbers in scripting. - script Poring_Coin -1,{ OnNPCKillEvent: if ( rand( 10000 ) <= 1 ) { .@item_id = F_Rand( 7539 ); getitem .@item_id,1; } end; } 10000 = 100 % 1000 = 10 % 100 = 1 % 10 = 0.1 % 1 = 0.01 % 1 Quote Link to comment Share on other sites More sharing options...
Question
Ohmyuniverse
- script Poring_Coin -1,{ OnNPCKillEvent: if ( rand( 100 ) <= 90 ) { .@item_id = F_Rand( 7539 ); getitem .@item_id,1; } end; }
i have this script. but i want to make it like 0.01% drop rate
but when i cahnge it to this:
i get this error:
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.