fuuton97 Posted July 19, 2013 Report Share Posted July 19, 2013 Hola, hoy les traigo esta pequeña quest que hice, estuve 1 semana off por motivos personales, y en ese tiempo poco que tuve hice esta quest para gm para bloquear y/o desbloquear el chat. Es algo simple, pero espero que les sirve: -------------------------------------- // Script LUA Hecha por Fuuton97-- // @2013 - Metin2 Zone-- // Bloquear Chat - GM------------------------------------quest bloquear_chat begin state start begin when 20094.chat."Bloquear Chat" with pc.is_gm() begin say_title(mob_name(20094)) say("¿Está molesto por el SPAM en el servidor?,") say("que esperas a usar el bloqueo del chat.") say("Conmigo podrás bloquear el chat de ") say("cualquier usuario que usted desee,") say("podrá bloquear y desbloquear con el tiempo") say("que usted decida") say_reward("Elimina esos SPAMERS") local bloquear = select("Bloquear Chat" , "Desbloquear Chat" , "Salir") if bloquear == 1 then say_title(mob_name(20094)) say("Por favor introduzca el nombre del usuario a") say("bloquear su chat:") local bloquear_chat = input() say("Ahora introduzca por cuanto tiempo") say("quiere el bloqueo del chat.") say("A continuación le daré algunos parámetros de tiempo:") say("Tiempos:") say("5 Minutos = 300") say("10 Minutos = 600") say("1 Hora = 3600") say_reward("Por favor diga los segundos a bloquear el chat:") local bloquear_tiempo = input() command("block_chat ".. bloquear_chat .." ".. bloquear_tiempo .."") say("Listo, bloqueado el chat del usuario ".. bloquear_chat .." ") notice_all("El Chat del Jugador ".. bloquear_chat .." ha sido bloqueado por ".. bloquear_tiempo .." tiempos/segundos") elseif bloquear == 2 then say_title(mob_name(20094)) say("Por favor introduzca el nombre del personaje a") say("desbloquear su chat:") local desbloquear_chat = input() command("block_chat ".. desbloquear_chat .." 0") notice_all("El Chat del Jugador ".. desbloquear_chat .." ha sido desbloqueado!!") say("Listo, Chat desbloqueado.") elseif bloquear == 3 then return end end endend Saludos. Tiico™ 1 Quote Link to comment Share on other sites More sharing options...
Tiico™ Posted July 20, 2013 Report Share Posted July 20, 2013 Esta buena , pero le agregaria un if bloquear_chat == nil thensay_title(mob_name(20094))say("Debes introduccir algún nombre de un usuario")say("para poder acceder a Bloqueárle el chat.")returnend Un .. if bloquear_chat == pc.get_name() thensay_title(mob_name(20094))say("Lo siento , pero no puedes bloqueárte el chat")say("a tí mismo , intenta nuevamente con otro nombre.")returnend Un ... if bloquear_tiempo == nil thensay_title(mob_name(20094))say("Perdon , pero debes introduccir algun número")say("para poder darle el tiempo de bloqueo de chat.")returnend Y Un .. if desbloquear_chat == pc.block_chat(..desbloquear_chat..) == 0 thensay_title(mob_name(20094))say("Lo siento pero el jugador no tiene ningun bloqueo de chat.")say("Lo puedes desbanear cuando tenga un ban de chat. Suerte.")returnend De todos modos esta buena +1 Quote Link to comment Share on other sites More sharing options...
PACI Posted July 20, 2013 Report Share Posted July 20, 2013 Esta buena , pero le agregaria un if bloquear_chat == nill thensay_title(mob_name(20094))say("Debes introduccir algún nombre de un usuario")say("para poder acceder a Bloqueárle el chat.")returnend Un .. if bloquear_chat == pc.get_name() thensay_title(mob_name(20094))say("Lo siento , pero no puedes bloqueárte el chat")say("a tí mismo , intenta nuevamente con otro nombre.")returnend Un ... if bloquear_tiempo == nill thensay_title(mob_name(20094))say("Perdon , pero debes introduccir algun número")say("para poder darle el tiempo de bloqueo de chat.")returnend Y Un .. if desbloquear_chat == pc.block_chat(..desbloquear_chat..) == 0 thensay_title(mob_name(20094))say("Lo siento pero el jugador no tiene ningun bloqueo de chat.")say("Lo puedes desbanear cuando tenga un ban de chat. Suerte.")returnend De todos modos esta buena +1 No es nill, si no nil. if bloquear_chat == nil then. Quote Link to comment Share on other sites More sharing options...
Tiico™ Posted July 20, 2013 Report Share Posted July 20, 2013 ni me fije gracias feo e.e Quote Link to comment Share on other sites More sharing options...
fuuton97 Posted July 20, 2013 Author Report Share Posted July 20, 2013 Esta buena , pero le agregaria un if bloquear_chat == nil thensay_title(mob_name(20094))say("Debes introduccir algún nombre de un usuario")say("para poder acceder a Bloqueárle el chat.")returnend Un .. if bloquear_chat == pc.get_name() thensay_title(mob_name(20094))say("Lo siento , pero no puedes bloqueárte el chat")say("a tí mismo , intenta nuevamente con otro nombre.")returnend Un ... if bloquear_tiempo == nil thensay_title(mob_name(20094))say("Perdon , pero debes introduccir algun número")say("para poder darle el tiempo de bloqueo de chat.")returnend Y Un .. if desbloquear_chat == pc.block_chat(..desbloquear_chat..) == 0 thensay_title(mob_name(20094))say("Lo siento pero el jugador no tiene ningun bloqueo de chat.")say("Lo puedes desbanear cuando tenga un ban de chat. Suerte.")returnend De todos modos esta buena +1 Prefiero hacerlo así, pero cojo tu sugerencia. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.