ccminingturtle/TylerTracker.lua

37 lines
1.0 KiB
Lua
Raw Normal View History

2021-05-08 02:03:11 +00:00
local player = peripheral.wrap("back")
local termW, termH = term.getSize()
print(termW .. "x" .. termH)
local main = window.create(term.current(), 1, 1, termW, termH)
main.setBackgroundColor(8192)
main.clear()
main.setTextColor(2)
main.setCursorPos(1,1)
main.write("Le Garvie Tracker")
main.setVisible(true)
while true do
local pos = player.getPlayerPos("Garvage")
2021-05-08 02:11:12 +00:00
if pos == nil then
main.setCursorPos(1,2)
main.clearLine()
2021-05-08 02:14:24 +00:00
main.write("Player not found.")
main.setCursorPos(1,3)
main.clearLine()
main.write("Last known location:")
2021-05-08 02:11:12 +00:00
else
main.setCursorPos(1,2)
main.clearLine()
2021-05-08 02:14:24 +00:00
main.write("Player found.")
2021-05-08 02:11:12 +00:00
main.setCursorPos(1,3)
main.clearLine()
main.setCursorPos(1,4)
main.clearLine()
2021-05-08 02:14:24 +00:00
main.write("X: " .. pos.x)
main.setCursorPos(1,5)
main.clearLine()
main.write("Y: " .. pos.y)
main.setCursorPos(1,6)
main.clearLine()
2021-05-08 02:11:12 +00:00
main.write("Z: " .. pos.z)
end
2021-05-08 02:03:11 +00:00
sleep(1)
end