Aici este quest-ul :
Cod: Selectaţi tot
quest arena_manager begin
state start begin
when 20017.chat."Începe o luptã de antrenament" begin
if game.get_event_flag("arena_close") > 1 then
say_title("Yu-Hwan:")
say("Momentan aceastã arenã este inchisã din motive")
say("mai mult personale.")
return
end
if not npc.lock() then
say_title("Yu-Hwan:")
say("Momentan alt cineva a intrat în arenã.")
say("Revino în câteva momente.")
return
end
local useMinLevel = 1
if pc.get_level() < useMinLevel then
say_title("Yuhwan:")
say("Ai nevoie de nivelul "..useMinLevel.." pentru a intra.")
say("Revino cand ai nivelul necesar.")
npc.unlock()
return
else
say_title("Yuhwan:")
say("Doresti sa participi la o lupta de antrenament?")
say("Atunci spune-mi numele partenerului tau.")
local sname = input()
if sname == "" then
say_title("Yu-Hwan:")
say("Nu stii cu cine vrei sa lupti? Daca nu imi spui")
say("un nume nu poti participa.")
npc.unlock()
return
else
say_title("Yu-Hwan:")
say("Ok, "..pc.name..". Te-ai inscris la o lupta de")
say("antrenament impotriva lui "..sname.." ")
wait("")
local opp_vid = find_pc_by_name(sname)
if opp_vid == 0 then
say_title("Yu-Hwan:")
say(sname.." nu este online momentan. Incearca mai tarziu")
say("sau sabileste cu el o intalnire in arena.")
npc.unlock()
return
elseif opp_vid == pc.get_vid() then
say_title("Yu-Hwan:")
say("Du willst nicht wirklich gegen dich")
say("selber kämpfen oder?")
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("Dein Gegner ist noch nicht Level 25")
npc.unlock()
return
end
if not npc.is_near_vid(opp_vid, 10) then
say_title("Yuhwan")
say(""..sname.." ist nicht in deiner Nähe.")
npc.unlock()
return
end
local a = arena.is_in_arena(opp_vid)
if a == 0 then
say_title("Yuhwan:")
say(""..sname.." kämpft bereits.")
npc.unlock()
return
end
say_title("Entscheidung")
say(""..pc.name.." wartet darauf, dass "..sname.."")
say("die Herausforderung annimmt.")
local agree = confirm(opp_vid, "Möchtest du gegen "..pc.name.." kämpfen?", 30)
if agree!= CONFIRM_OK then
say_title("Yuhwan:")
say(""..sname.." hat abgelehnt.")
npc.unlock()
return
end
s = arena.start_duel(sname, 3)
if s == 0 then
say_title("Yu-Hwan:")
say("Es gibt ein Problem.")
say("Probierst du es später nochmal?")
elseif s == 2 then
say_title("Yu-Hwan:")
say("Jemand anderes kämpft gerade.")
elseif s == 3 then
say_title("Yu-Hwan:")
say("Die Trainingshalle ist inmoment voll.")
say("Probiert es später nochmal.")
end
end
end
end
when 20017.chat."Participã la o luptã de antrenament" 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, "Schließen")
table.insert(arena_observer, 0)
local count = table.getn(g)
if count == 0 then
say_title("Yu-Hwan:")
say("Momentan nu sunt lupte de antrenament.")
return
else
say_title("Yu-Hwan:")
say("Momentan finden "..count.." Trainingskämpfe statt.")
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[1], arena_observer[2], arena_observer[3])
end
end
end
end
end



