Jump to content

Ayuda con esta quest


Devil

Mensajes recomendados

Hola haber si alguien me podria decir como solucionar el problema que tengo

con esta quest. Funciona bien pero lo que quiero es que aun estando desconectado el pj

lo saque del mapa a los 10 minutos. gracias

 

 

quest anillo_vetas begin
state start begin
  when 30201.use begin
  say_title("Anillo vetas:")
  say("Este anillo te lleva al mapa")
  say("de minas por 10 minutos")
  say("Seras teleportado al Mapa.")
  say_reward("El Anillo desaparecera, quieres continuar?")
  local continua = select("Si", "No")
  local reino = pc.get_empire()
  if continua == 1 then
  item.remove()
  say("Vas al Mapa.")
  say("Por un tiempo limite")
  say("")
  say_reward("Tienes 10 Minutos .")
  pc.warp(23500, 17600 )
  end
end
  when login with pc.get_map_index() == 105 begin
  timer("pafuera", 60*10)
  end
  when pafuera.timer begin
  warp_to_village()
  end
end
end

Enlace para comentar
Compartir en otros sitios

quest warp begin

state start begin

when id.use begin

say("texto")

local s = select("Si","No")

if s == 2 then

return

elseif s == 1 then

say("texto")

wait()

pc.remove_item(id, 1)

pc.warp(23500, 17600)

end

end

when login with pc.get_map_index()== 105 begin

pc.setqf("duracion_en_mapa",get_time()+60*10*0)

if get_time() > pc.getqf("duracion_en_mapa") then

warp_to_village()

end

end

end

Enlace para comentar
Compartir en otros sitios

quest warp begin

state start begin

when id.use begin

say("texto")

local s = select("Si","No")

if s == 1 then

return

elseif s == 2 then

say("texto")

wait()

pc.remove_item(id, 1)

pc.warp(23500, 17600)

end

end

when login with pc.get_map_index()== 105 begin

pc.setqf("duracion_en_mapa",get_time()+60*10*0)

if get_time() > pc.getqf("duracion_en_mapa") then

warp_to_village()

end

end

end

La probare ;)

Enlace para comentar
Compartir en otros sitios

Prueba esto

Prueba esto

quest anillo_vetas begin
    state start begin
        
        when login with pc.get_map_index() == 105 begin
            if get_time() > pc.getqf("duracion_en_mapa") then
                warp_to_village()
            else
                tiempo = pc.getqf("duracion_en_mapa")-get_time()
                say("Te queda "..tiempo.." segundo(s).")
                timer("salir",pc.getqf("duracion_en_mapa")-get_time())
            end
        end
        
        when 30201.use begin
            say_title("Anillo vetas:")
            say("Este anillo te lleva al mapa")
            say("de minas por 10 minutos")
            say("Seras teleportado al Mapa.")
            say_reward("¿El Anillo desaparecera, quieres continuar?")
            local continua = select("Si", "No")
            if continua == 1 then
                say("Vas al Mapa.")
                say("Por un tiempo limite")
                say("")
                say_reward("Tienes 10 Minutos .")
                --Te teletransporta a un mapa
                pc.warp(23500, 17600)
                --Borra el Item
                pc.remove_item(30201, 1)
                --600 segundos son 10 minutos
                pc.setqf("duracion_en_mapa",get_time()+600)
            end
        end
        
        when salir.timer begin
            warp_to_village()
        end
    end
end


Enlace para comentar
Compartir en otros sitios

quest warp begin

state start begin

when id.use begin

say("texto")

local s = select("Si","No")

if s == 2 then

return

elseif s == 1 then

say("texto")

wait()

pc.remove_item(id, 1)

pc.warp(23500, 17600)

end

end

when login with pc.get_map_index()== 105 begin

pc.setqf("duracion_en_mapa",get_time()+60*10*0)

end

end

if get_time() > pc.getqf("duracion_en_mapa") then

warp_to_village()

end

end

end

Enlace para comentar
Compartir en otros sitios

quest anillo_vetas begin
    state start begin  
        when login or enter with pc.get_map_index() == 105 begin
            if pc.getqf("usado") == 1 and pc.getqf("primero") == 0 then
                pc.setqf("primero",1)
                pc.setqf("duracion_en_mapa",get_time()+60*10)
            elseif pc.getqf("usado") == 1 and  pc.getqf("primero") > 0 then
                if get_time() > pc.getqf("duracion_en_mapa") then
                    warp_to_village()
                else
                    local tiempo = pc.getqf("duracion_en_mapa")-get_time()
                    local minutos = math.floor(tiempo/60)
                    if minutos > 0 then
                        syschat(string.format("Te quedan: %s minutos(s)", minutos))
                    else
                        syschat(string.format("Te quedan: %s segundos(s)", tiempo))
                    end
                    timer("salir",tiempo)
                end
            else
                syschat("")
            end
        end
        
        when 30201.use begin
            say_title("Anillo vetas:")
            say("Este anillo te lleva al mapa")
            say("de minas por 10 minutos")
            say("Seras teleportado al Mapa.")
            say_reward("¿El Anillo desaparecera, quieres continuar?")
            local continua = select("Si", "No")
            if continua == 1 then
                say("Vas al Mapa.")
                say("Por un tiempo limite")
                say("")
                say_reward("Tienes 10 Minutos .")
                pc.warp(6400, 100)
                pc.remove_item(30201, 1)
                pc.setqf("usado",1)
                pc.setqf("primero",0)
            end
        end
        
        when salir.timer begin
            warp_to_village()
        end
    end
end

PD: El objeto tiene que tener el tipo 18 para que pueda ser usado desde la quest

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...