Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local sides = require("sides")
- local chest_bet = component.proxy("*") --- сундук
- local transer = component.proxy("*") ---
- local rs = component.redstone
- local rsblock = component.proxy("*")
- local transer_lost = component.proxy("*")
- local bet = 2
- local toploot = 0
- local viv = 0
- local ramp_loot = 0
- while true do
- local count_slot_nil_first = chest_bet.getStackInSlot(1)
- if (count_slot_nil_first~=nil) then
- local count_slot_lost_nil = chest_bet.getStackInSlot(1)
- if (count_slot_lost_nil~=nil) then
- local type_block_lost = chest_bet.getStackInSlot(1).display_name
- local count_block_lost = chest_bet.getStackInSlot(1).qty
- if ((count_block_lost==1) and (type_block_lost~="Money")) then
- transer_lost.transferItem(sides.bottom,sides.top,1,1,1)
- print("transer:ready")
- end
- end
- local count_slot_nil = chest_bet.getStackInSlot(1)
- if (count_slot_nil~=nil) then
- local type_block = chest_bet.getStackInSlot(1).display_name
- local count_block = chest_bet.getStackInSlot(1).qty
- 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
- local chance = math.random(0,1000)
- if ((chance == 0) and (ramp_loot>=25000)) then
- transer.transferItem(sides.back,sides.front,2,1,1)
- rs.setOutput(sides.front,15)
- rs.setOutput(sides.front,0)
- print("Drop:Rampage. Top: Update")
- toploot = 0
- viv = 0
- ramp_loot = 0
- os.sleep(0.5)
- end
- if (chance>=1) and (chance<=300) and (toploot>=8500) then
- transer.transferItem(sides.back,sides.front,2,1,1)
- rsblock.setOutput(sides.left,15)
- rsblock.setOutput(sides.left,0)
- print("Drop:Top, Top:Update")
- toploot = 0
- viv = 0
- ramp_loot = ramp_loot + bet
- os.sleep(0.1)
- end
- if (chance>=2) and (chance<=700) then
- local choice = math.random(0,100)
- if (choice<=60) then
- transer.transferItem(sides.back,sides.front,2,1,1)
- rsblock.setOutput(sides.bottom,15)
- rsblock.setOutput(sides.bottom,0)
- toploot = toploot + bet
- viv = viv + bet
- ramp_loot = ramp_loot + bet
- print("Drop:Common,Top: " .. toploot)
- os.sleep(0.1)
- end
- if (choice>=61) then
- transer.transferItem(sides.back,sides.front,2,1,1)
- rsblock.setOutput(sides.front,15)
- rsblock.setOutput(sides.front,0)
- toploot = toploot + bet
- viv = viv + bet
- ramp_loot = ramp_loot + bet
- print("Drop:Common+,Top: " .. toploot)
- os.sleep(0.1)
- end
- end
- if (chance>=701) and (chance<=1000) then
- local choice = math.random(0,100)
- if (choice<=65) then
- transer.transferItem(sides.back,sides.front,2,1,1)
- rsblock.setOutput(sides.right,15)
- rsblock.setOutput(sides.right,0)
- toploot = toploot + bet
- viv = viv + bet
- ramp_loot = ramp_loot + bet
- print("Drop:Rare,Top: " .. toploot)
- os.sleep(0.1)
- end
- if (choice>=66) and (viv==550) then
- transer.transferItem(sides.back,sides.front,2,1,1)
- rsblock.setOutput(sides.top,15)
- rsblock.setOutput(sides.top,0)
- toploot = toploot + bet
- viv = 0
- ramp_loot = ramp_loot + bet
- print("Drop:Rare+,Top: " .. toploot)
- os.sleep(0.1)
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement