This is, in a word, epic. It's an event-ed version of the old coin exchange in the original Pokemon games (you know, $500 for 10 coins, blow them all on the slots and win nothing? ) , and it's difficult. First step is to C/P this into your Game Interpreter script section, to fix the math used for event variables: http://www.rpgmakervx.com/variables-fix
Next, you will create at least 5 items, events, and variables (which see a lot of use) and some other random junk, all to make it work. And, as usual, I don't have a demo that you can just pull the stuff from. Without further complaining, let's begin:
items you need
Bonus coins - scope: none, occasion: never price: I put 200 Doll #1 (at least) - scope: none, occasion: never consume: NO ->these are what you purchase in this case, but can also be weapons, items, etc. I use the dolls because they represent hidden/special characters that you can add to your party. coin pouch - again, scope: none, occasion: never, consume: no -> you need this to carry your coins in, like the Pokemon game house. Kinda pointless, if you ask me. Arcade ticket - (same conditions as above, but consume=yes) Ticket box - the ticket equivallent of the coin pouch. Again, kinda pointless
shop
The usual shop event, except that they only sell the bonus coins (at the indicated price) and you can't sell anything to them. You can start off with a condition branch that checks if you have the coin pouch
ticket bank
This is where you store all of the tickets you hope to win, because the game only lets you carry 99 of them condition branch=if ticket box is in inventory (if not, they tell you off) show choices: remove all tickets, keep tickets, trade for cash when remove all tickets control variables: tickets= 1 (or 0, which may give you an error. This resets it from a previous change) control variables: tickets = arcade ticket in inventory change items arcade ticket, - (minus/decrease) variable tickets control variables: ticket bank+ variable tickets text: Tickets in ticket bank \v[X] ->the X represents whatever variable number the ticket box is, and shows it in the text When keep tickets (nothing. It just exits) When trade for cash control variables tickets = 1 control variables tickets = arcade tickets in inventory change items arcade tickets (decrease) variable tickets control variables * (multiply by slightly less than what you paid for them, i.e if they cost $3, you cash them in for $2. Yay Capitalism~! ) change gold + (increase) variable tickets
slot machine
BTW, I don't endorse gambling. I just make a lot of events about it. show choices: play, leave when play control variables bet = 0 text: How much will you bet? input number: bet, 2 digits (since the max. is 99 ) change items bonus coins - (decrease) variable bet (thanks for your money! ) control variables X - random number 1-7 control variables Y - random number 1-7 control variables Z - random number 1-7 text [ \v[X] ] [ \v[Y] ] [ \v[Z] ] -> if written correctly, this displays the number results in 3 brackets in the text Call common event: results/rules -> this common event represents the rules, which is if you get, say, two 7's in a row, you win 3 tickets for every 1 coin that you bet. If that's confusing, see below
rules/results
these are the outcomes for your slot game above. This is the formula I used for pairs (to make it a "flush" , just add the Z variable condition branch underneath) :
condition branch variable X = 1 >condition branch variable Y =1 -> i.e if the first two numbers are the same, do the following) control variables bet (multiply by) 3 -> 3 is the number of tickets you win per coin that you bet. 1 coin = 3 tickets, 2 = 6, etc change items arcade ticket + variable bet ->this is where the 3 times your coin bet comes into play, and when it finally makes sense
you'll have to make one of these for number 1 to 7, and then another 7 for the 3 in a row
buy stuff
finally, I get to buy something.
label: start control variables tickets = arcade ticket in inventory show choices: purchase (whatever, we'll say character) , exit >when purchase text: purchase which character? tickets in box: \v[the ticket variable number] tickets in bank \v[the ticket bank variable number] show choices: (list 2 characters and their prices) , more (to show more characters and repeat this process), return >when (the 1st character) show choices: remove from box, remove from bank (cash or credit, basically) when remove from box condition branch variable tickets > (greater than the price, to check if you have enough) change items: doll #1 (you trade it for your new character) control variables tickets - (minus the price) change items: arcade tickets (minus the price, again)
>else: text you don't have enough tickets in your box \v (ticket bank number) branch end when remove from bank (same deal, but change the variables to remove it from your bank, instead of your box) when return: jump to label: start
add new member
A new party member? I wonder who it'll be?
label: main show choices: doll 1, 2 , 3 , more when doll 1 (repeat for each) condition branch doll 1 is in invetory (do you really have it? ) Text: (what it is) show choices: add to party, remove from party, return to main when change: add to party: add (that character) when remove from party change party: remove (that same character) when return to main jump to label: main
I made another game that you can get tickets from, which I'll post later. Or you can use your own mini-games.
This post has been edited by Alt_Jack: May 14 2011, 01:15 PM