antiblock
https://arwen2.global/
  • Chatbox

    Did you check out our Discord? https://discord.gg/FFdvMjk9xA
    You don't have permission to chat.
    Load More
brenobeas

Dúvida em Quest

13 posts in this topic

Galera bom estou montando uma quest, um evento quando eu ativar o evento em um npc X, vai ter a opção de  teleporta para um mapa X, eu queria saber como eu faço para quando eu finalizar o evento todos retornarem pra city, todos saírem do mapa.

Valendo +1 Se alguém poder ajudar muito obrigado!

Share this post


Link to post
Share on other sites
antiblock
Elveron
11 minutos atrás, GameForge disse:

warp_to_village()

Não funcionou preciso add algo além disso ?

 

Minha quest: 

quest info_arcaluar begin
    state start begin
        when login begin 
            if game.get_event_flag("arco") == 1 then 
                notice("O evento arco de luar está ativo.")
                notice("Vai ate a janela de quest e consulte as informacoes...") 
                
            end 
        end
                        
        when 20087.chat."GM: Arco de Luar " with pc.is_gm() begin
            say_title(mob_name(npc.get_race()))
            say("")
            say("Olá "..pc.get_name().."!")
            say("Oque você deseja ?")
            say("")
            local s = select("Iniciar", "Desligar", "Cancelar")
            if s == 1 then
                game.set_event_flag("arco", 1)
                notice_all("O evento Arco de Luar foi iniciado!")
                notice_all("Boa sorte a todos os jogadores!.")
                notice_all("Vamos aos drops de arcas, para grandes recompensas.")
                
                elseif s == 2 then
                game.set_event_flag("arco", 0)
                notice_all("O evento Arco de Luar foi desativado.")
                warp_to_village()
                
            elseif s == 3 then
            return
            end
        end
        when button or info begin
            if game.get_event_flag("arco") == 1 then
                say("")
                say("Para participar do evento Arco de Luar precisar ser level 99 ")
                say("Vai ao NPC DUOP e teleporta para Atlantida")
                say("Os mobs para drops são: ")
                say("General Lagosta 100 % dropa arca")
                say("Executor Vermelho 20% ")
                say("Eremita Diabólico 20%")
                say("Recomendamos um bom PVM e BUFF para esse Evento")
                say("Ao dropar as Arca clicar nelas para receber sua recompensa")
                say("São vários prêmios, Boa sorte a todos att Staff")
                
            
            end
        end
        when login with game.get_event_flag("arco") == 1 begin
            send_letter("Arco de Luar")
        end
        when login or logout with game.get_event_flag("arco") == 0 begin
            clear_letter()
        end
        
    end
end

 

 

 

OBS> Queria quando clicasse em Desligar geral voltasse pra city

Share this post


Link to post
Share on other sites
14 minutos atrás, GameForge disse:

warp_to_village()

 

Funcionou sim Muito Obrigado cara +1

Share this post


Link to post
Share on other sites
3 minutos atrás, brenobeas disse:

Não funcionou preciso add algo além disso ?

 

Minha quest: 

quest info_arcaluar begin
    state start begin
        when login begin 
            if game.get_event_flag("arco") == 1 then 
                notice("O evento arco de luar está ativo.")
                notice("Vai ate a janela de quest e consulte as informacoes...") 
                
            end 
        end
                        
        when 20087.chat."GM: Arco de Luar " with pc.is_gm() begin
            say_title(mob_name(npc.get_race()))
            say("")
            say("Olá "..pc.get_name().."!")
            say("Oque você deseja ?")
            say("")
            local s = select("Iniciar", "Desligar", "Cancelar")
            if s == 1 then
                game.set_event_flag("arco", 1)
                notice_all("O evento Arco de Luar foi iniciado!")
                notice_all("Boa sorte a todos os jogadores!.")
                notice_all("Vamos aos drops de arcas, para grandes recompensas.")
                
                elseif s == 2 then
                game.set_event_flag("arco", 0)
                notice_all("O evento Arco de Luar foi desativado.")
                warp_to_village()
                
            elseif s == 3 then
            return
            end
        end
        when button or info begin
            if game.get_event_flag("arco") == 1 then
                say("")
                say("Para participar do evento Arco de Luar precisar ser level 99 ")
                say("Vai ao NPC DUOP e teleporta para Atlantida")
                say("Os mobs para drops são: ")
                say("General Lagosta 100 % dropa arca")
                say("Executor Vermelho 20% ")
                say("Eremita Diabólico 20%")
                say("Recomendamos um bom PVM e BUFF para esse Evento")
                say("Ao dropar as Arca clicar nelas para receber sua recompensa")
                say("São vários prêmios, Boa sorte a todos att Staff")
                
            
            end
        end
        when login with game.get_event_flag("arco") == 1 begin
            send_letter("Arco de Luar")
        end
        when login or logout with game.get_event_flag("arco") == 0 begin
            clear_letter()
        end
        
    end
