Jump to content

Tabla del Honor

Contenido popular

Showing content with the highest reputation on 24/04/24 en todas las áreas

  1. ReuS

    Anuncios automaticos

    Pues nada, no hay mucho para decir... un gracias no viene mal los anuncios van dentro de notices_list, un archivo que deben crear en data/notices_list -- ReuS para Metin2Zone quest notices begin state start begin when letter with pc.get_name() == "[GA]ReuS" begin send_letter("Noticias automaticas") end when button or info with pc.is_gm() begin local text = { [0] = "Noticias automaticas desactivadas.", [1] = "Noticias automaticas activadas.", } say_title("Noticias automaticas[ENTER]") say(text[game.get_event_flag("notices_loop")]) say("Que deseas hacer?[ENTER]") local choice = select("Activar noticias automaticas", "Desactivar noticias automaticas", locale.cancel) if choice == 3 then return end if choice == 2 then syschat("Las noticias automaticas han sido desactivadas.") game.set_event_flag("notices_loop", 0) clear_server_timer("notices_server_loop") elseif choice == 1 then syschat("Las noticias automaticas han sido activadas.") game.set_event_flag("notices_loop", 1) server_loop_timer("notices_server_loop", 30*60) -- Intervalo de 30 minutos end end when notices_server_loop.server_timer with game.get_event_flag("notices_loop") != 0 begin local notices = get_notices() big_notice_all(notices[number(1, table.getn(notices))]) end function get_notices() local table_get_notices = {} local f = io.open("data/notices_list", "r") if not f then return {} end for line in f:lines() do table.insert(table_get_notices, line) end f:close() return table_get_notices end end end
    1 punto
Esta clasificación está establecida en Madrid/GMT+02:00
×
×
  • Crear nuevo...