Jump to content
  • 0

onnpckill support all mob drop a item 0,01


Question

Posted

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

  • 0
Posted

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%

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...