Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local horline = [[+-------------------------------------+]]
- local vertline = [[| |]]
- GC = "indbuildcraft:ibcItemCoinGold"
- --GC = "minecraft:iron_ingot"
- cipa = 1
- --while true do
- --shell.run("rename startup pizda")
- --sleep(1)
- --end
- --print(GC)
- function isGC(slot)
- local item = turtle.getItemDetail(slot)
- if item == nil then
- return false
- end
- return item.name == GC
- end
- function getCount(slot)
- local item = turtle.getItemDetail(slot)
- if not item then
- return false
- end
- return item.count
- end
- function clear()
- shell.run("clear")
- end
- clear()
- function drawMenu()
- clear()
- print(horline)
- for i = 0, 9 do
- print(vertline)
- end
- print(horline)
- end
- function centerPrint(y, tekst)
- term.setCursorPos((39 / 2) - (string.len(tekst) / 2), y)
- term.write(tekst)
- end
- function printOption(y, tekst, numer)
- term.setCursorPos((39 / 2) - 14, y)
- term.write(numer .. "> ")
- centerPrint(y, tekst)
- end
- function getInput(tekst)
- term.setCursorPos(1, 13)
- term.write(tekst)
- term.setCursorPos(string.len(tekst) + 1, 13)
- local textinput = read()
- return textinput
- end
- function getInputPass(tekst)
- term.setCursorPos(1, 13)
- term.write(tekst)
- term.setCursorPos(string.len(tekst) + 1, 13)
- local textinput = read("*")
- return textinput
- end
- function rejestracja()
- drawMenu()
- centerPrint(5,"Podaj nick")
- username = io.read()
- clear()
- drawMenu()
- centerPrint(5,"Podaj haslo")
- password = io.read("*")
- if http.get("http://nightgang.pw:6996/register?username="..username.."&password="..password).readAll() == "true" then
- centerPrint(5,"Rejestracja powiodla sie!")
- else
- centerPrint(5,"Rejestracja nie powiodla sie!")
- end
- end
- function urlencode(str)
- if (str) then
- str = string.gsub(str, "\n", "\r\n")
- str =
- string.gsub(
- str,
- "([^%w ])",
- function(c)
- return string.format("%%%02X", string.byte(c))
- end
- )
- str = string.gsub(str, " ", "%%20")
- end
- return str
- end
- function forward(ilosc)
- end
- --clear()
- --drawMenu()
- --centerPrint(5, "nudzi ci sie nereq?")
- --sleep(233)
- --clear()
- --if not http.get("http://nightgang.pw:3000/ping") then
- -- drawMenu()
- -- centerPrint(5, "Nie udalo sie polaczyc z serwerem")
- -- sleep(5)
- -- os.reboot()
- --end
- --centerPrint(5, )
- --sleep(10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement