Jump to content

Quest Mensaje global..ayuda


Pathits!

Mensajes recomendados

Hola...Buenas noches, me gustaria si me pueden decir el error en esta quest ya que no respeta el tiempo y puedes enviar el mensaje sin limite

 

* Me explico mejor... resulta que tu le pagas al npc, escribes el mensaje y lo envia sin error....Luego tu apretas el npc y te sale el mensaje de que no puedes enviar mas mensaje y debes esperar los 30 min le pones ok pero resulta que lo apretas nuevamente y te sale la opcion denuevo para escribir en general no respeta el tiempo

 

quest chatreino begin
state start begin
  when 20095.chat. "Mensaje Global" begin
   if get_time() < pc.getqf("tiempo") then
    say("Todavia no puedes mandar un mensaje Global")
    if pc.is_gm() then
	 pc.setqf("tiempo",0)
	 say("debes esperar 30 minutos")
	 return
    end
    return
   else
    local precio = 10000000
    say_title("Mensaje Global?")
    say("¿Quieres enviar un mensaje Global?")
    say("Aunque deberás saber que te cobraré,")
    say("exactamente son "..precio.." yang")
    local menu = select ("Si","No")
    if menu == 2 then
	 return
    elseif menu == 1 then
	 if pc.get_money() < precio then
	  say("No tienes el yang suficiente")
	  return
	 elseif pc.get_money() >= precio then
	  say("Escribe el mensaje que deseas enviar")
	  local sms = input()
	  pc.setqf("tiempo",get_time()+1800)
	  if pc.get_empire() == 1 then
	   local reino = "Shinsoo"
	   notice_all(pc.get_name().." de "..reino..": "..sms)
	   pc.change_money(-(precio))
	  elseif pc.get_empire() == 2 then
	   local reino = "Chunjo"
	   notice_all(pc.get_name().." de "..reino..": "..sms)
	   pc.change_money(-(precio))
	  elseif pc.get_empire() == 3 then
	   local reino = "Jinno"
	   notice_all(pc.get_name().." de "..reino..": "..sms)
	   pc.change_money(-(precio))
	  end
	 end
    end
   end
  end
end
end
Enlace para comentar
Compartir en otros sitios

En esta quest tiene que poner los nombres de los reinos que es ta en tu locale.lua

en

locale.empire_names = { }

quest chatreino begin
state start begin
  when 20095.chat. "Mensaje Global" begin
   sp=pc.get_name()
   if get_time() < pc.getqf("tiempo") then
	say("Todavia no puedes mandar un mensaje Global")
   else
	local precio = 10000000
	say_title("Mensaje Global?")
	say("¿Quieres enviar un mensaje Global?")
	say("Aunque deberás saber que te cobraré,")
	say("exactamente son "..precio.." yang")
	local menu = select ("Si","No")
	if menu == 1 then
	 if pc.get_money() < precio then
	  say("No tienes el yang suficiente")
	 else
	  -- es en aleman, lo tienes que escribir en espanol
	  local names = {"Chunjo-Reich","Jinno-Reich","Shinsoo-Reich",} --los nombres del reino 1-rojo 2- amarillo 3-azul
	  name = names[pc.get_empire()]
	  say("Escribe el mensaje que deseas enviar")
	  local sms = input()
	  if pc.get_empire() == name then
	   notice_all(sp.." de "..name..": "..sms)
	   pc.change_money(-precio)
	   pc.getqf("tiempo",get_time()+60*30)
	  end
	 end
	end
   end
  end
end
end
Editado por Noa
Enlace para comentar
Compartir en otros sitios

quest chatreino begin
state start begin 
when 20095.chat. "Mensaje Global" begin  
sp=pc.get_name()  
if get_time() < pc.getqf("tiempo") then	   
say("Todavia no puedes mandar un mensaje Global")  
else	   
local precio = 10000000	   
say_title("Mensaje Global?")	  
say("¿Quieres enviar un mensaje Global?")	  
say("Aunque deberás saber que te cobraré,")	 
  say("exactamente son "..precio.." yang")	  
local menu = select ("Si","No")	  
if menu == 1 then		
if pc.get_money() < precio then		
say("No tienes el yang suficiente")	   
else				
local names = {"Reino de Shinsoo","Reino de Chunjo","Reino de Jinno",}		 
name = names[pc.get_empire()]		
say("Escribe el mensaje que deseas enviar")	   
local sms = input()		 
if pc.get_empire() == name then		  
notice_all(sp.." de "..name..": "..sms)		  
pc.change_money(-precio)		  
pc.getqf("tiempo",get_time()+60*30)		
end		
end	   
end  
end 
end
end
end

no manda ningun mensaje

Enlace para comentar
Compartir en otros sitios

erra mi error perdona, aqi esta la quest

quest chatreino begin
state start begin
  when 20095.chat. "Mensaje Global" begin   
   if get_time() < pc.getqf("tiempo") then   
   say("Todavia no puedes mandar un mensaje Global") 
   else	  
    local precio = 10000000   
    say_title("Mensaje Global?")	 
    say("¿Quieres enviar un mensaje Global?")		
    say("Aunque deberás saber que te cobraré,")	 
    say("exactamente son "..precio.." yang")	   
    local menu = select ("Si","No")  
    if menu == 1 then			  
	 if pc.get_money() < precio then		
	  say("No tienes el yang suficiente")	   
	 else						   
	  local reino = {"Reino de Shinsoo","Reino de Chunjo","Reino de Jinno",}					
	  say("Escribe el mensaje que deseas enviar")	   
	  local sms = input()					 
	  notice_all(pc.get_name().." de "..reino[pc.get_empire()]..": "..sms)		  
	  pc.change_money(-precio)				 
	  pc.setqf("tiempo",get_time()+60*30)			
	  setskin(NOWINDOW)
	 end	   
    end 
   end
  end
end
end
Enlace para comentar
Compartir en otros sitios

  • Dilong locked this tema
Guest
Este tema está cerrado a otras respuestas.
  • Recientemente navegando por este tema   0 miembros

    • No hay usuarios registrados visitando esta página.
×
×
  • Crear nuevo...