Riochu™ no es Posted May 23, 2013 Report Share Posted May 23, 2013 Buenas chicos alguien me pasa una quest como esta o me la hace ? Link to comment Share on other sites More sharing options...
Dextrok Posted May 23, 2013 Report Share Posted May 23, 2013 quest mapas begin state start begin when 20011.chat."Ir a mapas" begin --Aca van todas las coordenadas de todos los mapas. local coord_map = { {coord1x, coord1y }, {coord2x, coord2y }, {coord3x, coord3y }, {coord4x, coord4y }, {coord5x, coord5y }, } say_title("Viajero:") say("Selecciona el mapa al que quieres ir") local result = select("map1", "map2", "map3", "map4", "map5", "Cancelar") if result != 6 then pc.warp(coord_map[result]) end end end end Riochu™ no es 1 Link to comment Share on other sites More sharing options...
KeKo Posted May 24, 2013 Report Share Posted May 24, 2013 @Dextrox, no se porque pero me suena la estructura de esa quest (xq sera xd), pero la has adaptado mal, el warp esta mal hecho y el ultimo elemento del array lleva coma. quest mapas begin state start begin when 20011.chat."Ir a mapas" begin --Aca van todas las coordenadas de todos los mapas. local coord_map = { {coord1x, coord1y }, {coord2x, coord2y }, {coord3x, coord3y }, {coord4x, coord4y }, {coord5x, coord5y } } say_title("Viajero:") say("Selecciona el mapa al que quieres ir") local result = select("map1", "map2", "map3", "map4", "map5", "Cancelar") if result != 6 then pc.warp(coord_map[result][1],coord_map[result][2]) end end end end Asi si que si xd Riochu™ no es 1 Link to comment Share on other sites More sharing options...
Dextrok Posted May 24, 2013 Report Share Posted May 24, 2013 Umm, gracias por la info mejor dejo de inventar con las listas, aun me falta hacer más pruebas. Riochu™ no es 1 Link to comment Share on other sites More sharing options...
KeKo Posted May 24, 2013 Report Share Posted May 24, 2013 Umm, gracias por la info mejor dejo de inventar con las listas, aun me falta hacer más pruebas. No problem, yo hasta hace poco tmapoco me llevaba mu bien con ellas pero a base de verlas constantemente se va aprendiendo xd Riochu™ no es 1 Link to comment Share on other sites More sharing options...
Riochu™ no es Posted May 24, 2013 Author Report Share Posted May 24, 2013 Es que la quest de la foto que puse Te lleva al mapa solo si tienes lv 90 hasta 100 y despues de lv 100 ya no puedes entrar en ese mapa y asi con todas:( Link to comment Share on other sites More sharing options...
Sonia Posted May 24, 2013 Report Share Posted May 24, 2013 quest mapas begin state start begin when 20095.chat.'Teleportar' begin local a = select ("Proximamente(lv85)", "Proximamente(Lv100)", "Valle Sangriento(lv115)", "Atlantea(lv130)", "Isla de la muerte(lv150)", "Valle De la Oscuridad(lv170)", "Mas Mapas") if a == 1 then if pc.get_level() < 85 then say("Lo siento aun no eres lvl 85") return end pc.warp (640,00) elseif a == 2 then if pc.get_level() < 100 then say("Lo siento aun no eres lvl 100") return end pc.warp (00,00) elseif a == 3 then if pc.get_level() < 115 then say("Lo siento aun no eres lvl 115") return end pc.warp (00,00) elseif a == 4 then if pc.get_level() < 130 then say("Lo siento aun no eres lvl 130") return end pc.warp (00,00) elseif a == 5 then if pc.get_level() < 150 then say("Lo siento aun no eres lvl 150") return end pc.warp (00,00) elseif a == 6 then if pc.get_level() < 170 then say("Lo siento aun no eres lvl 170") return end pc.warp (00,00) elseif a == 7 then local b = select ("Desierto Definitivo(Lv.190)", "Infierno Oscuro(Lv.210)", "Cielo Destruido(lv.230)", "Sala del Minotauro(Lv.245)", "Catakumbas(Lv.250)", "Mapa Jefes(Lv.250)","Mapas Extra") if b == 1 then if pc.get_level() < 190 then say("Lo siento aun no eres lvl 190") return end pc.warp (00,00) elseif b == 2 then if pc.get_level() < 210 then say("Lo siento aun no eres lvl 210") return end pc.warp (00,00) elseif b == 3 then if pc.get_level() < 230 then say("Lo siento aun no eres lvl 230") return end elseif b == 4 then if pc.get_level() < 245 then say("Lo siento aun no eres lvl 245") return end elseif b == 5 then if pc.get_level() < 250 then say("Lo siento aun no eres lvl 250") return end elseif b == 6 then if pc.get_level() < 250 then say("Lo siento aun no eres lvl 250") return end elseif b == 7 then local c = select("Mapa Del Yang(Lv.140)","MapaPVP(Lv.250)","Mapa De Dropeo(Lv.200)","MapaEventos(Lv.180)","MapaEventos(Lv.100)","CitiDeComercio(Lv.10)","Salir") if c == 1 then if pc.get_level() < 140 then say("Lo siento aun no eres lvl 140") return end elseif c == 2 then if pc.get_level() < 250 then say("Lo siento aun no eres lvl 250") return end elseif c == 3 then if pc.get_level() < 200 then say("Lo siento aun no eres lvl 200") return end elseif c == 4 then if pc.get_level() < 180 then say("Lo siento aun no eres lvl 180") return end elseif c == 5 then if pc.get_level() < 100 then say("Lo siento aun no eres lvl 100") return end elseif c == 6 then if pc.get_level() < 10 then say("Lo siento aun no eres lvl 10") return end end end end end end end Riochu™ no es 1 Link to comment Share on other sites More sharing options...
KeKo Posted May 24, 2013 Report Share Posted May 24, 2013 @Sonia, pa que pone dextrox un array si total luego lo pones super largo -.- quest mapas begin state start begin when 20011.chat."Ir a mapas" begin --Aca van todas las coordenadas de todos los mapas. local nivel = {nivel1,nivel2,nivel3,nivel4,nivel5} -- nivel exigido para cada mapa local coord_map = { {coord1x, coord1y }, {coord2x, coord2y }, {coord3x, coord3y }, {coord4x, coord4y }, {coord5x, coord5y } } say_title("Viajero:") say("Selecciona el mapa al que quieres ir") local result = select("map1", "map2", "map3", "map4", "map5", "Cancelar") if result != 6 then if pc.get_level() < nivel[result] then chat("Lo siento, no tienes el nivel necesario para entrar a este mapa") return end pc.warp(coord_map[result][1],coord_map[result][2]) end end end end Link to comment Share on other sites More sharing options...
Yori Posted May 25, 2013 Report Share Posted May 25, 2013 otra forma mas sin tener que crear otra tabla xDD quest mapas begin state start begin when 20011.chat."Ir a mapas" begin --Aca van todas las coordenadas de todos los mapas. local coord_map = { {coord1x, coord1y, nivel1}, {coord2x, coord2y, nivel2}, {coord3x, coord3y, nivel3}, {coord4x, coord4y, nivel4}, {coord5x, coord5y, nivel5} } say_title("Viajero:") say("Selecciona el mapa al que quieres ir") local result = select("map1", "map2", "map3", "map4", "map5", "Cancelar") if result != 6 then if pc.get_level() < coord_map[result][3] then chat("Lo siento, no tienes el nivel necesario para entrar a este mapa") else pc.warp(coord_map[result][1],coord_map[result][2]) end end end end end Link to comment Share on other sites More sharing options...
Metin2Arthas Posted May 27, 2013 Report Share Posted May 27, 2013 @Sonia, pa que pone dextrox un array si total luego lo pones super largo -.- quest mapas begin state start begin when 20011.chat."Ir a mapas" begin --Aca van todas las coordenadas de todos los mapas. local nivel = {nivel1,nivel2,nivel3,nivel4,nivel5} -- nivel exigido para cada mapa local coord_map = { {coord1x, coord1y }, {coord2x, coord2y }, {coord3x, coord3y }, {coord4x, coord4y }, {coord5x, coord5y } } say_title("Viajero:") say("Selecciona el mapa al que quieres ir") local result = select("map1", "map2", "map3", "map4", "map5", "Cancelar") if result != 6 then if pc.get_level() < nivel[result] then chat("Lo siento, no tienes el nivel necesario para entrar a este mapa") return end pc.warp(coord_map[result][1],coord_map[result][2]) end end end end un pregunata para añadir mas mapas a la quest solo con editar las parte de el nivel requerido, anadir un nueva linea de cordenadas y luego añadir el nobre del nuevo mapa ya valdria, no abria que hacer nada mas, es que si es asi ese formato me seria muy util. por ejemplo si hago esto seria correcto: quest mapas begin state start begin when 20011.chat."Ir a mapas" begin --Aca van todas las coordenadas de todos los mapas. local nivel = {nivel1,nivel2,nivel3,nivel4,nivel5,nivel6,nivel7,nivel8} -- nivel exigido para cada mapa local coord_map = { {coord1x, coord1y }, {coord2x, coord2y }, {coord3x, coord3y }, {coord4x, coord4y }, {coord5x, coord5y }, {coord6x, coord6y }, {coord7x, coord7y }, {coord8x, coord8y } } say_title("Viajero:") say("Selecciona el mapa al que quieres ir") local result = select("map1", "map2", "map3", "map4", "map5","map6","map7","map8", "Cancelar") if result != 6 then if pc.get_level() < nivel[result] then chat("Lo siento, no tienes el nivel necesario para entrar a este mapa") return end pc.warp(coord_map[result][1],coord_map[result][2]) end end end end Link to comment Share on other sites More sharing options...
KeKo Posted May 27, 2013 Report Share Posted May 27, 2013 Si, asi esta bien editada ergzione Link to comment Share on other sites More sharing options...
Dextrok Posted May 28, 2013 Report Share Posted May 28, 2013 Recuerda que también tienes que modificar el: if result != 6 then y siempre poner el último número que corresponde a Cancelar. Que en tu caso sería if result != 9 then Link to comment Share on other sites More sharing options...
Croqueta Posted May 28, 2013 Report Share Posted May 28, 2013 Recuerda que también tienes que modificar el: if result != 6 then y siempre poner el último número que corresponde a Cancelar. Que en tu caso sería if result != 9 then no es nesesario, con este codigo no se nesesita cambiar siempre. if result == table.getn(nivel)+1 then return end Mira lo edite un poco quest mapas begin state start begin when 20011.chat."Ir a mapas" begin local coord_map = { {{nivel1},coord1x, coord1y }, {{nivel2},coord2x, coord2y }, {{nivel3},coord3x, coord3y }, {{nivel4},coord4x, coord4y }, {{nivel5},coord5x, coord5y }, {{nivel6},coord6x, coord6y }, {{nivel7},coord7x, coord7y }, {{nivel8},coord8x, coord8y } } say_title("Viajero:") say("Selecciona el mapa al que quieres ir") local result = select("map1", "map2", "map3", "map4", "map5","map6","map7","map8", "Cancelar") if result ==table.getn(coord_map)+1 then return end if pc.get_level() < coord_map[result][1][1] then chat("Lo siento, no tienes el nivel necesario para entrar a este mapa") return end pc.warp(coord_map[result][2],coord_map[result][3]) end end end Link to comment Share on other sites More sharing options...
Dextrok Posted May 28, 2013 Report Share Posted May 28, 2013 Gracias Noa, oye para que encierras el nivel entre llaves? local coord_map = { {{nivel1},coord1x, coord1y }, {{nivel2},coord2x, coord2y }, {{nivel3},coord3x, coord3y }, {{nivel4},coord4x, coord4y }, {{nivel5},coord5x, coord5y }, {{nivel6},coord6x, coord6y }, {{nivel7},coord7x, coord7y }, {{nivel8},coord8x, coord8y } } Link to comment Share on other sites More sharing options...
Recommended Posts