• 0
Sign in to follow this  
Followers 0
garro

Help with prize machine

Question

Hello download this npc and I liked it a lot, but I would like to change two things, that instead of giving hats of 100 cash example, and that to deliver the 100 cash is quite difficult that 100% is 5% to give cash

Hello download this npc and I liked it a lot, but I would like to change two things, that instead of giving hats of 100 cash example, and that to deliver the 100 cash is quite difficult that 100% is 5% to give cash

Maquina de Premios.txt

Share this post


Link to post
Share on other sites

1 answer to this question

  • 0


// 1 / 20 chance => 5%

 

if (rand(20) == 0) {

getitem(...); // give the item

}

 

else {

// do something else

}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0