Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local coor={"","",""} --x,y,z
- local curPos= {[1]=0, [2]=0, [3]=0}
- local turtleFace=2 --1:forward, 2:right, 3:back, 4:left
- function prntScrn()
- term.clear()
- term.setCursorPos(1,1)
- print("enter turtle coordinate:")
- print("x="..coor[1])
- term.setCursorPos(10,2)
- print("y="..coor[2])
- term.setCursorPos(20,2)
- print("z="..coor[3])
- end
- function coorSet()
- prntScrn()
- for a=1,3 do
- local entry
- while true do
- if a==1 then term.setCursorPos(3,2)
- elseif a==2 then term.setCursorPos(12,2)
- elseif a==3 then term.setCursorPos(22,2)
- end
- entry=tonumber(read())
- if entry then
- break
- end
- prntScrn()
- end
- coor[a] = entry
- prntScrn()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement