Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- w, h = term.getSize()
- coord = {}
- for x = -100, 100 do
- for z = -100, 100 do
- if 47 <= (math.abs(x+z)+math.abs(x-z))/2 and (math.abs(x+z)+math.abs(x-z))/2 <= 73 then
- coord[#coord+1] = {x,z}
- end
- if math.max(math.abs(x),math.abs(math.abs(z)-60)) <= 27 then
- coord[#coord+1] = {x,z}
- end
- end
- end
- while true do
- -- Current Position
- term.setCursorPos((w+math.fmod(w,2))/2, (h+math.fmod(h,2))/2)
- term.setBackgroundColor(colors.red)
- term.write(" ")
- -- Mapping
- x1 = 1
- y1 = 1
- xloc, yloc, zloc = gps.locate()
- for x = math.floor(xloc) - w/2, math.floor(xloc) + w/2 do
- for z = math.floor(zloc) - w/2, math.floor(zloc) + w/2 do
- for t = 1, #coord do
- if coord[t][1] == x and coord[t][2] == z then
- shade = true
- end
- end
- if shade then
- term.setCursorPos(x1,y1)
- term.setBackgroundColor(colors.gray)
- term.write(" ")
- shade = false
- end
- y1 = y1 + 1
- end
- x1 = x1 + 1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement