The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades.
×
- 0
Slot Machine probability
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
Genesis
Hello,
I'm trying to create a slot machine NPC, where players pay a fee to play. They have a x chance of winning y zeny. Does anyone have a snippet of a script illustrating a zeny slot machine's formula for making sure the house always wins?
As far as I can remember from my probability classes is the following formula:
EV = Chance_of_winning * (winnings - bet) + (chance of winning * -bet)
However, I'd like to be able to account for multiple instances of winning (not always the jackpot) but at the same time making sure the house always wins.
TLDR: I nneed a snippet of a zeny slot machine that shows the formula used to make sure the house wins, while ensuring the player gets SOME zeny back.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.