Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI('/lib/slot_sig')
- REDSTONE_SIDE='right'
- SCREEN_SIDE='left'
- MODEM_SIDE='top'
- function sendCart()
- redstone.setOutput(REDSTONE_SIDE,true)
- sleep(1)
- redstone.setOutput(REDSTONE_SIDE,false)
- end
- function onRednet(data)
- local sender=data[1]
- local mess=data[2]
- if(mess.type == 'call') then
- sendCart()
- end
- end
- function sendCall()
- rednet.send(OTH_ID, {type="call"})
- end
- function onClick(data)
- sendCall()
- end
- function main()
- slot_sig.connectSlot('monitor_touch', onClick)
- slot_sig.connectSlot('rednet_message', onRednet)
- screen=peripheral.wrap(SCREEN_SIDE)
- screen.setCursorPos(3,3)
- screen.write("CALL CART")
- rednet.open(MODEM_SIDE)
- slot_sig.run()
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement