Jump to content

[QUEST]Estado GM


Dragonslayer

Recommended Posts

Bueno pues una quest de gm un poco mas "avanzada" que la normal, pero vamos que es muy sencilla. Con esta puede activar los comandos el gm en vez de que salga automaticos.

quest estadogm begin
    state start begin		
		when login with pc.is_gm() begin
			set_state(information1)
		end
	end
		state information1 begin
		when letter begin
			send_letter("ON/OFF - GM")
		end
		when button or info begin
		say_title("ON/OFF")
		local estado = select ("On" , "Off(Ocupado)" , "Salir")
		if estado == 1 then
            notice_all("".. pc.get_name() .." esta Online")
            notice_all("Enviale un mp para dudas/quejas.") 
        end
		if estado == 2 then
            notice_all("".. pc.get_name() .." esta Ocupado o AFK")
            notice_all("Puedes enviar mp para dudas o quejas. Pero no tendras respuesta inmediata")  
        end
		if estado == 3 then
		return
		end
    end
end 
end-- quest
Link to comment
Share on other sites

Porque pones else if y no pones elseif ?

 

 

 

Y porque directamente no pones:

if xxx == 1 then end
if xxx == 2 then end

 

En la universidad un profesor de programación me enseñó que un algoritmo es una forma de representar y dar solución a un problema, pero cada persona resuelve un problema de distinta forma por tal razón su algoritmo es diferente al nuestro.

Link to comment
Share on other sites

No te confundas, el mensaje solo se muestra cuando le das. No se va a mostrar mas veces.

 

A ver si entendí, ¿no importa que opción seleccione (ON/OFF) el mensaje solo se mostrara 1 vez? Digo esto porque he visto varios servidores donde cada vez que un GM se conecta y desconecta, cambia de mapa y eso aparece el mensaje.

Link to comment
Share on other sites

A ver si entendí, ¿no importa que opción seleccione (ON/OFF) el mensaje solo se mostrara 1 vez? Digo esto porque he visto varios servidores donde cada vez que un GM se conecta y desconecta, cambia de mapa y eso aparece el mensaje.

Por eso yo lo he echo así, para que el gm solo se muestre on cuando quiera y se ahorra de escribir todo eso.

Link to comment
Share on other sites

  • 4 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...