authors3.qsrc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # authors3
  2. *clr & cla
  3. minut += 10
  4. menu_off = 1
  5. gs 'stat'
  6. betAmount = 10
  7. slotsJackpot = betAmount * 20000
  8. '<center><img <<$set_imgh>> src="images/locations/city/industrial/casino/avt.jpg"></center>'
  9. 'Rules of the game are very simple: feed a <<betAmount>> <b>₽</b> coin into the machine and pull the lever. There are multiple winning combinations, but everyone here has their eyes on the <<slotsJackpot>> <b>₽</b> jackpot.'
  10. act 'Go back to the main hall':gt 'igravt'
  11. act 'Pull the lever':
  12. if money >= betAmount:
  13. clr
  14. money -= betAmount
  15. slotsRand = rand(1, 100000)
  16. if slotsRand > 99990:
  17. winnings = slotsJackpot
  18. msg 'Jackpot! What are the odds!?'
  19. elseif slotsRand >= 99900:
  20. winnings = betAmount * 1500
  21. elseif slotsRand >= 99000:
  22. winnings = betAmount * 100
  23. elseif slotsRand >= 90000:
  24. winnings = betAmount * 5
  25. elseif slotsRand >= 66667:
  26. winnings = betAmount * 2
  27. else
  28. winnings = 0
  29. end
  30. if winnings > 0:
  31. money += winnings
  32. msg 'You have won <<winnings>> <b>₽</b>.'
  33. else
  34. msg 'Alas, you lose. Try again?'
  35. end
  36. gt 'authors3'
  37. else
  38. msg 'You don''t have enough money to play. Turns out there''s no such thing as a free lunch, and you need money for a chance to win more money. Life is so unfair.'
  39. gt 'authors3'
  40. end
  41. killvar 'slotsRand'
  42. killvar 'winnings'
  43. end
  44. --- authors3 ---------------------------------