Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mdp = ""
- local ok = false
- local modem = peripheral.wrap("bottom")
- modem.open(42)
- while not ok do
- term.clear()
- term.setCursorPos(1,1)
- print("Demarrage/Arret :")
- mdp = read("*")
- modem.transmit(42, 42, mdp)
- event, side, sendC, replyC, message, dist = os.pullEvent()
- if event == "modem_message" then
- if side == "bottom" then
- if sendC == 42 then
- if replyC == 42 then
- print(message)
- sleep(5)
- end
- end
- end
- end
- print("Energy Cube : ",modem.callRemote("Ultimate Energy Cube_0","getStored")," / ",modem.callRemote("Ultimate Energy Cube_0","getMaxEnergy"))
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement