Latest topics
» Help with trigger_usescript
Thu Sep 22, 2016 8:16 am by flanagon

» New Lugormod U# (Windows + Linux)
Thu Sep 22, 2016 7:03 am by Ufo

» Single Round Team Quest
Thu Jul 23, 2015 10:39 pm by agent6141

» iobject terminal
Thu Sep 25, 2014 2:39 pm by flanagon

» Usefull Downloads
Thu Aug 07, 2014 12:35 am by Kimmeh

» Television
Thu Jan 09, 2014 2:25 am by Mr. Swister

» Lugormod U# on server
Wed Jan 08, 2014 11:08 pm by Shadow

» Teleporter with effects
Thu Jan 02, 2014 5:51 am by Pierry

» Some possibly useful addons
Thu Jan 02, 2014 5:50 am by Pierry


Casino Game - Wheel of Fortune

View previous topic View next topic Go down

Casino Game - Wheel of Fortune

Post by Zkyo on Wed Jul 28, 2010 2:14 pm

This is a slightly more complicated game. Basically, you bet some credits, and choose one of 6 options. A wheel will spin, and if it lands on the one you chose, you win 4x what you bet.

The Terminal to bet. Will give you 6 options: Blue, Green, Red, Yellow, Pink, and White
Code:
/place lmd_terminal 0 model,map_objects/imperial/con1,spawnflags,2,message,Wheel of Fortune,cmd,Blue,cmd2,Green,cmd3,Red,cmd4,Yellow,cmd5,Pink,cmd,White,target,wheel_1.target2.wheel_2,target3,wheel_3,target4,wheel_4,target5,wheel_5,target6,wheel_6,targetname,wheel_button

The target_credits for betting. You need to have all 6 so that they can target the wheel system, so that people can not bet if they have less than 100 Cr.
Code:
/place target_credits * targetname,wheel_1,count,-100,target,wheel_1a
/place target_credits * targetname,wheel_2,count,-100,target,wheel_2a
/place target_credits * targetname,wheel_3,count,-100,target,wheel_3a
/place target_credits * targetname,wheel_4,count,-100,target,wheel_4a
/place target_credits * targetname,wheel_5,count,-100,target,wheel_5a
/place target_credits * targetname,wheel_6,count,-100,target,wheel_6a

The wheel model. This is optional, i just prefer to have an actual wheel spinning when the game is played. I use a rotating scepter, with the factory/f_gen model rotated so the round top portion is poking through the wall.
Code:
/place misc_model_breakable 0 model,map_objects/factory/f_gen,spawnflags,1,angles,90 0 0,modelscale,1.5
/place lmd_mover 0 model,map_objects/mp/mp_scepter,spawnflags,1,onadelta,0 0 180,onaduration,1000,onatype,2,targetname,wheel_model

Note: Adjust the onadelta key to whatever speed/angle fits where you chose

Crystals placed around the wheel. These represent the 6 options on the terminal. To get certain colors, you have to mix crystals. Do this by placing the colors, and nudging them to the same origin. As long as the crystals are not remapped, the colors will be correct.
Code:
/place misc_model_breakable 0 model,map_objects/mp/crystal_blue,spawnflags,1
/place misc_model_breakable 0 model,map_objects/mp/crystal_red,spawnflags,1
/place misc_model_breakable 0 model,map_objects/mp/crystal_green,spawnflags,1

Yellow: Green + Red
Pink: Red + Blue
White: Red + Blue + Green

The system to choose a random option
Code:
/place target_delay * targetname,wheel_wait,target,wheel_random,wait.3
/place target_random * targetname,wheel_random,target,wheel_random2
/place target_relay * targetname,wheel_random2,target,wheel_prize1
/place target_relay * targetname,wheel_random2,target,wheel_prize2
/place target_relay * targetname,wheel_random2,target,wheel_prize3
/place target_relay * targetname,wheel_random2,target,wheel_prize4
/place target_relay * targetname,wheel_random2,target,wheel_prize5
/place target_relay * targetname,wheel_random2,target,wheel_prize6

