antiblock
Rodnia | Alpha & Omega
  • Chatbox

    You don't have permission to chat.
    Load More
  • 0
Sign in to follow this  
Epsilon

Script/quest Do Teleportador

Question

Boas pessoal!!!

Tenho uma dúvida enorme. Estava eu a alterar o Teleportador quando decidi meter o custo de yang por teleporte. O que acontece é que pretendo uma coisa um pouco mais avançada. Eu queria que o custo de yang variasse consoante o nível da personagem e o tipo de mapa.

Exemplos:

  • [*]
Se o jogador for de nível 25, irá pagar 100 yangs para entrar no mapa 1 [*]Se o jogador for de nivel 50, irá pagar 200 yangs para entrar no mapa 1 [*]Se o jogador for de nível 25, irá pagar 500 yangs para entrar no mapa 2 [*]Se o jogador for de nível 50, irá pagar 1000 yangs para entrar no mapa 2

Ou seja:
Quero a verificação de nível + custo que existe no metin e também quero verificação do mapa.
Inicialmente eu estava a tentar editar a quest para teleportar para o vale, portanto, só está visualmente editado nessa parte.
A quest está funcional, mas quero alterá-la conforme disse.

Consigo fazer com preços fixos, mas não estou interessado. Quero que o preço varie conforme o mapa escolhido e o nível da personagem.

Agradeço desde já toda a ajuda.

 

Deixo em spoiler o código do script:


say_title ( "Teleportador:" )say ( "Escolhe o local para onde pretendes ir:" )local f = select ( " Vale " , " Deserto " , " Montanha Sohan " , " Templo Negro " , " Página Seguinte " )    if f == 1 then        say_title ( "Teleportador:" )        say ( "Pretendes ir para o Vale Seungryong?" )    local f = select ( "Sim" , "Não" )    if f == 1 and pc.get_level () > 24 then        say ( "Teleportador:" )        say ( "Boa sorte " .. pc . name .. "." )        wait ( )        pc . warp ( 334300 , 736300 )    elseif f == 2 then        say_title("Teleportador")        say ("Como queiras então.")    elseif pc.get_level () < 25 then        say_title("Teleportador")        say ("Não tens nivel suficiente.")end--elseif f == 2 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Voce desejar ir ao Deserto Yonbi." )local f = select ( "Sim" , "Nao" )if f == 1 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Irei lhe teleporta-lo." )say ( "Boa sorte..." )wait ( )pc . warp ( 296800 , 547400 )endelseif f == 3 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Voce deseja ir a Montanha Sohan ?" )local f = select ( "Sim" , "Nao" )if f == 1 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Irei lhe teleporta-lo." )say ( "Boa sorte..." )wait ( )pc . warp ( 436400 , 215600 )endelseif f == 4 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Voce deseja ir ao Templo Miokio ?" )local f = select ( "Sim" , "Nao" )if f == 1 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Irei lhe teleporta-lo." )say ( "Boa sorte..." )wait ( )pc . warp ( 553600 , 143600 )endelseif f == 5 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Aqui esta a 2?? pagina de teleporte" )say ( "Melhorada..." )local f = select ( "Torre Demoniaca" , "Gomi VI" , "Floresta 2" , "Gruta Chun" , "Catacumbas" , "Deserto 2" , "Cidades" )if f == 1 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Voce deseja ir a Torre Demoniaca ?" )local f = select ( "Sim" , "Nao" )if f == 1 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Irei lhe teleporta-lo." )say ( "Boa sorte..." )wait ( )pc . warp ( 589500 , 114000 )endelseif f == 2 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Voce deseja ir a Gomi ?" )local f = select ( "Sim" , "Nao" )if f == 1 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Irei lhe teleporta-lo." )say ( "Boa sorte..." )wait ( )pc . warp ( 346800 , 633400 )endelseif f == 3 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Voce deseja ir a Floresta?" )local f = select ( "Sim" , "Nao" )if f == 1 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Irei lhe teleporta-lo." )say ( "Boa sorte..." )wait ( )pc . warp ( 1.1195e+06 , 70300 )endelseif f == 4 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Voce deseja ir a Gruta chun ?" )local f = select ( "Sim" , "Nao" )if f == 1 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Irei lhe teleporta-lo." )say ( "Boa sorte..." )wait ( )pc . warp ( 284200 , 810500 )endelseif f == 5 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Voce deseja ir a Catacumbas ?" )local f = select ( "Sim" , "Nao" )if f == 1 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Irei lhe teleporta-lo." )say ( "Boa sorte..." )wait ( )pc . warp ( 591100 , 99500 )endelseif f == 6 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Voce deseja ir ao Deserto II ?" )local f = select ( "Sim" , "Nao" )if f == 1 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Irei lhe teleporta-lo." )say ( "Boa sorte..." )wait ( )pc . warp ( 829900 , 763500 )endelseif f == 7 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Voce deseja visitar todas cidades ?" )local f = select ( "Sim" , "Nao" )if f == 1 thensay_verde_claro ( "Teleportador:" )say_branco ( "Boa sorte " .. pc . name .. "." )say ( "Irei lhe dar um anel." )say ( "Boa sorte..." )wait ( )pc . give_item2 ( 70007 , 1 )endendend 

 

