Jump to content
Sign in to follow this  
Shogun

Siege War

Recommended Posts

This is my version of an official event from Metin2 Brazil known as "Guerra da Tocha" (Torch War) there: http://m2.ongame.com.br/eventos/1421-Guerra%20da%20Tocha

 

Requirements

 

Game 407 or higher, the three Castle maps, and fire Signal NPCs. This is part of official client but I can upload it if someone needs it.

 

Most of the stuff is actually done by the siege command, I just made it more user friendly for both player & GM.

 

Best used with my Monarch System

 

Instructions

 

To start the event, talk to the guardian with the bow in town. One of the three kingdoms will become under siege and must defend the Fire Signals on their castle. Players from the defending kingdom can join their castle using the teleporter in town or the Transport Gates found in common maps. Players from other kingdoms can join only from Transport Gates.

 

Once in the castle map you will find a number of beacons or Fire Signals which can be destroyed by the attacking kingdoms. Defenders should prevent this from happening. Fire Signals can drop valuable items (in the official version, 66 armors, 75 weapons and Treasure Chest boxes)

 

If after 30 minutes there is any Fire Signal remaining, the defenders will be able to attack it as well.

 

The event ends when there are no more Signals and the winner is the kingdom which manages to destroy more of them.

 

A video from the event:

 

https://www.youtube.com/watch?v=tO6XpCAPpEM

-- Siege War quest
-- (c) by Shogun 2013-2014
quest siege begin
	state start begin
		when login with game.get_event_flag("siege_war") > 0 begin
			send_letter("Siege War")
		end
		when letter begin
			if game.get_event_flag("siege_war") > 0 then
				local empire = pc.get_empire()
				send_letter("Siege War")
				if game.get_event_flag("siege_war") != 4 and pc.get_level() > 59 then
					local gate_vnum = 20096 + empire
					local v=find_npc_by_vnum(gate_vnum)
					if v != 0 then
						target.vid("__TARGET2__", v, mob_name(gate_vnum))
					elseif game.get_event_flag("siege_war") == empire and (pc.get_map_index() < 181 or pc.get_map_index() > 183) then
						local w=find_npc_by_vnum(9012)
						if w != 0 then
							target.vid("__TARGET__", w, mob_name(9012))
						end
					end
				end
			else
				set_state(start)
			end
		end
		when __TARGET__.target.click or old_man.chat."To the Castle! Quick" with game.get_event_flag("siege_war") == pc.get_empire() begin
			target.delete("__TARGET__")
			if pc.get_level() > 59 then
				local name, pid, date, money = mgmt.monarch_state(pc.get_empire())
				----"123456789012345678901234567890123456789012345678901234567890"| 
				say_title("Teleporter:")
				say("")
				say("Our monarch "..name.." has given instructions to take")
				say("every citizen of age to the Castle.")
				say("")
				say("Are you ready for the battle then?")
				say("")
				local main_set = select("Yes","No")
				if main_set == 2 then
					say_title("Teleporter:")
					say("")
					say("Then go pick up your weapons and hurry up.")
					say("")
					say(locale.empire_names[pc.get_empire()].." needs you.")
					say("")
				else
				    	local empire_castle = 	{
						{975200, 133000},
						{977200, 185000},
						{923900, 183600},
					}
					pc.warp(empire_castle[pc.get_empire()][1], empire_castle[pc.get_empire()][2])
				end
			else
				say_title("Teleporter:")
				say("")
				say("You are not strong enough for this battle.")
				say("")
				say("Come back when you reach level 60.")
				say("")
			end
		end
		when button or info begin
			addimage(20, 12, "siegewar.tga")
			say("")
			say("")
			say("")
			say_title("")
			if game.get_event_flag("siege_war") > 0 then
				if game.get_event_flag("siege_war") == 4 then
					----"123456789012345678901234567890123456789012345678901234567890"|
					say("Hear me, "..locale.empire_names[pc.get_empire()].."s! One of the three castles")
					say("will soon fall under siege.")
					say("")
					say("When the time is ripe, the castle to be attacked will")
					say("be announced. Get your weapons ready!")

				elseif game.get_event_flag("siege_war") == pc.get_empire() then
					say(locale.empire_names[pc.get_empire()].."ns! Our castle is being attacked!")
					say("")
					say("Head to the Teleporter inmediately and help defend the Fire")
					say("Signals. After 30 minutes, we will be allowed to destroy")
					say("them ourselves. This is our only chance to win!")
				else
					say(locale.empire_names[pc.get_empire()].."s! Head inmediately to the "..locale.empire_names[game.get_event_flag("siege_war")].."n castle")
					say("and lay siege to it!")
					say("")
					say("You can access enemy castles from the Teleport Gates found")
					say("in every common map. Our objective is to destroy more Fire")
					say("Signals than our enemies.")
				end
				say("")
				say_reward("The winning kingdom will obtain a bonus.")
				say("")
			else
				say("Siege War has already ended.")
				say("")
			end
		end
		when 11001.chat."GM: Siege War" or 11003.chat."GM: Siege War" or 11005.chat."GM: Siege War" with pc.is_gm() begin
			say_title("Siege War:")
			say("")
			if game.get_event_flag("siege_war") == 4 then
				say("Currently the Siege War is being announced.")
				say("")
				say_reward("IMPORTANT: only start this event from ch99")
				say("")
				local s = select("Start Siege War","Exit this screen")
				if s == 1 then
					local kingdom = 1
					local signals = 5
					say_title("Siege War:")
					say("")
					say("Please select the number of beacons to spawn")
					say("")
					local s = select("Random","Select manually","Exit")
					if s == 1 then
						signals = number(5,10)
					elseif s == 2 then
						say_title("Siege War:")
						say("")
						say("Please enter a number from 5 to 10")
						say("")
						signals = input()
						if signals < 5 or signals > 10 then 
							return
						end
					else
						return
					end
					say_title("Siege War:")
					say("")
					say("Please select which Castle will be the scenario")
					say("of the event.")
					say("")
					local s = select("Random","Select manually","Exit")
					if s == 1 then
						kingdom = number(1,3)
					elseif s == 2 then
						say_title("Siege War:")
						say("")
						say("Please select the kingdom")
						say("")
						kingdom = select("Shinsoo","Chunjo","Jinno","Exit")
						if kingdom == 4 then
							return
						end
					else
						return
					end
					command("siege "..kingdom.." "..signals)
					game.set_event_flag("siege_war",kingdom)
				end
			elseif game.get_event_flag("siege_war") > 0 then
				say("Currently "..locale.empire_names[pc.get_empire()].." is under siege.")
				say("")
				local s = select("Abort event","Remove scroll","Exit this screen")
				if s == 1 then
					syschat("Siege War has finished.")
					command("siege")
					game.set_event_flag("siege_war",0)
				elseif s == 2 then
					game.set_event_flag("siege_war",0)
				end
			else
				say("Siege War is not active at the moment.")
				say("")
				local s = select("Start Announcing","Exit this screen")
				if s == 1 then
					game.set_event_flag("siege_war",4)
					say_title("Siege War:")
					say("")
					say("Announce scroll for Siege War is now ON")
					say("")
				end
			end			
		end  -- w
	end  --s
