antiblock
diamwall
  • Chatbox

    You don't have permission to chat.
    Load More
Keyorh

Pedido-QUEST

5 posts in this topic

Olá, por favor eu estou tendo dificuldade em criar 2 quest , eu não tenho o conhecimento necessario, sei que muitos aqui possui então vim pedir ajuda '=' 

Minhas duvidas são a seguintes

 

QUEST 1

Quero saber como faço para colocar para invocar um monstro quando quebrar a pedra metin. quais comandos devo usar e em qual ordem? 

Por exemplo a pedra metin do 50 [ID 8010] quando quebrar ela quero que aparece um mob ID 180 [urso faminto]

 

QUEST2

Tenho 3 boss 1 em cada cidade quero fazer com que apenas os players de outro reino recebam a recompensa por mata-lo.

Por exemplo:Se o jogador for do reino jinno ele só droparia do boss que fica no reino Shinso e Chunjo .

                        Se o jogador for do reino Chunjo ele só droparia do boss que fica no reino Shinso e Jinno

                        Se o jogador for do reino Shinso ele só droparia do boss que fica no reino Jinno e Chunjo 

Desta forma não seria possivel receber o premio se o player matar o boss do proprio reino. o premio em questão seria 1 traje difrente para cada player de acordo com seu reino.

 

Se alguem de bom coração puder fazer elas para mim ou pelo menos parte seria de grande ajuda*-*

 

Share this post


Link to post
Share on other sites
antiblock
https://arwen2.global/

QUEST1

quest quest1_test begin
	state start begin
		when 8010.kill with not npc.is_pc() begin
			mob.spawn(180, pc.get_x(), pc.get_y(), 0, 0) -- spawn mob vnum 180 @ pc x & y
		end
	end
end

QUEST2
 

quest quest2_test begin
	state start begin
		when BOSS_VNUM.kill with not npc.is_pc() begin
			local village = {1, 21, 41} -- metin2_map_a1, metin2_map_b1, metin2_map_c1

			if pc.get_map_index() != village[pc.get_empire()] then

				if pc.get_empire() == 1 then -- shinsoo player

					local shinsoo_costume = {41033, 41034} -- costumes vnum's
					game.drop_item_with_ownership(shinsoo_costume[math.random(0, table.getn(costume))]) -- 1 item vnum 41033 ~ 41034

				elseif pc.get_empire() == 2 then -- chunjo player

					local chunjo_costume = {41035, 41036} -- costumes vnum's
					game.drop_item_with_ownership(shinsoo_costume[math.random(0, table.getn(costume))]) -- 1 item vnum 41035 ~ 41036

				elseif pc.get_empire() == 3 then -- jinno player

					local chunjo_costume = {41037, 41038} -- costumes vnum's
					game.drop_item_with_ownership(shinsoo_costume[math.random(0, table.getn(costume))]) -- 1 item vnum 41037 ~ 41038

				end
			end
		end
	end
end

 

Share this post


Link to post
Share on other sites
6 horas atrás, OWSAP disse:

QUEST1


quest quest1_test begin
	state start begin
		when 8010.kill with not npc.is_pc() begin
			mob.spawn(180, pc.get_x(), pc.get_y(), 0, 0) -- spawn mob vnum 180 @ pc x & y
		end
	end
end

QUEST2
 


quest quest2_test begin
	state start begin
		when BOSS_VNUM.kill with not npc.is_pc() begin
			local village = {1, 21, 41} -- metin2_map_a1, metin2_map_b1, metin2_map_c1

			if pc.get_map_index() != village[pc.get_empire()] then

				if pc.get_empire() == 1 then -- shinsoo player

					local shinsoo_costume = {41033, 41034} -- costumes vnum's
					game.drop_item_with_ownership(shinsoo_costume[math.random(0, table.getn(costume))]) -- 1 item vnum 41033 ~ 41034

				elseif pc.get_empire() == 2 then -- chunjo player

					local chunjo_costume = {41035, 41036} -- costumes vnum's
					game.drop_item_with_ownership(shinsoo_costume[math.random(0, table.getn(costume))]) -- 1 item vnum 41035 ~ 41036

				elseif pc.get_empire() == 3 then -- jinno player

					local chunjo_costume = {41037, 41038} -- costumes vnum's
					game.drop_item_with_ownership(shinsoo_costume[math.random(0, table.getn(costume))]) -- 1 item vnum 41037 ~ 41038

				end
			end
		end
	end
end

 

Não consegui fazer funcionar pode me ajudar novamente se possivel? 

Share this post


Link to post
Share on other sites
8 minutos atrás, Keyorh disse:

Não consegui fazer funcionar pode me ajudar novamente se possivel? 

 

Na 2ª quest mete assim:

local village = {0, 1, 21, 41}

Isto porquê? Porque na linha seguinte:

if pc.get_map_index() != village[pc.get_empire()] then

pc.get_empire() tem 3 valores possíveis, 1, 2 e 3, e ao usar assim ele vai buscar ao array a segunda posição (se o reino for 1), visto que os arrays começam por 0.

 

Podes também meter assim:

if pc.get_map_index() != village[pc.get_empire() - 1] then

 

Share this post


Link to post
Share on other sites
14 hours ago, Karbust™ # PT said:

 

Na 2ª quest mete assim:


local village = {0, 1, 21, 41}

Isto porquê? Porque na linha seguinte:


if pc.get_map_index() != village[pc.get_empire()] then

pc.get_empire() tem 3 valores possíveis, 1, 2 e 3, e ao usar assim ele vai buscar ao array a segunda posição (se o reino for 1), visto que os arrays começam por 0.

 

Podes também meter assim:


if pc.get_map_index() != village[pc.get_empire() - 1] then

 

 

Em lua não há arrays, há tabelas. Estas começam por 1 e não por 0.

 

@Keyorh experimenta o seguinte:

quest quest2_test begin
	state start begin

		when kill with not npc.is_pc() begin
			local empire = pc.get_empire()
			
			local data = {
				{CHUNJO_BOSS_VNUM, JINNO_BOSS_VNUM, {REWARD1, REWARD2, ETC}}, -- Shinsoo
				{SHINSOO_BOSS_VNUM, JINNO_BOSS_VNUM, {REWARD3, REWARD4, ETC}}, -- Chunjo
				{SHINSOO_BOSS_VNUM, CHUNJO_BOSS_VNUM, {REWARD5, REWARD6, ETC}}, -- Jinno
			}
		
			local rewards = data[empire][3]

			for i = 1, 2 do
				if npc.get_race() == data[empire][i] then
					game.drop_item_with_ownership(rewards[number(1, table.getn(rewards))])
					break
				end
			end
			
		end
	end
end

Tem em conta que deves editar os espaços indicados na tabela data, que são todos os _VNUM e os REWARD.

Share this post


Link to post
Share on other sites