1
0

authors3.qsrc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # authors3
  2. clr
  3. minut += 10
  4. gs 'stat'
  5. betAmount = 10
  6. slotsJackpot = betAmount * 20000
  7. '<center><img <<$set_imgh>> src="images/locations/city/industrial/casino/avt.jpg"></center>'
  8. '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.'
  9. act 'Pull the lever':
  10. if money >= betAmount:
  11. clr
  12. money -= betAmount
  13. slotsRand = rand(1, 100000)
  14. if slotsRand > 99990:
  15. winnings = slotsJackpot
  16. msg 'Jackpot! What are the odds!?'
  17. elseif slotsRand >= 99900:
  18. winnings = betAmount * 1500
  19. elseif slotsRand >= 99000:
  20. winnings = betAmount * 100
  21. elseif slotsRand >= 90000:
  22. winnings = betAmount * 5
  23. elseif slotsRand >= 66667:
  24. winnings = betAmount * 2
  25. else
  26. winnings = 0
  27. end
  28. if winnings > 0:
  29. money += winnings
  30. msg 'You have won <<winnings>> <b>₽</b>.'
  31. else
  32. msg 'Alas, you lose. Try again?'
  33. end
  34. gt 'authors3'
  35. else
  36. 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.'
  37. gt 'authors3'
  38. end
  39. killvar 'slotsRand'
  40. killvar 'winnings'
  41. end
  42. act 'Go back to the main hall':gt 'igravt'
  43. --- authors3 ---------------------------------