/place target_relay * targetname,wheel_1a,target,wheel_wait
/place target_relay * targetname,wheel_2a,target,wheel_wait
/place target_relay * targetname,wheel_3a,target,wheel_wait
/place target_relay * targetname,wheel_4a,target,wheel_wait
/place target_relay * targetname,wheel_5a,target,wheel_wait
/place target_relay * targetname,wheel_6a,target,wheel_wait

These activate the prize for the option you choose
Code:
/place target_activate * targetname,wheel_1a,target,wheel_prize1a
/place target_activate * targetname,wheel_2a,target,wheel_prize2a
/place target_activate * targetname,wheel_3a,target,wheel_prize3a
/place target_activate * targetname,wheel_4a,target,wheel_prize4a
/place target_activate * targetname,wheel_5a,target,wheel_prize5a
/place target_activate * targetname,wheel_6a,target,wheel_prize6a

Messages and delays for the prizes. These always stay online. The actual prizes are what are enabled/disabled. These are online so that the message will be displayed even if the wheel does not land on the one you chose.
Code:
/place target_delay * targetname,wheel_prize1,target,wheel_prize1a,wait.0.5
/place target_delay * targetname,wheel_prize2,target,wheel_prize2a,wait.0.5
/place target_delay * targetname,wheel_prize3,target,wheel_prize3a,wait.0.5
/place target_delay * targetname,wheel_prize4,target,wheel_prize4a,wait.0.5
/place target_delay * targetname,wheel_prize5,target,wheel_prize5a,wait.0.5
/place target_delay * targetname,wheel_prize6,target,wheel_prize6a,wait.0.5

/place target_print * targetname,wheel_prize1,spawnflags,20,message,^5The wheel landed on ^4Blue
/place target_print * targetname,wheel_prize2,spawnflags,20,message,^5The wheel landed on ^3Green
/place target_print * targetname,wheel_prize3,spawnflags,20,message,^5The wheel landed on ^1Red
/place target_print * targetname,wheel_prize4,spawnflags,20,message,^5The wheel landed on ^2Yellow
/place target_print * targetname,wheel_prize5,spawnflags,20,message,^5The wheel landed on ^6Pink
/place target_print * targetname,wheel_prize6,spawnflags,20,message,^5The wheel landed on ^7White

The Prizes
Code:
/place target_relay * targetname,wheel_prize1a,target,wheel_cr
/place target_relay * targetname,wheel_prize2a,target,wheel_cr
/place target_relay * targetname,wheel_prize3a,target,wheel_cr
/place target_relay * targetname,wheel_prize4a,target,wheel_cr
/place target_relay * targetname,wheel_prize5a,target,wheel_cr
/place target_relay * targetname,wheel_prize6a,target,wheel_cr

/place target_print * targetname,wheel_cr,spawnflags,20,message,^4Congratulations! You win 400 Cr!
/place target_credits * targetname,wheel_cr,count,400

Delay to deactivate the prizes again
Code:
/place target_delay * targetname,wheel_random,target,wheel_done,wait,2

/place target_deactivate * targetname,wheel_done,target,wheel_prize1a
/place target_deactivate * targetname,wheel_done,target,wheel_prize2a
/place target_deactivate * targetname,wheel_done,target,wheel_prize3a
/place target_deactivate * targetname,wheel_done,target,wheel_prize4a
/place target_deactivate * targetname,wheel_done,target,wheel_prize5a
/place target_deactivate * targetname,wheel_done,target,wheel_prize6a

Activate/Deactivate for the button
Code:
/place target_deactivate * targetname,wheel_wait,target,wheel_button
/place target_activate * targetname,wheel_done,target,wheel_button

Relays to make the wheel turn. One is also needed to stop it from moving when the map starts. Also, it disables all the prizes at the map start.
Code:
/place target_relay * targetname,wheel_wait,target,wheel_model
/place target_relay * targetname,wheel_random,target,wheel_model
/place target_relay * targetname,initial_entity,target,wheel_model,target2,wheel_done



Note: Since this system seems really complicated, i have made a small diagram:

Zkyo
Admin
Admin

Posts : 384
Join date : 2010-03-29
Age : 23
Location : Grand Rapids, Michigan, USA

