Jump to content
  • 0

Help 40k game training arena


antrax16

Question

Hey! 
I have a problem arena manager were as they say , namely fighting training . 

Go to Yu -Yan with two characters and a measure account for 105 gm ,i accept the duel. but the problem is that the account of gm and the other still in pull out and takes him map1 and map2 . 

Is the game somehow have the problem .. I also set the coordinates of settings.lua

See 

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)
add_goto_info("duel", 0, 112, 8574, 126)

Im use this quest 

quest arena_manager begin
	state start begin
		when 20017.chat."Lupta in arena" begin
			if game.get_event_flag("arena_close") > 0 then
				say_title("Yu-Hwan:")
				say("arenaurile de lupta au fost distruse")
				say("Intr-un mare razboi.")				
				return
			end
			if not npc.lock() then
				say_title("Yu-Hwan:")
				say("Altcineva este bagat in lupta.")
				return
			end
			local useMinLevel = 25
			if pc.get_level() < useMinLevel then
				say_title("Yuhwan:")
				say("Nivelul minim este "..useMinLevel.." nu pot sa va bag in arena")
				say("Imi pare rau revina mai tarziu.")
				npc.unlock()
				return
			else
				say_title("Yuhwan:")
				say("Spune-mi numele persoanei cu care")
				say("vrei sa te antrenezi.")
				local sname = input()
				if sname == "" then
					say_title("Yu-Hwan:")
					say("Nu stii cu cine vrei sa te lupti")
					say("serios?")
					npc.unlock()
					return
				else
					say_title("Yu-Hwan:")
					say(""..pc.name.." vrea sa se lupte cu "..sname.." ")
					wait("")
					local opp_vid = find_pc_by_name(sname)
					if opp_vid == 0 then
						say_title("Yu-Hwan:")
						say(sname.." nu este online.")
						npc.unlock()
						return
					elseif opp_vid == pc.get_vid() then
						say_title("Yu-Hwan:")
						say("Tu nu vrei cu adevarat sa")
						say("te bati cu altii?")
						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("Adversarul tau inca nu are nivelul 25!")
                        npc.unlock()
                        return
                    end
                    if not npc.is_near_vid(opp_vid, 10) then
                        say_title("Yuhwan")
                        say(""..sname.." nu este in apropierea ta.")
                        npc.unlock()
                        return
                    end
                    local a = arena.is_in_arena(opp_vid)
                    if a == 0 then
                        say_title("Yuhwan:")
                        say(""..sname.." deja lupta cu cineva.")
                        npc.unlock()
                        return
                    end
                    say_title("Decizia Finala")
                    say(""..pc.name.." il asteapta pe "..sname.."")
                    say("sa accepte duelul.")
                    local agree = confirm(opp_vid, "Vrei sa lupti impotriva lui "..pc.name.." ?", 30)
                    if agree!= CONFIRM_OK then
						say_title("Yuhwan:")
                        say(""..sname.." a refuzat lupta.")
                        npc.unlock()
                        return
                    end
                    s = arena.start_duel(sname, 3)
                    if s == 0 then
                        say_title("Yu-Hwan:")
                        say("A intervenit o probleme neasteptata.")
                        say("Incercati din nou mai tarziu!")
                    elseif s == 2 then
                        say_title("Yu-Hwan:")
                        say("Se lupta cu altcineva.")
                    elseif s == 3 then
                        say_title("Yu-Hwan:")
                        say("arenaul de antrenament este plin in acest moment.")
                        say("Va rugam sa incerci mai tarziu.")
                    end					
				end				
			end
		end		
		when 20017.chat."Urmariti un duel" begin
            local g = arena.get_duel_list()
            local arena_name = {}
            local arena_observer = {}
            table.foreachi(g,
                function(n, p)
                arena_name[n] = p[1].." impotriva "..p[2]
                arena_observer[n] = { p[3], p[4], p[5] }
                end
            )
            table.insert(arena_name, "Inchide")
            table.insert(arena_observer, 0)
            local count = table.getn(g)
            if count == 0 then
				say_title("Yu-Hwan:")
				say("In momentul de fata nimeni nu  lupta.")
				return
            else
                say_title("Yu-Hwan:")
                say("Acum se lupta "..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

Im use game r40250  .

Sorry for my  English.

Link to comment
  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

1 answer to this question

Recommended Posts

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


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