leo2993 Posted March 9, 2015 Report Share Posted March 9, 2015 Bueno queria preguntarles si alguien sabría cómo hacer una quest que a cada 30 minutos, por ejemplo, transmita un mensaje para todos los reinos. Sé que esta el sistema de write y read pero no me entero muy bien, creo que de esta manera sería mas facil Saludos! Solución Gracias a EdwardDebes iniciar sesión para ver el contenido del enlace en esta publicación. quest msg begin state start begin when 20094.chat."Activar mensaje automatico" with pc.is_gm() begin loop_timer("tiempo", 60*30) say("Mensaje activado") end when tiempo.timer begin notice_all("hola ") end end --state end --quest loop_timer("tiempo", 60*30) Aclaración : 60 segundos por 30 minutos = 30 minutos. Link to comment Share on other sites More sharing options...
Edward™ Posted March 9, 2015 Report Share Posted March 9, 2015 usa la funcion: notice_all("se envia a todos los reinos") Link to comment Share on other sites More sharing options...
Ryen Posted March 9, 2015 Report Share Posted March 9, 2015 quest binvenida begin state start begin when notice_all() say"Hola bla bla bla" end end end Creo que seria algo asi leo2993 1 Link to comment Share on other sites More sharing options...
leo2993 Posted March 9, 2015 Author Report Share Posted March 9, 2015 quest binvenida begin state start begin when notice_all() say"Hola bla bla bla" end end end Creo que seria algo asi Lo que faltaría sería la duración de promedio en volverse a ejecutar Link to comment Share on other sites More sharing options...
leo2993 Posted March 9, 2015 Author Report Share Posted March 9, 2015 Lo que quiero decir es "algo asi": quest binvenida begin state start begin [cada 30 min ejecutar:] cmd"/n Hola bla bla bla" end end end Link to comment Share on other sites More sharing options...
Edward™ Posted March 9, 2015 Report Share Posted March 9, 2015 quest binvenida begin state start begin when notice_all() say"Hola bla bla bla" end end end Creo que seria algo asi Borralo porfavor. quest msg begin state start begin when 20094.chat."Activar mensaje automatico" with pc.is_gm() begin loop_timer("tiempo", 60*30) say("Mensaje activado") end when tiempo.timer begin notice_all("hola ") end end --state end --quest Link to comment Share on other sites More sharing options...
leo2993 Posted March 9, 2015 Author Report Share Posted March 9, 2015 Muchas gracias Edward ! Y la parte loop_timer("tiempo", 60*30) cuantos minutos son o como funciona? Link to comment Share on other sites More sharing options...
Edward™ Posted March 9, 2015 Report Share Posted March 9, 2015 Muchas gracias Edward ! Y la parte loop_timer("tiempo", 60*30) cuantos minutos son o como funciona? 60 segundos por 30 minutos = 30 minutos. Link to comment Share on other sites More sharing options...
pepineitor Posted March 9, 2015 Report Share Posted March 9, 2015 quest binvenida begin state start begin when notice_all() say"Hola bla bla bla" end end end Creo que seria algo asi Deja de inventarte eventos anda. quest blablaba begin state start begin when login begin local horas,mensaje = {2,12,13,17,18,22},"aqui va el mensaje" for i=1,table.getn(horas),1 do if horas[i] == tonumber(os.date("%H")) and game.get_event_flag(tonumber(os.date("%H"))..tonumber(os.date("%d"))) == 0 then notice_all(mensaje) game.set_event_flag(tonumber(os.date("%H"))..tonumber(os.date("%d")), 1) end end en end end No la e probado, pero esta quest mandaría un mensaje en las horas que pongas aqui {2,12,13,17,18,22}, puede ser que una parte no funcione como debe, la he hecho en 1 minuto. Link to comment Share on other sites More sharing options...
Ryen Posted March 9, 2015 Report Share Posted March 9, 2015 Borralo porfavor. quest msg begin state start begin when 20094.chat."Activar mensaje automatico" with pc.is_gm() begin loop_timer("tiempo", 60*30) say("Mensaje activado") end when tiempo.timer begin notice_all("hola ") end end --state end --quest Se lo justo demasiado que mea corde de algo xDDD Link to comment Share on other sites More sharing options...
Recommended Posts