The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => VX Scripts Database => Topic started by: bulletxt on May 16, 2009, 10:37:04 PM

Title: MiniGame: Win the Lottery!
Post by: bulletxt on May 16, 2009, 10:37:04 PM
MiniGame: Win the Lottery!

Author: BulletXt (bulletxt@gmail.com)
Version: 0.1
Date: 16/05/2009
License: Gnu General Public License 3


A great minigame for your game. Player can play the lottery and win a jackpot prize! It's very simple, there are 10 balls and three of them get extracted. Player must choose and guess the three numbers that will get extracted!!

According to Probability, the chances player wins are 1 out of 120. There isn't much to say about, it's a lottery minigame!

Screenshot:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg43.imageshack.us%2Fimg43%2F7982%2Fextracting.png&hash=29c4cef0b1fbcd9702ca4d08cc22c4998735dfba)


Download Demo: here (http://www.mediafire.com/?wnxwjkndugz)
Cheers,
BulletXt


[/center]
Title: Re: MiniGame: Win the Lottery!
Post by: modern algebra on May 17, 2009, 12:58:49 AM
Neat!

Though I'm guessing the chances of winning are less than 1 / 27.

It ought to be:

Code: [Select]
(3 / 10)*(2 / 9)*(1 / 8)

Which is 6 / 720 = 1 / 120

That is, assuming you don't rig the game to give higher probability to the player.
Title: Re: MiniGame: Win the Lottery!
Post by: bulletxt on May 17, 2009, 01:17:24 AM
oops :S

of course it can't be 1 out of 27 :D I was probably sleeping while calculating that :D

Thanks for pointing it out!
Title: Re: MiniGame: Win the Lottery!
Post by: drakonz5 on November 25, 2009, 10:10:49 AM
Neat!

Though I'm guessing the chances of winning are less than 1 / 27.

It ought to be:

Code: [Select]
(3 / 10)*(2 / 9)*(1 / 8)

Which is 6 / 720 = 1 / 120

That is, assuming you don't rig the game to give higher probability to the player.

i know this is a really really old post but can someone change the script for me to make it like a 50%/100% chance they can win?i am not that good at scripting...
Title: Re: MiniGame: Win the Lottery!
Post by: dricc on November 26, 2009, 03:44:45 PM
50% of chance to win ? this is too easy , no ?

I don't agree in the statistic calculation .
You have 1 number to guess between 10 = 1/10
then 1 number to guess between 9 = 1/9
then 1 number to guess between 8 = 1/8
So the chance to win this lottery is 1/720 = 0,14% ... very difficult .

50 % . it is just one number to guess between 2 . Is that really what you want ?
Title: Re: MiniGame: Win the Lottery!
Post by: modern algebra on November 26, 2009, 07:49:54 PM
The order doesn't matter dricc, from what I understood of the game. SO it is 1 / 120, rather than 1 / 720 - still a very low chance.

But a 50% chance is silly, given the nature of the game. The only way to do so fairly would be to reduce the number of balls to 2 and have the user just choose 1. Otherwise, you'd need to invent an algorithm where the actual spot chosen doesn't matter, but it just calculates a fairly high chance you get one of the numbers chosen. But then the game just seems ridiculous.

If you want a game with a 50% chance to win, then just randomize a variable and do it with events. The purpose of having a game like this would be lost if you did it with 50% chance.