Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if fs.exists("HomeFile") then
- local file = io.open("HomeFile","r")
- line = file:read()
- file:close()
- local home = {}
- local index = 0
- for word in string.gmatch(line,"%p*%d+") do
- home[index] = word
- index = index + 1
- end
- local hx = tonumber(home[0])
- local hy = tonumber(home[1])
- local hz = tonumber(home[2])
- --Go home turtle, you're drunk
- shell.run("goto",hx,hy,hz)
- else
- print("No home located, use defineHome")
- end
Advertisement
Add Comment
Please, Sign In to add comment