From ef6930f38f6092769addb3b1d67ee7fb09df3b91 Mon Sep 17 00:00:00 2001 From: ydeng Date: Fri, 7 May 2021 21:03:11 -0500 Subject: [PATCH 1/5] Add 'TylerTracker' --- TylerTracker | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 TylerTracker diff --git a/TylerTracker b/TylerTracker new file mode 100644 index 0000000..bb42075 --- /dev/null +++ b/TylerTracker @@ -0,0 +1,23 @@ +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") + main.setCursorPos(1,2) + main.clearLine() + main.write("X: " .. pos.x) + main.setCursorPos(1,3) + main.clearLine() + main.write("Y: " .. pos.y) + main.setCursorPos(1,4) + main.clearLine() + main.write("Z: " .. pos.z) + sleep(1) +end \ No newline at end of file From 119c0c4ac5fa5ebd997ffff1d0ccb690a8c02373 Mon Sep 17 00:00:00 2001 From: ydeng Date: Fri, 7 May 2021 21:07:18 -0500 Subject: [PATCH 2/5] Update 'TylerTracker.lua' --- TylerTracker => TylerTracker.lua | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename TylerTracker => TylerTracker.lua (100%) diff --git a/TylerTracker b/TylerTracker.lua similarity index 100% rename from TylerTracker rename to TylerTracker.lua From 16b4041d2b5f54fbc808c806295ccd55c6a5fc0b Mon Sep 17 00:00:00 2001 From: ydeng Date: Fri, 7 May 2021 21:11:12 -0500 Subject: [PATCH 3/5] Update 'TylerTracker.lua' --- TylerTracker.lua | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/TylerTracker.lua b/TylerTracker.lua index bb42075..7bacde3 100644 --- a/TylerTracker.lua +++ b/TylerTracker.lua @@ -10,14 +10,20 @@ main.write("Le Garvie Tracker") main.setVisible(true) while true do local pos = player.getPlayerPos("Garvage") - main.setCursorPos(1,2) - main.clearLine() - main.write("X: " .. pos.x) - main.setCursorPos(1,3) - main.clearLine() - main.write("Y: " .. pos.y) - main.setCursorPos(1,4) - main.clearLine() - main.write("Z: " .. pos.z) + if pos == nil then + main.setCursorPos(1,2) + main.clearLine() + main.write("Player cannot be found currently.") + else + main.setCursorPos(1,2) + main.clearLine() + main.write("X: " .. pos.x) + main.setCursorPos(1,3) + main.clearLine() + main.write("Y: " .. pos.y) + main.setCursorPos(1,4) + main.clearLine() + main.write("Z: " .. pos.z) + end sleep(1) end \ No newline at end of file From a7f06bc8bd0f30b05efad530f25ffec8461a94c2 Mon Sep 17 00:00:00 2001 From: ydeng Date: Fri, 7 May 2021 21:14:24 -0500 Subject: [PATCH 4/5] Update 'TylerTracker.lua' --- TylerTracker.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/TylerTracker.lua b/TylerTracker.lua index 7bacde3..92868f8 100644 --- a/TylerTracker.lua +++ b/TylerTracker.lua @@ -13,16 +13,24 @@ while true do if pos == nil then main.setCursorPos(1,2) main.clearLine() - main.write("Player cannot be found currently.") + main.write("Player not found.") + main.setCursorPos(1,3) + main.clearLine() + main.write("Last known location:") else main.setCursorPos(1,2) main.clearLine() - main.write("X: " .. pos.x) + main.write("Player found.") main.setCursorPos(1,3) main.clearLine() - main.write("Y: " .. pos.y) main.setCursorPos(1,4) main.clearLine() + main.write("X: " .. pos.x) + main.setCursorPos(1,5) + main.clearLine() + main.write("Y: " .. pos.y) + main.setCursorPos(1,6) + main.clearLine() main.write("Z: " .. pos.z) end sleep(1) From 9e7d10721345304dff26f7548c98cb4850ee8316 Mon Sep 17 00:00:00 2001 From: ydeng Date: Fri, 7 May 2021 21:16:26 -0500 Subject: [PATCH 5/5] Update 'DuyTracker.lua' --- DuyTracker.lua | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/DuyTracker.lua b/DuyTracker.lua index 2bed8fa..29242ae 100644 --- a/DuyTracker.lua +++ b/DuyTracker.lua @@ -6,18 +6,32 @@ main.setBackgroundColor(8192) main.clear() main.setTextColor(2) main.setCursorPos(1,1) -main.write("Le Duy Tracker") +main.write("Le HooeyLou Tracker") main.setVisible(true) while true do local pos = player.getPlayerPos("MrArsnic") - main.setCursorPos(1,2) - main.clearLine() - main.write("X: " .. pos.x) - main.setCursorPos(1,3) - main.clearLine() - main.write("Y: " .. pos.y) - main.setCursorPos(1,4) - main.clearLine() - main.write("Z: " .. pos.z) + if pos == nil then + main.setCursorPos(1,2) + main.clearLine() + main.write("Player not found.") + main.setCursorPos(1,3) + main.clearLine() + main.write("Last known location:") + else + main.setCursorPos(1,2) + main.clearLine() + main.write("Player found.") + main.setCursorPos(1,3) + main.clearLine() + main.setCursorPos(1,4) + main.clearLine() + main.write("X: " .. pos.x) + main.setCursorPos(1,5) + main.clearLine() + main.write("Y: " .. pos.y) + main.setCursorPos(1,6) + main.clearLine() + main.write("Z: " .. pos.z) + end sleep(1) end \ No newline at end of file