Quem ajudar leva +1 :D

Cumps e boas programações

Epsilon

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

Editei a tua primeira parte da quest agora usas a como base para o resto

 

if f == 1 and pc.get_level () > 25 then

        say_title ( "Teleportador:" )
        say ( "Pretendes ir para o Vale Seungryong?" )
say ( "Tem um custo de 1k de yang" )
    local f = select ( "Sim" , "Não" )
if t == 1 then
pc . warp (cordenadas)
    elseif t == 2 then
        say_title("Teleportador")
        say ("Como queiras então.")
    elseif pc.get_level () < 25 then
        say_title("Teleportador")
        say ("Não tens nivel suficiente.")
elseif gold < 1000 then
say ("Nao tens yang suficiente")
end
end
 
onde diz cordenadas metes as cordenadas do mapa
 
NÃO DEU PARA POR EM SPOILER NÃO SEI PK.

Share this post


Link to post
Share on other sites
antiblock
Rodnia | Alpha & Omega
  • 0

 

Editei a tua primeira parte da quest agora usas a como base para o resto

 

if f == 1 and pc.get_level () > 25 then

        say_title ( "Teleportador:" )
        say ( "Pretendes ir para o Vale Seungryong?" )
say ( "Tem um custo de 1k de yang" )
    local f = select ( "Sim" , "Não" )
if t == 1 then
pc . warp (cordenadas)
    elseif t == 2 then
        say_title("Teleportador")
        say ("Como queiras então.")
    elseif pc.get_level () < 25 then
        say_title("Teleportador")
        say ("Não tens nivel suficiente.")
elseif gold < 1000 then
say ("Nao tens yang suficiente")
end
end
 
onde diz cordenadas metes as cordenadas do mapa
 
NÃO DEU PARA POR EM SPOILER NÃO SEI PK.

 

 

Não funcionou e não é isso que pretendo.

Isso mete preço fixo, eu quero que o preço varie conforme o nível como no oficial.

Share this post


Link to post
Share on other sites
  • 0

Vê se isto te ajuda 

