Advertisement
demongts1998

Untitled

May 15th, 2021
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.40 KB | None | 0 0
  1. local component = require("component")
  2. local sides = require("sides")
  3. local chest_bet = component.proxy("*") --- сундук
  4. local transer = component.proxy("*") ---
  5. local rs = component.redstone
  6. local rsblock = component.proxy("*")
  7. local transer_lost = component.proxy("*")
  8.  
  9. local bet = 2
  10. local toploot = 0
  11. local viv = 0
  12. local ramp_loot = 0
  13.  
  14. while true do
  15. local count_slot_nil_first = chest_bet.getStackInSlot(1)
  16. if (count_slot_nil_first~=nil) then
  17. local count_slot_lost_nil = chest_bet.getStackInSlot(1)
  18. if (count_slot_lost_nil~=nil) then
  19. local type_block_lost = chest_bet.getStackInSlot(1).display_name
  20. local count_block_lost = chest_bet.getStackInSlot(1).qty
  21. if ((count_block_lost==1) and (type_block_lost~="Money")) then
  22. transer_lost.transferItem(sides.bottom,sides.top,1,1,1)
  23. print("transer:ready")
  24. end
  25. end
  26. local count_slot_nil = chest_bet.getStackInSlot(1)
  27. if (count_slot_nil~=nil) then
  28. local type_block = chest_bet.getStackInSlot(1).display_name
  29. local count_block = chest_bet.getStackInSlot(1).qty
  30. if (((type_block=="Block of Copper") and (count_block==2)) or ((type_block=="Block of Iron") and (count_block==2)) or ((type_block=="Money") and (count_block==1))) then
  31. local chance = math.random(0,1000)
  32. if ((chance == 0) and (ramp_loot>=25000)) then
  33. transer.transferItem(sides.back,sides.front,2,1,1)
  34. rs.setOutput(sides.front,15)
  35. rs.setOutput(sides.front,0)
  36. print("Drop:Rampage. Top: Update")
  37. toploot = 0
  38. viv = 0
  39. ramp_loot = 0
  40. os.sleep(0.5)
  41. end
  42. if (chance>=1) and (chance<=300) and (toploot>=8500) then
  43. transer.transferItem(sides.back,sides.front,2,1,1)
  44. rsblock.setOutput(sides.left,15)
  45. rsblock.setOutput(sides.left,0)
  46. print("Drop:Top, Top:Update")
  47. toploot = 0
  48. viv = 0
  49. ramp_loot = ramp_loot + bet
  50. os.sleep(0.1)
  51. end
  52. if (chance>=2) and (chance<=700) then
  53. local choice = math.random(0,100)
  54. if (choice<=60) then
  55. transer.transferItem(sides.back,sides.front,2,1,1)
  56. rsblock.setOutput(sides.bottom,15)
  57. rsblock.setOutput(sides.bottom,0)
  58. toploot = toploot + bet
  59. viv = viv + bet
  60. ramp_loot = ramp_loot + bet
  61. print("Drop:Common,Top: " .. toploot)
  62. os.sleep(0.1)
  63. end
  64. if (choice>=61) then
  65. transer.transferItem(sides.back,sides.front,2,1,1)
  66. rsblock.setOutput(sides.front,15)
  67. rsblock.setOutput(sides.front,0)
  68. toploot = toploot + bet
  69. viv = viv + bet
  70. ramp_loot = ramp_loot + bet
  71. print("Drop:Common+,Top: " .. toploot)
  72. os.sleep(0.1)
  73. end
  74. end
  75. if (chance>=701) and (chance<=1000) then
  76. local choice = math.random(0,100)
  77. if (choice<=65) then
  78. transer.transferItem(sides.back,sides.front,2,1,1)
  79. rsblock.setOutput(sides.right,15)
  80. rsblock.setOutput(sides.right,0)
  81. toploot = toploot + bet
  82. viv = viv + bet
  83. ramp_loot = ramp_loot + bet
  84. print("Drop:Rare,Top: " .. toploot)
  85. os.sleep(0.1)
  86. end
  87. if (choice>=66) and (viv==550) then
  88. transer.transferItem(sides.back,sides.front,2,1,1)
  89. rsblock.setOutput(sides.top,15)
  90. rsblock.setOutput(sides.top,0)
  91. toploot = toploot + bet
  92. viv = 0
  93. ramp_loot = ramp_loot + bet
  94. print("Drop:Rare+,Top: " .. toploot)
  95. os.sleep(0.1)
  96. end
  97. end
  98. end
  99. end
  100. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement