Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local w, h = term.getSize()
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1,1)
- turtle.select(1)
- local d,f = 1,1
- if not fs.exists("flame.nfp") then
- shell.run("pastebin get uZVN5U2Y flame.nfp")
- end
- function words(string, x, y, txtcol, bakcol)
- if txtcol then
- term.setTextColor(txtcol)
- end
- if bakcol then
- term.setBackgroundColor(bakcol)
- end
- if not tonumber(x) and x then
- if string.sub(x, 0, 1) == "l" then
- if x == "l" or x == "left" then
- term.setCursorPos(1, y)
- elseif string.sub(x, 3, 3) == "+" or string.sub(x, 6, 6) == "+" then
- offset = tonumber(string.sub(x, 5, 5)) or tonumber(string.sub(x, 8, 8))
- term.setCursorPos(1 + offset, y)
- end
- elseif string.sub(x, 0, 1) == "c" then
- if x == "center" or x == "c" then
- term.setCursorPos(w / 2 - #string / 2 + 1, y)
- elseif string.sub(x, 3, 3) == "+" or string.sub(x, 8, 8) == "+" then
- offset = tonumber(string.sub(x, 5, 5)) or tonumber(string.sub(x, 10, 10))
- term.setCursorPos(w / 2 - #string / 2 + 1 + offset, y)
- elseif string.sub(x, 3, 3) == "-" or string.sub(x, 8, 8) == "-" then
- offset = tonumber(string.sub(x, 5, 5)) or tonumber(string.sub(x, 10, 10))
- term.setCursorPos(w / 2 - #string / 2 + 1 - offset, y)
- end
- elseif string.sub(x, 0, 1) == "r" then
- if x == "right" or x == "r" then
- term.setCursorPos(w - #string + 1, y)
- elseif string.sub(x, 3, 3) == "-" or string.sub(x, 7, 7) == "-" then
- offset = tonumber(string.sub(x, 5, 5)) or tonumber(string.sub(x, 9, 9))
- term.setCursorPos(w - #string + 1 - offset, y)
- end
- end
- else
- term.setCursorPos(x, y)
- end
- term.write(string)
- end
- local flameImg = paintutils.loadImage("flame.nfp")
- if not fs.exists("*crafting") then
- oTemp = fs.open("*crafting", "w")
- oTemp.writeLine("c7cccccc7c")
- oTemp.writeLine("700c00c007")
- oTemp.writeLine("c00c00c00c")
- oTemp.writeLine("cccccccccc")
- oTemp.writeLine("c00c00c00c")
- oTemp.writeLine("c00c00c00c")
- oTemp.writeLine("cccccccccc")
- oTemp.writeLine("c00c00c00c")
- oTemp.writeLine("700c00c007")
- oTemp.writeLine("c7cccccc7c")
- oTemp.flush()
- oTemp.close()
- end
- if not fs.exists("*smelting") then
- oTemp = fs.open("*smelting", "w")
- oTemp.writeLine("7777777777")
- oTemp.writeLine("77ffffff77")
- oTemp.writeLine("7ffffffff7")
- oTemp.writeLine("7ffffffff7")
- oTemp.writeLine("7777777777")
- oTemp.writeLine("8888888888")
- oTemp.writeLine("88ee4e1e88")
- oTemp.writeLine("81e41ee4e8")
- oTemp.writeLine("8ee1e4e148")
- oTemp.writeLine("8888888888")
- oTemp.flush()
- oTemp.close()
- end
- local craftImg = paintutils.loadImage("*crafting")
- local smeltImg = paintutils.loadImage("*smelting")
- while true do
- term.setBackgroundColor(colors.black)
- term.clear()
- paintutils.drawImage(flameImg,d,f)
- paintutils.drawImage(craftImg, 1, 1)
- paintutils.drawImage(smeltImg, w - 9, 1)
- local e = {os.pullEvent()}
- if e[1] == "key" and e[2] == 203 then
- d = d - 1
- elseif e[1] == "key" and e[2] == 205 then
- d = d + 1
- elseif e[1] == "key" and e[2] == 200 then
- f = f - 1
- elseif e[1] == "key" and e[2] == 208 then
- f = f + 1
- elseif e[1] == "key" and e[2] == 56 then
- shell.run("pastebin run X30igzdu")
- elseif e[1] == "key" and e[2] == 28 then
- write(d.." "..f)
- sleep(1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement