Перейти к содержимому

qPich

Пользователи
  • Публикации

    5
  • Зарегистрирован

  • Посещение

Сообщения, опубликованные пользователем qPich


  1. h = function()
      print("Hello world!")
    end
    if true then
     h()
    end
    if true then
     h()
    end
    if true then
     h()
    end
    if true then
     h()
    end
    if true then
     h()
    end
    if true then
     h()
    end
    if true then
     h()
    end
    if true then
     h()
    end
    if true then
     h()
    end
    if true then
     h()
    end
    

    Или вот еще:

    local text = "Hello"
    print(text.." world")
    print(text.." world")
    print(text.." world")
    print(text.." world")
    print(text.." world")
    print(text.." world")
    print(text.." world")
    print(text.." world")
    print(text.." world")
    print(text.." world")
    

  2. Написал недопрограммку для троллинга в CC, а именно она подменяет консоль CraftOS. Вот код:

    term.clear()
    term.setCursorPos(1, 1)
    term.setTextColor(Yellow)
    print("CraftOS v1.7")
    while true do
     term.setTextColor(colours.yellow)
     write("> ")
     term.setTextColor(colours.white)
     text = read()
     if text ~= "" then
     term.setTextColor(colours.red)
     print("No such program")
     end
    end
    

    Правда я не знаю как проверять, что комп поддерживает цвета + добавить pullevent на Ctrl+T и будет норм. Ее нужно сохранять как файл startup. Правда она палится тем, что не может показать последнюю введенную команду при нажатии клавиши UpArrow(стрелочка вверх).

    PS: Моя первая программа, не считая Hello world... А еще знаю, что на CC мало кто сидит

×
×
  • Создать...