View difference between Paste ID: cmmCNhsi and 0Y7tZLh6
SHOW: | | - or go back to the newest paste.
1-
local myid = os.computerID()
1+
--[[Computer craft program for recharge station for Turtle]]--
2-
local doorList = { 11,13 } --id of the stations
2+
local myid = os.getComputerLabel()
3-
local passwordForDoor = { "notch","minecraft" } --password for each stations
3+
4
mon=peripheral.wrap("back") -- position écran
5-
mon=peripheral.wrap("bottom") - position of screen
5+
6-
print("Access Terminal") 
6+
print("Station de recharge") 
7-
rednet.open("back") -- open rednet modem
7+
rednet.open("bottom") -- open rednet modem
8
9-
print("Computer id for Access Terminal is "..tostring(myid)) --show the name of terminal and ID
9+
--[[PROGRAM]]--
10
local isValid = 0
11-
function findIndexForId(id) -- comparaison of password
11+
12-
   for i,v in ipairs(doorList) do
12+
13-
      if id == v then
13+
14-
         return i
14+
15-
      end
15+
	senderId, message, distance = rednet.receive()
16-
   end
16+
17-
   return 0
17+
	mon.scroll(1)
18-
end
18+
	mon.setCursorPos(2,6)
19
   	mon.write(message) --.. " "..timeString)
20-
--[[ for future implementation ]]--
20+