Jump to content
  • 0

monster drop %


Ohmyuniverse

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.13
  • Content Count:  11
  • Reputation:   0
  • Joined:  03/04/24
  • Last Seen:  

-	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:

image.png.ec3c56eb96901aef67c72146b4f24049.png

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  132
  • Reputation:   53
  • Joined:  06/02/12
  • Last Seen:  

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 %

  • MVP 1
Link to comment
Share on other sites

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.

×
×
  • Create New...