Jump to content
  • 0

Success rate information for enchanter


AinsLord

Question


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

does this script means the higher the number input the lower the chance or vise versa?

if (countitem(.@costumeID) > 0 && countitem(.@stoneID) > 0) {
		delitem .@stoneID,1;
		if (rand(1,100) < 91)

coz i tried lo make it like 30 the success is like 7/10 items

just a little bit confuse thou

thanks in advance

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

On 5/25/2021 at 12:42 AM, AinsLord said:

how can i make it like 10% or 20%?

 

if (rand(100) < 10) { 10% }
if (rand(100) < 20) { 20% }

 

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   76
  • Joined:  06/13/13
  • Last Seen:  

testing random will give you random result ?

if (rand(1,100) < 91)

^ that mean 90% = 1 ~ 100 lower than 91

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

45 minutes ago, Litro Endemic said:

testing random will give you random result ?


if (rand(1,100) < 91)

^ that mean 90% = 1 ~ 100 lower than 91

ohh how can i make it like 10% or 20%?

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