Devil Posted March 2, 2017 Report Share Posted March 2, 2017 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 beginstate 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 ) endend when login with pc.get_map_index() == 105 begin timer("pafuera", 60*10) end when pafuera.timer begin warp_to_village() endendend Link to comment Share on other sites More sharing options...
Dilong Posted March 2, 2017 Report Share Posted March 2, 2017 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 david091 1 Link to comment Share on other sites More sharing options...
david091 Posted March 2, 2017 Report Share Posted March 2, 2017 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 Link to comment Share on other sites More sharing options...
Devil Posted March 3, 2017 Author Report Share Posted March 3, 2017 No funciona te lleva al mapa pero te saca nada mas llegar Tambien da error al cargar la quest le puse un END mas al final y si carga pero sucede eso que te saca al momento de llegar al mapa Link to comment Share on other sites More sharing options...
MrFunckencio Posted March 3, 2017 Report Share Posted March 3, 2017 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 Link to comment Share on other sites More sharing options...
Devil Posted March 3, 2017 Author Report Share Posted March 3, 2017 Hace lo mismo te lleva al mapa, sale un anuncio " Te quedan 596 segundos " pero te devuelve a city Link to comment Share on other sites More sharing options...
Dilong Posted March 3, 2017 Report Share Posted March 3, 2017 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 Link to comment Share on other sites More sharing options...
Devil Posted March 3, 2017 Author Report Share Posted March 3, 2017 Dilong ahora da error al cargarla agradezco tu ayuda pero sigue sin funcionar Debes iniciar sesión para ver el contenido del enlace en esta publicación. Geffy 1 Link to comment Share on other sites More sharing options...
Elite™ Posted March 3, 2017 Report Share Posted March 3, 2017 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 Link to comment Share on other sites More sharing options...
Recommended Posts