Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function tclear(x,y)
- if x == nil then
- x = 1
- end
- if y == nil then
- y = 1
- end
- term.clear()
- term.setCursorPos(x,y)
- end
- function rsSend(side, art, seconds)
- if side == nil then
- side = "back"
- end
- if art == nil then
- art = "button"
- end
- if seconds == nil then
- seconds = 0.2
- end
- if art == "lever" then
- istorf = redstone.getInput(side)
- if istorf == true then
- rs.setOutput(side, false)
- else
- rs.setOutput(side, true)
- end
- else
- rs.setOutput(side, true)
- sleep(seconds)
- rs.setOutput(side, false)
- sleep(seconds)
- end
- end
- function load(name)
- local file = fs.open(name,"r")
- local data = file.readAll()
- file.close()
- return textutils.unserialize(data)
- end
- function save(table,name)
- local file = fs.open(name,"w")
- file.write(textutils.serialize(table))
- file.close()
- end
- name = read()
- save(name, "name")
- read()
- print(load("name"))
Advertisement
Add Comment
Please, Sign In to add comment