Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local max_x, max_y = term.getSize()
- local radius,c_x,c_z = ...
- local black_list = {["Nunoto"]=true, ["Paratiel_"]=true, ["Krossegurke"]=true, ["Galaxy1121"]=true, ["BillyBopBeans"]=true, ["Hunterman4488"]=true,["thediamondman199"]=true}
- if not radius then
- write("INSERT RADIUS: ")
- radius = tonumber(read())
- write("INSERT X: ")
- c_x = tonumber(read())
- write("INSERT Z: ")
- c_z = tonumber(read())
- else
- radius,c_x,c_z = ...
- end
- monitor = peripheral.wrap("top")
- term.redirect(monitor)
- function string.split(str, sep)
- if sep == nil then
- sep = "%s"
- end
- local t = {}
- for sr in string.gmatch(str, "([^"..sep.."]+)") do
- table.insert(t, sr)
- end
- return t
- end
- function int(n)
- return tonumber(n)
- end
- local interpolate = (c_z*2)/max_y
- term.clear()
- term.setCursorPos(1,1)
- while true do
- local git = http.get("https://raw.githubusercontent.com/banana-boye/cannon-thingy/refs/heads/test/main.json")
- local info = textutils.unserialiseJSON(git.readAll())
- term.clear()
- term.setCursorPos(1,1)
- for player, c_string in pairs(info) do
- local spl = string.split(string.sub(c_string,2,#c_string-1), " | ")
- local x,y,z = tonumber(spl[1]),tonumber(spl[2]),tonumber(spl[3])
- if (x >= c_x-radius and x <= c_x+radius) and (z >= c_z-radius and z <= c_z+radius) and not black_list[player] then
- write(player.." found at "..c_string..os.date(" -> %H:%M:%S \n"))
- end
- end
- paintutils.drawPixel(max_x/2,max_y/2)
- os.sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement