Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if
- peripheral.getType("right") == "modem" then
- rednet.open("right")
- elseif
- peripheral.getType("left") == "modem" then
- rednet.open("left")
- elseif
- peripheral.getType("top") == "modem" then
- rednet.open("top")
- elseif
- peripheral.getType("bottom") == "modem" then
- rednet.open("bottom")
- elseif
- peripheral.getType("back") == "modem" then
- rednet.open("back")
- elseif
- peripheral.getType("front") == "modem" then
- rednet.open("front")
- end
- term.clear()
- term.setTextColor(colors.lime)
- term.setCursorPos(24,4)
- print("HE ?")
- term.setTextColor(colors.blue)
- term.setCursorPos(20,8)
- while true do
- local words = {}
- input = read()
- for word in input:gmatch('[^%- ]+') do
- table.insert(words, word)
- inp1 = words[1]
- inp2 = tonumber(words[2])
- end
- if inp1==("topla") or inp1==("yerlestir") or inp1==("reset") then
- rednet.send(tonumber(40),inp1)
- rednet.send(tonumber(41),inp1)
- else
- if type(inp2) == "nil" then
- print("Sayi gir ulan")
- else
- if inp1 == "kaz" then
- i = 0
- repeat
- rednet.send(tonumber(40),"kaz")
- rednet.send(tonumber(41),"kaz")
- i = i + 1
- sleep(15)
- until i == inp2
- elseif inp1==("ileri") or inp1==("geri") or inp1==("sag") or inp1==("sol") or inp1==("yukari") or inp1==("asagi") then
- rednet.send(tonumber(40),input)
- rednet.send(tonumber(41),input)
- else
- print("Yanlis komut hocam")
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement