Pokémon Omega Ruby and Alpha Sapphire are coming this November!
Check BNN and Bulbanews for up-to-date Pokémon news and discuss it on the forums or in our IRC channel.
The Bulbapedia mobile skin is currently in open alpha. If you run into any issues using the skin, please report them on the forums.

Talk:Vending machine

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to: navigation, search

What's the chance...

...of a vending machine dropping a free beverage? As in, does a vending machine have a 5% chance of giving the player an extra beverage? 10%? 1 in 8192? It would be good information to put in the article, wouldn't it? - unsigned comment from Missingno. Master (talkcontribs) 23:53, 29 July 2011 (UTC)

...anybody? - unsigned comment from Missingno. Master (talkcontribs) 13:56, 2 August 2011 (UTC)
I was also curious about this, so I did a bit of testing into this in Platinum. I bought ONE THOUSAND drinks - to make sure the results were quite accurate - and recorded how many free drinks were obtained.
The results were kind of strange though... the first 500 times yielded 14 free drinks; but the next 500 only 3. So by applying basic mathematical probability to circumstantial results, I would say the average chance is... maybe about 2%?
Anyway! To answer the question, I found it to be about 2% in Platinum... or perhaps between 2-3%... less than 5% anyway! ***shiningSteelix*** 15:40, 5 August 2011 (UTC)
(To essentially futureproof this... it's 3.125% = 100/32). B2W2 & BW just do rand(32) and if 0 give an extra.
Just fyi, XD/Colosseum do not have the "bonus" drink feature. I set a breakpoint on the RNG and got no 'calls' when buying a drink. —Kaphotics (talk) 06:55, 18 July 2013 (UTC)

Turns out in HGSS the chance is 1:64 (1.5625%)[1], not 1:32. Article can be updated. --Kaphotics (talk) 00:13, 22 January 2014 (UTC)

Are HGSS the only ones with a 1/64 chance? Or is it every game from HGSS on? --It's Funktastic~!話してください 00:28, 22 January 2014 (UTC)
BW is 1/32, HGSS is 1/64. I just tested Platinum and Emerald and they both use rand%64 (1/64 chance). BW/B2W2 are the first games with double the odds (@ 1/32).
So, Gen3 = 1/64 // Gen4 = 1/64 // Gen5 = 1/32. Kaphotics (talk) 00:15, 23 January 2014 (UTC)
All right. I added it. Thanks! --It's Funktastic~!話してください 00:20, 23 January 2014 (UTC)

Buying lemonade with less than $350?

I was hacking on the Gen I pokemon code, and realized that the code only checks the player's money against $200, thus it allows me to buy lemonade with an amont of money >= $200 but < $350. The game does know to handle underflow, so I end up using all my money. However this still seems like a programming oversight instead of an intended feature. (Verified on a simulator) Bbbbbbbbba (talk) 06:47, 26 February 2014 (UTC)