Advertisement
Guest User

casino

a guest
Aug 30th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.29 KB | None | 0 0
  1. -- promenne --
  2.  
  3. do
  4.   zetony = 0
  5.   vyseSazky = 0
  6.   rng1 = 0
  7.   rng2 = 0
  8.   rng3 = 0
  9.   vyhra = 0
  10.  
  11.   term.clear()
  12. end
  13.  
  14. -- vysvetleni principu hry --
  15.    
  16. do
  17.   term.setCursorPos(x/2-4, 2)
  18.   print("AUTOMATY")
  19.   textutils.slowPrint("---------------------------------------------------")
  20.   print("Pokud vam padne 3x stejne cislo, vyhravate dvojnasobek vaseho vkladu")
  21.   print("1 diamant = 1 zeton")
  22.   print("Diamanty hazejte po vyzvani do vody vedle automatu")
  23.   print("Pro pokracovani stisknete ENTER")
  24.   io.read()
  25.   term.clear()
  26. end
  27.  
  28. -- hlavni program --
  29.  
  30. while true do
  31.   term.setCursosPos(x/2-4, 2)
  32.   print("AUTOMATY")
  33.   textutils.slowPrint("---------------------------------------------------")
  34.   print("Zvolte moznost:")
  35.   print("1. Dobit zetony")
  36.   print("2. Hrat automaty")
  37.   print("3. Vybrat vyhru")
  38.   volba = io.stream()
  39.   volba = tonumber(volba)
  40.  
  41.   if volba == 1 then
  42.    
  43.     term.clear()
  44.     os.pullEvent()
  45.  
  46.     if redstone.getInput("left") == true then
  47.       zetony = zetony + 1
  48.       print("Vas pocet zetonu je: "..zetony)
  49.       sleep(1)
  50.     end
  51.    
  52.   elseif volba == 2 then
  53.     term.clear()
  54.  
  55.   else
  56.  
  57.   end
  58. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement