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:
1) Database > Common Events
2) Create a new one, let’s call it “Clock” make it Trigger Parallel Using a switch called “Clock”
3) Add Command > Wait > 60 Frames
4) Add Command > Control Variables > Seconds > Add > 1
5) Add Command > Conditional Branch > Variable > Seconds > Equal to > 60
6) Inside Conditional Branch > Add Command > Control Variables > Seconds > Set > 0
7) Inside Conditional Branch > Add Command > Control Variables > Minutes > Add > 1
Inside Conditional Branch > Add Command > Conditional Branch > Variable > Minutes > Equal to > 60
9) Inside Conditional Branch > Inside Conditional Branch > Add Command > Control Variables > Minutes > Set > 0
10) Inside Conditional Branch > Inside Conditional Branch > Add Command > Control Variables > Hours > Add > 1
11 ) Inside Conditional Branch > Inside Conditional Branch > Add Command > Conditional Branch > Variable > Hours > Equal to > 24
12) Inside Conditional Branch > Inside Conditional Branch > Inside Conditional Branch > Add Command > Control Variables > Hours > Set > 0
It will become like this:
13) Yet in common events, create another one named “Day/Night”, make it Trigger Parallel, Using the switch “Day/Night”
14) Add Command > Conditional Branch > Variable > Hours > Equal to > 7
15) Inside Conditional Branch > Add Command > Tint Screen > (17,17,17,0) @60 NO wait
16) Press “end” key
17) Add Command > Conditional Branch > Variables > Hours > Equal to > 12
18) Inside Conditional Branch > Add Command > Tint Screen > (34,34,34,0) @60 NO wait
19) Press “end” key
20) Add Command > Conditional Branch > Variables > Hours > Equal to > 15
21) Inside Conditional Branch > Add Command > Tint Screen > (0,0,0,0) @60 NO wait
22) Press “end” key
23) Add Command > Conditional Branch > Variables > Hours > Equal to > 18
24) Inside Conditional Branch > Add Command > Tint Screen > (0,0,0,34) @60 No wait
25) Press “end” key
26) Add Command > Conditional Branch > Variables > Hours > Equal to > 21
27) Inside Conditional Branch > Add Command > Tint Screen > (0,0,0,85) @60 NO wait
28) Press “end” key
29) Add Command > Conditional Branch > Variables > Hours > Equal to > 24
30) Inside Conditional Branch > Add Command > Tint Screen > (0,0,0,102) @60 NO wait
31) Press “end” key
32) Add Command > Conditional Branch > Variables > Hours > Equal to > 4
33) Inside Conditional Branch > Add Command > Tint Screen > (0,0,0,51) @60 NO wait
It will stay exactly like this:
34) Go to the first map of the game…
35) Create an event, set it as parallel process
36) Add Command > Control Switches > Clock > On
37) Add Command > Call Common Event > Clock
38) Apply, Ok
39) Make another event, then set it as parallel process.
40) Add Command > Control Switches > Day/Night > On
41) Add Command > Call Common Event > Day/Night > On
42) Apply, Ok
That’s all
VX Demo:
XP Demo:
Any Bug/ Sugestion?