View user profile http://lugorhelp.forumotion.com

Back to top Go down

Re: Casino Game - Wheel of Fortune

Post by Prince on Thu Jul 29, 2010 4:32 am

This Seems Awsome, i will test it when i get back home

Prince
New User
New User

Posts : 19
Join date : 2010-05-16
Age : 22

View user profile

Back to top Go down

Re: Casino Game - Wheel of Fortune

Post by Vandroiy on Sun Nov 14, 2010 2:58 am

It's an awesome idea! ;D Thanks

Vandroiy
New User
New User

Posts : 10
Join date : 2010-11-13
Age : 24
Location : Hungary

View user profile

Back to top Go down

Re: Casino Game - Wheel of Fortune

Post by Pierry on Tue Jan 11, 2011 8:30 am

The scepter model is wrong
Code:
/mp/mp_scepter

Fixed

Pierry
Admin
Admin

Posts : 154
Join date : 2010-04-26
Age : 24
Location : Cybertron

View user profile

Back to top Go down

Re: Casino Game - Wheel of Fortune

Post by Pierry on Tue Jan 11, 2011 11:49 am

Also fix it please I pointed that targets are messy.

Pierry
Admin
Admin

Posts : 154
Join date : 2010-04-26
Age : 24
Location : Cybertron

View user profile

Back to top Go down

Re: Casino Game - Wheel of Fortune

Post by KHax on Sun Jan 30, 2011 7:28 pm

fixed some codes

Code:
/place lmd_terminal 0 model,map_objects/imperial/con1,spawnflags,2,message,Wheel of Fortune,cmd,Blue,cmd2,Green,cmd3,Red,cmd4,Yellow,cmd5,Pink,cmd6,White,target,wheel_1,target2,wheel_2,target3,wheel_3,target4,wheel_4,target5,wheel_5,target6,wheel_6,targetname,wheel_button

Code:
/place target_delay * targetname,wheel_wait,target,wheel_random,wait,3

I edited the f_gen to be a lmd_door and added 6 more scepters inside it as lmd_doors so that it would look like the scepter stopped at one of the chrystals
i'll put codes tommorow

KHax
Standard Member
Standard Member

Posts : 21
Join date : 2010-12-29
Age : 23
Location : Unknown

View user profile

Back to top Go down

Re: Casino Game - Wheel of Fortune

Post by KHax on Mon Jan 31, 2011 7:58 am

k here are the codes
Code:
/place lmd_door 0 model,map_objects/factory/f_gen,modelscale,1.5,movement,10 0 0,targetname,wheel_random,

and the arrows that point at the resulting crystal must have same origin and must be placed 5 units inside the f_gen

Code:
/place lmd_door 0 model,map_objects/mp/mp_scepter,modelscale,0.7,movement,20 0 0,targetname,wheel_prize1,speed,110,
/place lmd_door 0 model,map_objects/mp/mp_scepter,modelscale,0.7,movement,20 0 0,targetname,wheel_prize2,speed,110,angles,0 0 60,
/place lmd_door 0 model,map_objects/mp/mp_scepter,modelscale,0.7,movement,20 0 0,targetname,wheel_prize3,speed,110,,angles,0 0 120,
/place lmd_door 0 model,map_objects/mp/mp_scepter,modelscale,0.7,movement,20 0 0,targetname,wheel_prize4,speed,110,angles,0 0 180,
/place lmd_door 0 model,map_objects/mp/mp_scepter,modelscale,0.7,movement,20 0 0,targetname,wheel_prize5,speed,110,angles,0 0 240,
/place lmd_door 0 model,map_objects/mp/mp_scepter,modelscale,0.7,movement,20 0 0,targetname,wheel_prize6,speed,110,angles,0 0 300,

edit the movements and speed as u desire
if you need help send me a PM on this site

KHax
Standard Member
Standard Member

Posts : 21
Join date : 2010-12-29
Age : 23
Location : Unknown

View user profile

Back to top Go down

Re: Casino Game - Wheel of Fortune

Post by Sponsored content Today at 1:13 pm


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum