Jump to content
  • 0

observer war problem


darkfun3

Question

quest guild_war_observer begin
    state start begin
		when guild_war_observer1.chat."Ðáñáêïëïýèçóç ÐïëÝìïõ "
			or guild_war_observer2.chat."Ðáñáêïëïýèçóç ÐïëÝìïõ " 
			or guild_war_observer3.chat."Ðáñáêïëïýèçóç ÐïëÝìïõ " begin
			local g = guild.get_warp_war_list()
			local gname_table = {}
			table.foreachi(g,
				function(n, p) 
					gname_table[n] = guild.get_name(p[1]).." vs "..guild.get_name(p[2])
				end
			)
			if table.getn(g) == 0 then
				say_title("Áñ÷éöýëáêáò ")
				say("Äåí õðÜñ÷ïõí óõíôå÷íéáêïß ðüëåìïé. ")
				return
			end
			say_title("Áñ÷éöýëáêáò ")
			gname_table[table.getn(g)+1] = locale.confirm
			local s = select_table(gname_table)
			say_reward("Ôé èá èÝëáôå íá óõììåôÝ÷åôå? ")
			if s != table.getn(gname_table) then
				pc.warp_to_guild_war_observer_position(g[s][1], g[s][2])
			end
		end	
    end
end

when they press yes they just stay there they do not teleport

There is even a bug in the war it never ends;p

Link to comment
  • Answers 6
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

6 answers to this question

Recommended Posts

  • 0

ok thanks i got a problem as well with arena_manager if a player enters it kicks him out of the arena but the fight starts anyway . only a gm can stay in the arena and not get kick here is the quest

quest arena_manager begin
	state start begin
		when 20017.chat."Äçìéïõñãßá Áãþíá " begin
			if game.get_event_flag("arena_close") > 0 then
				say_title("Yu-Hwan:")
				say("Ç áßèïõóá åêðáßäåõóçò êáôáóôñÜöçêå ")
				say("áðü ìéá ãåíéêÞ äéá÷åßñéóç ìÜ÷çò. ")				
				return
			end
			if not npc.lock() then
				say_title("Yu-Hwan:")
				say("ÊÜðïéïò Üëëïò Ý÷åé êáôá÷ùñçèåß. ")
				return
			end
			local useMinLevel = 25
			if pc.get_level() < useMinLevel then
				say_title("Yuhwan:")
				say("×ùñßò ôï åðßðåäï "..useMinLevel.." äåí ìðïñþ ")
				say("íá óáò áöÞóù íá óõììåôÜ÷åôå óôïí áãþíá. ")
				npc.unlock()
				return
			else
				say_title("Yuhwan:")
				say("ÃñÜøå ôï üíïìá ôïõ ðáß÷ôç ðïõ èÝëåôå ")
				say("íá áíôáãùíéóôÞôå. ")
				local sname = input()
				if sname == "" then
					say_title("Yu-Hwan:")
					say("Äåí îÝñåéò ðïéïí èÝëåôå íá ")
					say("ðïëåìÞóåôå? ")
					npc.unlock()
					return
				else
					say_title("Yu-Hwan:")
					say(""..pc.name.." Ý÷åé "..sname.." æçôçèåß ãéá ôçí êáôáðïëÝìçóç ôïõ! ")
					wait("")
					local opp_vid = find_pc_by_name(sname)
					if opp_vid == 0 then
						say_title("Yu-Hwan:")
						say(sname.." äåí åßíáé óå áðåõèåßáò óýíäåóç. ")
						npc.unlock()
						return
					elseif opp_vid == pc.get_vid() then
						say_title("Yu-Hwan:")
						say("ÈÝëåôå íá ðïëåìÞóåôå åíÜíôéá ôïõ ")
						say("åáõôïý óáò? ")
						npc.unlock()
						return
					end
                    local old = pc.select(opp_vid)
                    local opp_level = pc.get_level()
                    pc.select(old)
                    if opp_level < useMinLevel then
						say_title("Yuhwan")          
                        say("Ï áíôßðáëüò óáò äåí Ý÷åé áêüìç ôï åðßðåäï 25 ")
                        npc.unlock()
                        return
                    end
                    if not npc.is_near_vid(opp_vid, 10) then
                        say_title("Yuhwan")
                        say(""..sname.." Äåí åßíáé êïíôÜ óáò. ")
                        npc.unlock()
                        return
                    end
                    local a = arena.is_in_arena(opp_vid)
                    if a == 0 then
                        say_title("Yuhwan:")
                        say(""..sname.." Þäç áãùíßæïíôáé. ")
                        npc.unlock()
                        return
                    end
                    say_title("Áðüöáóç ")
                    say(""..pc.name.." ðåñéìÝíåé "..sname.." ")
                    say("íá äå÷ôåß ôçí ðñüêëçóç. ")
                    local agree = confirm(opp_vid, "Èá ðïëåìÞóåôå ôïí "..pc.name.."? ", 30)
                    if agree!= CONFIRM_OK then
						say_title("Yuhwan:")
                        say(""..sname.." Ý÷åé áðïññéöèåß. ")
                        npc.unlock()
                        return
                    end
                    s = arena.start_duel(sname, 3)
                    if s == 0 then
                        say_title("Yu-Hwan:")
                        say("ÕðÜñ÷åé Ýíá ðñüâëçìá. ")
                        say("Ìðïñåßôå íá äïêéìÜóåôå îáíÜ áñãüôåñá? ")
                    elseif s == 2 then
                        say_title("Yu-Hwan:")
                        say("ÊÜðïéïò Üëëïò ðáëåýåé ìüíï. ")
                    elseif s == 3 then
                        say_title("Yu-Hwan:")
                        say("Ç áßèïõóá åêðáßäåõóçò åßíáé ãåìÜôç áõôÞ ôç óôéãìÞ. ")
                        say("ÄïêéìÜóôå îáíÜ áñãüôåñá. ")
                    end					
				end				
			end
		end		
		when 20017.chat."ÐáñáêïëïõèÞóôå ôïí áãþíá " begin
            local g = arena.get_duel_list()
            local arena_name = {}
            local arena_observer = {}
            table.foreachi(g,
                function(n, p)
                arena_name[n] = p[1].." gegen "..p[2]
                arena_observer[n] = { p[3], p[4], p[5] }
                end
            )
            table.insert(arena_name, "Ôïðïèåóåßá ")
            table.insert(arena_observer, 0)
            local count = table.getn(g)
            if count == 0 then
				say_title("Yu-Hwan:")
				say("Åêåßíç ôçí åðï÷Þ êáíåßò äåí áãùíéæþôáí. ")
				return
            else
                say_title("Yu-Hwan:")
                say("ÓÞìåñá ðñáãìáôïðïéÞèçêáí "..count.." áãþíåò êáôÜñôéóçò. ")
                wait()
            end
			if table.getn(g)!= 0 then
                local s = select_table(arena_name)
				if table.getn(arena_observer) == s then
                    return
                end
				if table.getn(arena_observer) >= s then
                    arena.add_observer(arena_observer[s][1], arena_observer[s][2], arena_observer[s][3])
                end
            end
        end
    end
end
Link to comment
  • 0
  • VIP

Add in locale/whatever/settings.lua serverside:

 

arena.add_map(112, 8534, 101, 8564, 101)
arena.add_map(112, 8584, 101, 8614, 101)
arena.add_map(112, 8534, 155, 8564, 155)
arena.add_map(112, 8584, 155, 8514, 155)
 
Assuming your mapindex for metin2_map_duel is 112
 
Then restart server and it should work

 

 

Link to comment

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


  • Read our Rules
  • Activity

    1. 2

      [Python] Code Translator 2 to 3

    2. 0

      bug gaya

    3. 5

      Fix Core Crash (unused serverside packet)

    4. 45

      Chest Drop View

    5. 0

      How to add Python 3.9 script?

    6. 15

      Metin2 Download Center - Specifications & Documentation

    7. 5

      Fix Core Crash (unused serverside packet)

    8. 45

      Chest Drop View

    9. 5

      Fix Core Crash (unused serverside packet)

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