end

 

 

 

OBS> Queria quando clicasse em Desligar geral voltasse pra city

a função usada para fazer isso é warp_to_village() só se vc tiver algum bug

Share this post


Link to post
Share on other sites
Agora, GameForge disse:

a função usada para fazer isso é warp_to_village() só se vc tiver algum bug

 

Funcionou muito obrigado, aproveitando você sabe como eu bloqueio pra não usar pergaminho do retorno dentro de um mapa? tipo bloquear de usar la dentro do mapa!

Share this post


Link to post
Share on other sites
Agora, brenobeas disse:

 

Funcionou muito obrigado, aproveitando você sabe como eu bloqueio pra não usar pergaminho do retorno dentro de um mapa? tipo bloquear de usar la dentro do mapa!

ah ok

 

Em relação ao perga é feito na source

Share this post


Link to post
Share on other sites
Agora, GameForge disse:

ah ok

 

Em relação ao perga é feito na source

Com quest não têm como fazer?

Share this post


Link to post
Share on other sites
Agora, brenobeas disse:

Com quest não têm como fazer?

tem não

Share this post


Link to post
Share on other sites
27 minutos atrás, brenobeas disse:

Com quest não têm como fazer?

Tenta com isto

 

quest block_warpscroll begin
	state start begin
		when click with item.vnum >= 22000 and item.vnum <= 22050 begin
			if(item.get_sub_type() >= 3) then
				local index = {1,21,41}
				for i = 1,table.getn(index),1 do
					if(pc.get_map_index() >= index[i]) then
						syschat("You can't use to this warp scroll on this map..")
						return
					end
				end
			end
		end
	end
end

 

 

local index, são os index dos mapas que queres bloquear, e o item.vnum são os pergaminhos 

 

 

créditos: Ellie

Share this post


Link to post
Share on other sites
1 minuto atrás, .тιαgσ disse:

Tenta com isto

 


quest block_warpscroll begin
	state start begin
		when click with item.vnum >= 22000 and item.vnum <= 22050 begin
			if(item.get_sub_type() >= 3) then
				local index = {1,21,41}
				for i = 1,table.getn(index),1 do
					if(pc.get_map_index() >= index[i]) then
						syschat("You can't use to this warp scroll on this map..")
						return
					end
				end
			end
		end
	end
end

 

 

local index, são os index dos mapas que queres bloquear, e o item.vnum são os pergaminhos 

No meu caso a index é 303, ficaria assim:

 

quest block_warpscroll begin
	state start begin
		when click with item.vnum >= 22000 and item.vnum <= 22050 begin
			if(item.get_sub_type() >= 3) then
				local index = {303}
				for i = 1,table.getn(index),1 do
					if(pc.get_map_index() >= index[i]) then
						syschat("Não pode marcar pergaminho nesse mapa..")
						return
					end
				end
			end
		end
	end
end

Share this post


Link to post
Share on other sites
Agora, brenobeas disse:

No meu caso a index é 303, ficaria assim:

 


quest block_warpscroll begin
	state start begin
		when click with item.vnum >= 22000 and item.vnum <= 22050 begin
			if(item.get_sub_type() >= 3) then
				local index = {303}
				for i = 1,table.getn(index),1 do
					if(pc.get_map_index() >= index[i]) then
						syschat("Não pode marcar pergaminho nesse mapa..")
						return
					end
				end
			end
		end
	end
end

Não te esqueças dos ids do pergaminhos

Share this post


Link to post
Share on other sites
2 minutos atrás, .тιαgσ disse:

Não te esqueças dos ids do pergaminhos

Do jeito que postei ali em cima não funcionou o id do pergaminho é: 22010    Pergaminho do Retorno e o Index do mapa é 303

 

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