Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- function wait()
- rednet.send(ID, "SmartShop V.3 - Program: 1 - Cost: 16 credits")
- end
- function action()
- turtle.suck()
- if turtle.compareTo(16) == true then
- if turtle.getItemCount(1) == 16 then
- turtle.dropDown()
- rs.setBundledOutput("back", colors.white)
- sleep(1)
- rs.setBundledOutput("back", 0)
- rednet.send(ID, "You paid the right amount!")
- elseif turtle.getItemCount(1) > 16 then
- turtle.transferTo(2,16)
- turtle.select(2)
- turtle.dropDown()
- turtle.select(1)
- turtle.dropUp()
- rs.setBundledOutput("back", colors.white)
- sleep(1)
- rs.setBundledOutput("back", 0)
- elseif turtle.getItemCount(1) < 16 then
- rednet.send(ID, "You did not Pay enough.. I've send your stuff back up!")
- end
- end
- function put()
- wait()
- if rs.getBundledInput("left", colors.white) == true then
- action()
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement