Doodles’s Demos
RPGMXP/RPGMVX/RGSS/RGSS2 Resources

Create A Lotery System

Lottery System

For VX:

In the database, Common Events,
Create an event called Lottery
add this,

1)Control Variables > Lotery Random No. Minimum 1 Maximum 20
2)Conditional Branch Variable Lotery equal to 7
3)Inside Conditional Branch > Show text: You won! \o/

4)Inside Conditional Branch > Control Variables > Lotery > set > 0
5)Inside Conditional Branch > Change gold > Add 10000


it will be like this:

@>Control Variables: [0001]Lotery = Random No. (1...20)
@>Conditional Branch: Variable [0001]Lotery == 7
@>Text: -,-, Normal, Bottom
:             : You Won! \o/
@>Control Variables: [0001] Lotery = 0
@>Change Gold: + 10000
@>
:             : Else
@>
:             :  Branch End
@>

Then make a item, and change

1)Scope > None
2)Variance > 0
3)Common Event > Lottery
4)Ocasion > Only From the Menu

For XP:

In the database, Common Events,
Create an event called Lottery
add this,

1)Control Variables > Lotery Random No. Minimum 1 Maximum 20
2)Conditional Branch Variable Lotery equal to 7
3)Inside Conditional Branch > Show text: You won! \o/
4)Inside Conditional Branch > Control Variables > Lotery > set > 0
5)Inside Conditional Branch > Change gold > Add 10000

it will become like this:

@>Control Variables: [0001]Lotery = Random No. (1...20)
@>Conditional Branch: Variable [0001]Lotery == 7
 @>Text: You Won! \o/
 @>Control Variables: [0001] Lotery = 0
 @>Change Gold: + 10000
@>
 :             : Else
@>
 :             :  Branch End
@>

then go to items, create a new one and change this:

1)Ocasion > Only From the Menu
2)Common Event > Lotery
3)Hit Rate > 0

Demos:


For VX

For XP

No Responses Yet to “Create A Lotery System”

Leave a Reply