quest map_warp begin        state start begin		when 9012.chat."Do you want to travel?" begin			say_title("Teleporter:")			say("")                        local map = pc.get_map_index()                        local empire = pc.get_empire()                        local level = pc.get_level()                        local cost = math.floor(level / 5) * 1000                        if cost < 1000 then                                cost = 1000                        end                        if map == 181 or map == 182 or map == 183 then                        	cost = 0                        end                        if level < 10 then                                ----"123456789012345678901234567890123456789012345678901234567890"|                                 say("Hmm. With your level you can't endure the trip through time")                                say("and space... After you become level 10 you will be ready to")                                say("endure the travel.")                                say("")			elseif map == 1 or map == 3 or map == 21 or map == 23 or map == 41 or map == 43 then				----"123456789012345678901234567890123456789012345678901234567890"| 				say("This is a nice village, but is anything happening here?")				say("")				say("There are special places I could teleport you to. However,")				say("the evil power is growing stronger again; space and time")				say("are falling into chaos. That's why the return is not always")				say("possible. Do you want to teleport yourself there?")				say("")				local main_set = select("Yes","No")				if main_set == 2 then					return				end				say_title("Teleporter:")				say("")				say("Where do you want to teleport yourself?")				say("")				say_reward(string.format("It will cost %d Yang", cost))				say("")				local guild_map_names = {					"County Jungrang",					"County Waryong",					"County Imha",				}				guild_map_name = guild_map_names[empire]				local sub_set = 0				if level < 60 then -- less than 60 : Map of the private Guild, Dragon Valley, Sahara Desert, Ice Mountain					sub_set = select(guild_map_name, "Dragon Valley", "Yongbi Desert", "Mountain Sohan", "Close")					if sub_set == 5 then -- Close						return					end				else -- More than 60 : Demon Tower, Inferna Flame Field					sub_set = select(guild_map_name, "Dragon Valley", "Yongbi Desert", "Mountain Sohan", "More...")					if sub_set == 5 then -- more						say_title("Teleporter:")						say("")						say("These are the places where I can teleport you")						say("after you reach level 60.")						say("")						say_reward(string.format("But it costs %d Yang now.", cost))						say("")						sub_set = select("Doyyumwhaji", "Demon Tower", "Red Wood Forest", "Return...", "Close") + 4						if sub_set == 9 then 							return						end						if sub_set == 8 then -- return							say_title("Teleporter:")							say("")							say("Make up your mind, I'm getting tired.")							say("")							sub_set = select(guild_map_name, "Dragon Valley", "Yongbi Desert", "Mountain Sohan", "Further...")							if sub_set == 5 then -- further again								say_title("Teleporter: ")								say("")								----"123456789012345678901234567890123456789012345678901234567890"| 								say("Close the window if you don't want to teleport yourself.")								say("What are you doing? This is not teleporting training...")								say("")								say_reward(string.format("Anyway, it costs %d Yang", cost))								say("")								sub_set = select("Doyyumwhaji", "Demon Tower", "Red Wood Forest", "Close") + 4							       if sub_set == 8 then 									return								end							end						end					end				end				if pc.gold < cost then					say_title("Teleporter: ")					say("")					----"123456789012345678901234567890123456789012345678901234567890"| 					say("I would teleport you for free but I have a huge family.")					say("")					say("To be able to provide them, I need to make money.")					say("")					say_reward(string.format("It costs %d Yang", cost))					say("")					return				end				pc.changegold(-cost)				local warplist = {				    -- guild_map				    {					{ 135600, 4300 },					{ 179500, 1000 },					{ 271800, 13000 },				    },				    -- 64 map_n_threeway				    {					{ 402100, 673900 },					{ 270400, 739900 },					{ 321300, 808000 },				    },				    -- 63 metin2_map_n_desert_01				    {					{ 217800, 627200 },					{ 221900, 502700 },					{ 344000, 502500 },				    },				    -- 61 map_n_snowm_01				    {					{ 434200, 290600 },					{ 375200, 174900 },					{ 491800, 173600 },				    },				    -- 62 metin2_map_n_flame_01				    {					{ 599400, 756300 },					{ 597800, 622200 },					{ 730700, 689800 },				    },				    -- devil_tower				    {					{ 590500, 110500 },					{ 590500, 110500 },					{ 590500, 110500 },				    },				    -- red wood				    {					{ 1119900, 70800 },					{ 1119900, 70800 },					{ 1119900, 70800 },				    },				}				test_chat(warplist[sub_set][empire][1]..warplist[sub_set][empire][2])				say_title("Teleporter: ")				say("")				say("I will teleport you immediately. You will go to a")				say("dangerous place.")				say("")				say("Take care of yourself...and good luck..")				say("")				wait()				pc.warp(warplist[sub_set][empire][1], warplist[sub_set][empire][2])			else				say("This place is full of dangers. I can bring your back to")				say("your home town, but it's not free. I need to care for my")				say("family, you know.")				say("")				local main_set = select("Yes","No")				if main_set == 2 then					return				end				say_title("Teleporter:")				say("")				say("Where do you wish to be teleported?")				say("")				say_reward(string.format("It will cost %d Yang", cost))				say("")				local sub_set2 = 3				if empire==1 then					sub_set2 = select("Youngan","County Jayang" , locale.cancel)				elseif empire ==2 then					sub_set2 = select("Joan","County Bokjung" , locale.cancel)				elseif empire ==3 then					sub_set2 = select("Pyungmo","County Bakra" , locale.cancel)				end				if sub_set2 != 3 then					if pc.gold < cost then						say_title("Teleporter: ")						say("")						----"123456789012345678901234567890123456789012345678901234567890"| 						say("I would teleport you for free but I have a huge family.")						say("")						say("To be able to provide them, I need to make money.")						say("")						say_reward(string.format("The price is %d Yang", cost))						say("")					elseif sub_set2 == 1 then						say_title("Teleporter: ")						say("")						say("I will teleport you there")						say("")						wait()						if empire == 1 then							pc.warp(474300,954800)						elseif empire == 2 then							pc.warp(63800,166400)						elseif empire == 3 then							pc.warp(959900,269200)						end						pc.changegold(-cost)					elseif sub_set2 == 2 then						say_title("Teleporter: ")						say("")						say("I will teleport you now.")						say("")						wait()						if empire == 1 then							pc.warp(353100,882900)						elseif empire == 2 then							pc.warp(145500,240000)						elseif empire == 3 then							pc.warp(863900,246000)						end						pc.changegold(-cost)					end				end			end -- village teleporter or not		end -- end_of_chat	end -- end_of_stateend -- end_of_quest 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this