Jump to content

Siege War


Shogun

Recommended Posts

  • Premium

M2 Download Center

This is the hidden content, please
( Internal )

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
  • Metin2 Dev 17
  • Think 1
  • Scream 1
  • Good 4
  • Love 1
  • Love 34
Link to comment
Share on other sites

  • Premium

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.

Link to comment
Share on other sites

  • 3 weeks later...
  • 5 months later...
  • 1 year later...

Announcements



  • Similar Content

  • Activity

    1. 4

      Feeding game source to LLM

    2. 0

      Quest 6/7 Problem

    3. 5

      Effect weapons

    4. 0

      [C++] Fix Core Downer Using Negative Number in GM Codes

    5. 3

      Crystal Metinstone

    6. 4

      Feeding game source to LLM

    7. 113

      Ulthar SF V2 (TMP4 Base)

    8. 4

      Feeding game source to LLM

  • Recently Browsing

    • 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.