Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List = {}
- Ref = 0
- MonSide = "top"
- --Append onto list
- function app(array,phrase)
- array[Ref] = phrase
- Ref = Ref + 1
- end
- function f(array)
- app(array,"turtle.forward()")
- end
- function b(array)
- app(array,"turtle.back()")
- end
- function d(array)
- app(array,"turtle.down()")
- end
- function tr(array)
- app(array,"turtle.turnRight()")
- end
- function tl(array)
- app(array,"turtle.turnLeft()")
- end
- function dig(array)
- app(array,"turtle.dig()")
- end
- function du(array)
- app(array,"turtle.digUp()")
- end
- function dd(array)
- app(array,"turtle.digDown()")
- end
- function up(array)
- app(array,"turtle.up()")
- end
- function dr(array)
- app(array,"turtle.drop()")
- end
- function su(array)
- app(array,"turtle.suck()")
- end
- function ec(array)
- app(array,"enderAPI.dumpchest()")
- end
- function placeInFile(FILE,ARRAY)
- file = fs.open("/path/"..FILE,"w")
- for i=0,Ref do
- file.writeLine(ARRAY[i])
- end
- file.close()
- end
- print("Please enter the file path and name")
- print("For your save file")
- PATH = read()
- term.clear()
- term.setCursorPos(1,1)
- print("UP = forward")
- print("DOWN = back")
- print("Left = turn left")
- print("Right = turn right")
- print("Q = dig")
- print("W = up")
- print("S = down")
- print("A = dig up")
- print("Z = dig down")
- print("E = suck")
- print("X = drop")
- print("Enter = quit")
- print("EnderAPI;")
- print("C = EnderChest")
- term.setCursorPos(16,2)
- local on = true
- while on == true do
- local event, key = os.pullEvent( "key" )
- if key == keys.w then
- up(List)
- term.write("Up")
- elseif key == keys.s then
- d(List)
- term.write("Down")
- elseif key == keys.q then
- dig(List)
- term.write("Dig")
- elseif key == keys.a then
- du(List)
- term.write("Dig Up")
- elseif key == keys.z then
- dd(List)
- term.write("Dig Down")
- elseif key == keys.left then
- tl(List)
- term.write("Turn Left")
- elseif key == keys.right then
- tr(List)
- term.write("Turn Right")
- elseif key == keys.down then
- b(List)
- term.write("Back")
- elseif key == keys.up then
- f(List)
- term.write("Forward")
- elseif key == keys.e then
- su(List)
- term.write("Suck")
- elseif key == keys.x then
- dr(List)
- term.write("Drop")
- elseif key == keys.c then
- ec(List)
- term.write("Ender Chest")
- elseif key == keys.enter then
- on = false
- end
- if Ref < 17 then
- term.setCursorPos(16,Ref+2)
- elseif Ref > 16 and Ref < 34 then
- term.setCursorPos(32,Ref-16)
- else
- term.setCursorPos(1,Ref-32)
- end
- placeInFile(PATH,List)
- end
- --monitor = peripheral.wrap("top")
- --X,Y = monitor.getSize()
- --monitor.setBackgroundColor(colors.lightGray)
- --monitor.clear()
- --monitor.setTextColor(colors.yellow)
- --monitor.setCursorPos(4,1)
- --monitor.setBackgroundColor(colors.blue)
- --monitor.write("^")
- --monitor.setCursorPos(4,2)
- --monitor.write("|")
- --monitor.setCursorPos(1,3)
- --monitor.write("<=")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement