Cerere Quest PvP

Închis
Avatar utilizator
Băiatul Anonim
Nou Venit

Nou Venit
Mesaje: 46
Membru din: 07 Aug 2017, 15:19
Server: În curând...
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 1  
Medalii

Salut,
mi-am băgat pe server mapa pvp, are cineva un quest care poţi face duel 1 vs 1.
Adică să intri în mapă şi să poţi face duel 1 vs 1 şi cel care pierde să-l scoată afară din mapa, iar cel care a câştigat să rămână :-s :-s
Imagine
Afișează semnătura
Avatar utilizator
Asky
Ţepar / Untrusted User

Ţepar / Untrusted User
Mesaje: 1472
Membru din: 08 Oct 2014, 17:32
Regat: Chunjo
Aprecieri: 98  
Mulţumiri: 4811  
Discord: Copiază ID
 Contact:
Medalii

Ăsta e originalul dacă nu mă înșel.
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
Imagine
Afișează semnătura
Avatar utilizator
[Castiel]
Nivel 1

Nivel 1
Mesaje: 87
Membru din: 23 Oct 2017, 14:44
Server: n-am inca
Regat: Chunjo
Aprecieri: 18  
Mulţumiri: 7  
 Contact:
Medalii

Cu placere.
quest arena_manager begin
state start begin
when 20017.chat.gameforge.arena_manager._10_npcChat begin
if game.get_event_flag("arena_close") > 0 then
say_title(gameforge.arena_manager._20_sayTitle)
say(gameforge.arena_manager._30_say)
return
end

if not npc.lock() then
say_title(gameforge.arena_manager._20_sayTitle)
say(gameforge.arena_manager._40_say)
return
end

local useMinLevel = game.get_event_flag("arena_use_min_level")

if useMinLevel == 0 then
useMinLevel = 25 ;
end

if pc.get_level() < useMinLevel then
say_title(gameforge.arena_manager._20_sayTitle)
say(string.format(gameforge.arena_manager._50_say, useMinLevel))
npc.unlock()
return
else
say_title(gameforge.arena_manager._20_sayTitle)
say(gameforge.arena_manager._60_say)

local sname = input()

if sname == "" then
say_title(gameforge.arena_manager._20_sayTitle)
say(gameforge.arena_manager._70_say)
npc.unlock()
return
else
say_title(gameforge.arena_manager._20_sayTitle)
say(string.format(gameforge.arena_manager._80_say, pc.name, sname))
wait("")

local opp_vid = find_pc_by_name(sname)

if opp_vid == 0 then
say_title(gameforge.arena_manager._20_sayTitle)
say(string.format(gameforge.arena_manager._90_say, sname))
npc.unlock()
return
elseif opp_vid == pc.get_vid() then
say_title(gameforge.arena_manager._20_sayTitle)
say(gameforge.arena_manager._100_say)
npc.unlock()
return
end

local old = pc. select(opp_vid , opp_vid )
local opp_level = pc.get_level()
pc. select(old , old )

if opp_level < useMinLevel then
say_title(gameforge.arena_manager._20_sayTitle)
say(string.format(gameforge.arena_manager._110_say, useMinLevel))
npc.unlock()
return
end
if not npc.is_near_vid(opp_vid, 10) then
say_title(gameforge.arena_manager._20_sayTitle)
say(string.format(gameforge.arena_manager._120_say, sname))
npc.unlock()
return ;
end

local a = arena.is_in_arena(opp_vid)
if a == 0 then
say_title(gameforge.arena_manager._20_sayTitle)
say(string.format(gameforge.arena_manager._130_say, sname))
npc.unlock()
return ;
end
say_title(gameforge.arena_manager._140_sayTitle)
say(string.format(gameforge.arena_manager._85_say, pc.name, sname))
local agree = confirm(opp_vid, string.format(gameforge.arena_manager._87_say, sname, pc.name), 30)
if agree!= CONFIRM_OK then
say_title(gameforge.arena_manager._20_sayTitle)
say(string.format(gameforge.arena_manager._150_say, sname))
npc.unlock()
return
end

s = arena.start_duel(sname, 3)

if s == 0 then
say_title(gameforge.arena_manager._20_sayTitle)
say(gameforge.arena_manager._160_say)
elseif s == 2 then
say_title(gameforge.arena_manager._20_sayTitle)
say(gameforge.arena_manager._170_say)
elseif s == 3 then
say_title(gameforge.arena_manager._20_sayTitle)
say(gameforge.arena_manager._180_say)
end
end
end
npc.unlock()
end

when 20017.chat.gameforge.arena_manager._190_npcChat begin
local g = arena.get_duel_list()
local arena_name = {}
local arena_observer = {}

table.foreachi(g,
function(n, p)
arena_name[n] = string.format(gameforge.arena_manager._195_say, p[1], p[2])
arena_observer[n] = { p[3], p[4], p[5] }
end
)

table.insert(arena_name, gameforge.arena_manager._200_tableInsert)
table.insert(arena_observer, 0)

local count = table.getn(g)
if count == 0 then
say_title(gameforge.arena_manager._20_sayTitle)
say(gameforge.arena_manager._210_say)
return ;
else
say_title(gameforge.arena_manager._20_sayTitle)
say(string.format(gameforge.arena_manager._220_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[1], arena_observer[2], arena_observer[3])
end
end
end
end
end
Avatar utilizator
Spyke
Metin Master

Metin Master
Mesaje: 2613
Membru din: 29 Iul 2016, 09:08
Server: Aoem2
Aprecieri: 205  
Mulţumiri: 3918  
Discord: Copiază ID
Medalii

Subiect inactiv 3 zile+
Arhivat.
Închis

Înapoi la “Arhivă”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 15 vizitatori