Gw Temp

Menu

Tutorial - 'Simple Lotto System' by Zuwiki

An item about RPGMaker 2000 posted on

Blurb

A simple lottery tutorial that uses random numbers to implement a fun gambling game.

Body

Hey! This is my first tut, so criticism is appreciated. In this tutorial I will try to teach you how to make a simple Lotto system in your game. All the knowledge you really need is a basic knowledge of variable and fork conditions. Sidenotes will be between { and }

You will need:
variables: 3 (lotto bet, lotto ticket, lotto drawing)
events: 1 (Jack)
common events: 1 lotto

Step 1: common event: lotto & variables
Make a common event called lotto. This is called by jack and is the heart and soul of the lotto system. It's coding should look like this

<>Variable: [xxxx:lotto drawing] Set, Random 1*7 {This sets the lotto drawing to a random number between 1 and 7}

<>Message: How much do you want to bet?
<>Input number: 3Col.[xxxx:lotto bet] {this will have the player put a 3 digit input which will be how much
money they bet and will be stored in the variable
lotto bet}

<>Change Money: OwnMoney.V[xxxx:lotto bet]Decrem {This
Decreases the players money held by how much they
input to bet}

<>change Variable: [xxxx:lotto ticket] Set, Random 1*7
{This sets the lotto ticket to a random number between
1 and 7}

<>Message: Your ticket is \v[xxxx:lotto ticket]
<>Fork Condition: Variable[xxxx:lotto drawing] = [xxxx:
lotto ticket] {If the lotto drawing and lotto ticket
are the same, the following happens}

<>Message: And the number is \v[xxxx:lotto drawing]! You win!
<>Change Variable: [xxxx:lotto bet] * 4 {This multiplies
their bet by 4}

<>Change money: OwnMoney [xxxx:lotto bet]increase {This gives the player what they bet times 4}

Else
<>Message: And the number is \v[xxxx:lotto drawing]

Step 2: event: Jack
Make an event, and call him Jack, or some name... He will be the lotto director that you talk to to play lotto. Make him look like a gamble, if you can, and put him in a bar or inn. His coding should look like this:

<>Message: Hi I'm Jack. Would you like to play some lotto?
<>Show Choices: Yes/No
:[Yes] Case
<>Message: All right then!
<>Call event: lotto
:[No] Case
<>Message: Fine don't win any money
:End Case

That's about all! Have fun. If you have any complaints, suggestions or anything at all, my email is zuwiki@gawab.com! Remeber, criticism is welcome!