end --q
  • Love 18

Share this post


Link to post
Hey Shogun ... I was referring to the "commands". 
Thank you for you have answered the question. 
But you quoted: 
"Signal and fire NPCs. This is part of official client but I can upload it if someone needs it." 
 
I refer to it, I use an old client as a matter of taste it.

Share this post


Link to post

npclist

11100	gangyo_patrol_spear
11101	gangyo_patrol_bow
11102	jinno_patrol_spear
11103	jinno_patrol_bow
11104	sinsu_patrol_spear
11105	sinsu_patrol_bow
11106	gangyo_patrol_spear
11107	gangyo_patrol_bow
11108	jinno_patrol_spear
11109	jinno_patrol_bow
11110	sinsu_patrol_spear
11111	sinsu_patrol_bow
11112	gangyo_patrol_spear
11113	gangyo_patrol_bow
11114	jinno_patrol_spear
11115	jinno_patrol_bow
11116	sinsu_patrol_spear
11117	sinsu_patrol_bow
11505	goldenfrog
11506	signal_fire
11507	signal_fire
11508	signal_fire
11509	signal_fire
11510	signal_fire

Yes that's correct.

Share this post


Link to post

Note that with the /frog command you can spawn a golden frog in the castle. When destroyed players get 10kk from it.

/frog empirenumber

So /frog 1 will spawn a golden frog in the inner part of Shinsoo castle.

Share this post


Link to post

Hi,

it's not spawn signals in the maps of castles

and gives me this message when i active the event: SIEGE FAILED

 

can you tell me how to resolve?

Share this post


Link to post

Are you starting the event from ch99?

Share this post


Link to post

no, now i started in ch99

and it's work

 

thanks ^^

Share this post


Link to post

Hey, Shogun.

 

Could you please give me the clientside map ? That would be realy nice mate.

 

Thank you.

Share this post


Link to post

Oh, i am sorry, i mean serverside.

Share this post


Link to post

 

Link Clientside off !!

Someone could upload the maps ( Clientside ) please !!

Thank you!!

Share this post


Link to post

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  
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.