Quest nemere

Închis
Avatar utilizator
magicdante91
Nivel 1

Nivel 1
Mesaje: 75
Membru din: 25 Sep 2019, 09:03
Server: Metin2OA
Regat: Jinno
Aprecieri: 142  
Mulţumiri: 3  
Discord: Copiază ID
Medalii

Ce ar trebui sa modific sa fie solo ca cand dau pe statuia din dungeon ma scoate in sohan si imi zice :nemeres_whait_dungeon #RAUS:# Grupul tau nu se afla in dungeon
nemeres_whait_dungeon #RAUS:#debug-> 0 != -1

quest nemere begin
state start begin
-------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------- FUNCTII -----------------------------------------------------------------------------------------------------
function check_dungeon()
say_title("Nemere Dungeon")
if (party.is_party()) then
if not party.is_leader() then
say("")
say_auriu("Imi pare rau, trebuie sa mergi singur.")
say_auriu("Desfinteaza grupul mai intai.")
return
end

if party.get_near_count() == 2 then
say("")
say_auriu("Imi pare rau, trebuie sa mergi singur.")
say_auriu("Desfinteaza grupul mai intai.")
return
end

if party.get_near_count() > 2 then
say("")
say_auriu("Imi pare rau, trebuie sa mergi singur.")
say_auriu("Desfinteaza grupul mai intai.")
return
end
--================================== Lista comenzi Functii
local levelCheckNem = true
local notEnoughLevelMembersNem = {}
local maximlevelCheckNem = true
local notEnoughmaximLevelMembersNem = {}
local ticketCheckNem = true
local notEnoughTicketMembersNem = {}
local timpcheckNem = true
local timpjucatorNem = {}
local pids = {party.get_member_pids()}

--================================== Verificare Nivel Minim
for i, pid in next, pids, nil do
q.begin_other_pc_block(pid)
if pc.get_level() < 100 then
table.insert(notEnoughLevelMembersNem, pc.get_name())
levelCheckNem = false
end

q.end_other_pc_block()
end
---------------------
if not levelCheckNem then
say("")
say_auriu("Daca doresti sa intri in Temnita lui Nemere,")
say_auriu("toti membri grupului trebuie sa aibe")
say_auriu("peste nivelul 100.")
say("")
say_verde2("Urmatori membri ai grupului nu au nivelul necesar:")
for i, name in next, notEnoughLevelMembersNem, nil do
say_verde("- "..name.."")
end
return
end
--================================== Verificare Nivel Maxim
for i, pid in next, pids, nil do
q.begin_other_pc_block(pid)
if pc.get_level() > 110 then
table.insert(notEnoughmaximLevelMembersNem, pc.get_name())
maximlevelCheckNem = false
end

q.end_other_pc_block()
end
---------------------
if not maximlevelCheckNem then
say_auriu("Daca doresti sa intri in Temnita lui Nemere,")
say_auriu("toti membri grupului trebuie sa aibe sub nivelul 110.")
say("")
say_verde2("Urmatori membri ai grupului au nivelul peste:")
for i, name in next, notEnoughmaximLevelMembersNem, nil do
say_verde("- "..name.."")
end
return
end
--================================== Verificare Bilet
for i, pid in next, pids, nil do
q.begin_other_pc_block(pid)
if pc.count_item(71175) < 1 then
table.insert(notEnoughTicketMembersNem, pc.get_name())
ticketCheckNem = false
end

q.end_other_pc_block()
end
---------------------
if not ticketCheckNem then
say("")
say_auriu("Daca doresti sa intri in Temnita lui Nemere,")
say_auriu("toti membri grupului trebuie sa aibe.")
say_item_vnum("71175")
say_verde2("Urmatori membri ai grupului nu au biletul:")
for i, name in next, notEnoughTicketMembersNem, nil do
say_verde("- "..name.."")
end
return
end
--================================== Verificare Timp
for i, pid in next, pids, nil do
q.begin_other_pc_block(pid)
if pc.getf("nemere", "exit_time") >= get_global_time() then
table.insert(timpjucatorNem, pc.get_name())
timpcheckNem = false
end

q.end_other_pc_block()
end
---------------------
if not timpcheckNem then
local time_overNem = (pc.getf("nemere", "exit_time") - get_global_time())
say()
say_auriu("Membrii grupului nu pot intra inca,")
say_auriu("se pare ca mai au de asteptat !")
say_auriu("Numele lor este: ")
say("")

for i, name in next, timpjucatorNem, nil do
if time_overNem < 60 then
say_verde(string.format("- "..name..", mai are de asteptat: %d ore", tonumber(time_overNem)))
elseif time_overNem > 0 then
say_verde(string.format("- "..name..", mai are de asteptat: %d min", tonumber(time_overNem/ 60)))
end
end
return
end
else
if (pc.get_level() < 100 or pc.get_level() > 115) then
say("Trebuie sa ai nivel minim 100 - maxim 115.")
return false;
end

if (pc.count_item(71175) < 1) then
say(string.format("Trebuie sa ai ai 1x - %s.", item_name(71175)))
say_item_vnum("71175")
return false;
end

if pc.getf("nemere", "exit_time") >= get_global_time() then
local time_over = (pc.getf("nemere", "exit_time") - get_global_time());
if time_over < 60 then
say_verde(string.format("- %s, mai are de asteptat: %d ore", pc.get_name(), tonumber(time_over)))
elseif time_over > 0 then
say_verde(string.format("- %s, mai are de asteptat: %d min", pc.get_name(), tonumber(time_over/ 60)))
end return false;
end
end

if (party.is_party()) then
for i, pid in next, pids, nil do
q.begin_other_pc_block(pid)
pc.remove_item(71175, 1)
q.end_other_pc_block()
end
-- else
-- pc.remove_item(71175, 1);
end

--==================================
say("")
say_verde("Dupa ce vei apasa continua")
say_verde("toti membri grupului vor fi teleportati.")
wait()
nemere.make_dungeon()
end -- End Functia CheckDungeon

--================================== Notificare Timp
function NoticeTimeNem()
local secondsLeftNem = (d.getf("timenem") - get_time())
local minutesLeftNem = math.ceil(secondsLeftNem / 60)
if secondsLeftNem > 60 then
d.notice("Timp Ramas: "..minutesLeftNem.." minute!")
else
d.notice("Timp Ramas: "..secondsLeftNem.." secunde!")
end
end
--================================== Curatare Dungeon
function clearall()
d.setf("NemTime", 0)
d.setf("nivelnem",0)
d.setf("timenem", 0)
d.setf("stone_countNem", 0)
d.setf("countNem", 0)
d.setf("metin_countNem", 0)
end
--================================== Omoara Mobii din mapa
function purge()
d.kill_all()
d.clear_regen()
d.check_eliminated()
d.kill_all()
end
--================================== Pozitii Metine
function nem_stone_pos()
local pozitie =
{
{447, 195},
{457, 170},
{446, 146},
{421, 133},
{395, 144},
{389, 191},
}
for i = 1, 5 do
local j = number(i, 6)
if i != j then
local t = pozitie;
pozitie = pozitie[j];
pozitie[j] = t;
end
end
return pozitie
end -- functie
--================================== Initializare Dungeon
function start()
d.notice("A inceput batalia!")
d.setf("NemTime", get_time()) -- set timp pentru sistem dungeon

d.setf("timenem", get_time()+45*60*1) -- pentru notificare timp
nemere.NoticeTimeNem()
local pozitie = nemere.nem_stone_pos()

for i = 1, 5 do -- Spawn metine primu nivel
d.spawn_mob(8052, pozitie[1], pozitie[2])
end
d.spawn_mob(8053, pozitie[6][1], pozitie[6][2])
d.setf("nivelnem", 1)
d.regen_file("data/dungeon/snowdungeon/monstri.txt")
d.notice("Sparge metinul corect pentru a trece la nivelul urmator!")
end
---------------------
when outnem.timer begin
d.notice("S-a scurs timpul, imediat ve-ti merge map1 !")
timer("outnem1", 2700)
end
---------------------
when outnem1.timer begin
nemere.clearall()
warp_all_to_village(pc.get_map_index())
end
--================================== Start Dungeon
function make_dungeon()
if (party.is_party()) then
d.new_jump_party(352, 5541, 1815) -- afara din dungeon
else
d.new_jump(352, 5541*100, 1815*100);
end
end
-------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------- VERIFICARE NIVEL SI INTRARE NEMERE PRIN SOHAN ---------------------------------------------------------------
when 20395.chat."Nemere Dungeon" with pc.get_map_index() == 105 begin
say_title("Nemere Dungeon")
say("")
say_verde("Fortele raului se prezinta in multe forme.")
say_verde("Puterile sale distrugatoare cresc pe zi ce trece.")
say_verde("Regatele incep sa se destrame. Cine este in stare")
say_verde("sa se impotriveasca?")
say_verde("Ultima noastra speranta ramane in oamenii simpli!")
say("")
say_reward("Esti pregatit sa il infrunti pe Nemere?")
if select("Da!","Nu!") == 1 then
if pc.get_level() >= 100 then
pc.warp(529200, 181500)
else
syschat("Nu esti destul de puternic. Revino cand ajungi la nivelul 90.")
end
else
syschat("Revino cand esti pregatit.")
end
end
-------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------- VERIFICARE NIVEL SI INTRARE NEMERE NEMERE MAP -------------------------------------------------------------
when 20397.chat."Nemere Dungeon" with pc.get_map_index() == 352 begin
say_title("Nemere Dungeon")
say("")
say_verde("Fortele raului se prezinta in multe forme.")
say_verde("Puterile sale distrugatoare cresc in fiecare zi.")
say_verde("Regatele incep sa se destrame. Cine este in stare sa se impotriveasca?")
say_verde("Ultima noastra speranta ramane in oamenii simpli!")
say("")
if select("Da, doresc!", "Nu doresc!") == 1 then
nemere.check_dungeon()
end
end
--==================================
when login with pc.get_map_index() >= 3520000 and pc.get_map_index() <= 3529999 begin
timer("outnem", 2700)
if party.is_party() then
if party.is_leader() then
nemere.start()
end
end
end
-------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------- NIVEL 1 - DISTRUGERE METIN ADEVARAT -------------------------------------------------------------------------
when 8053.kill with pc.in_dungeon() and d.getf("nivelnem") == 1 begin
d.notice("Ai distrus metinul corect.")
timer("nivelNem2", 10)
nemere.purge()
nemere.NoticeTimeNem()
end
--==================================
when 8052.kill with pc.in_dungeon() and d.getf("nivelnem") == 1 begin
d.notice("Ai distrus un metin fals.")
end
-------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------- NIVEL 2 - DISTRUGE SIGILIILE --------------------------------------------------------------------------------
when nivelNem2.timer begin
d.set_regen_file("data/dungeon/snowdungeon/monstri.txt")
d.setf("sigiliu_nem", 6)

local pozitie = nemere.nem_stone_pos()
for i = 1, 6 do -- Spawn metine primu nivel
d.spawn_mob(20398, pozitie[1], pozitie[2])
end
d.setf("nivelnem", 2)
nemere.NoticeTimeNem()
end
--==================================
when kill with pc.in_dungeon() and d.getf("nivelnem") == 2 begin --Numbarare pentru cheie
local KILL_FOR_KEY_NEMERE = 230
local k = d.getf("countnem") + 1
d.setf("countnem", k)
if k == KILL_FOR_KEY_NEMERE then
game.drop_item(50084, 1)
d.setf("countnem", 0)
end
end
--==================================
when 20398.take with item.vnum == 50084 and pc.in_dungeon() and d.getf("nivelnem") == 2 begin
npc.purge()
item.remove()
d.setf("sigiliu_nem", d.getf("sigiliu_nem") - 1)
if d.getf("sigiliu_nem") <= 0 then
nemere.purge()
timer("nivelNem3", 6)
d.notice("Ai spart toate sigiliile, asteapta cateva momente pentru urmatorul etaj.");
d.setf("nivelnem",3)
else
d.notice("Ai deschis Sigiliu! Mai ai inca "..d.getf("sigiliu_nem").." |cffADFF2Fde deschis.")
end
end
-------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------- NIVEL 3 - SPARGE TOATE METINELE -----------------------------------------------------------------------------
when nivelNem3.timer begin
d.notice("Distrugeti toate metinele pentru a-l intalni pe Ignitor.")
d.setf("metin_countNem", 6)
local pozitie = nemere.nem_stone_pos()
for i = 1, 6 do --
d.spawn_mob(8054, pozitie[1], pozitie[2])
end
end
--==================================
when 8054.kill with pc.in_dungeon() and d.getf("nivelnem") == 3 begin
d.setf("metin_countNem", d.getf("metin_countNem") - 1)

if d.getf("metin_countNem") <= 0 then
d.notice("Felicitari, a-ti distrus toate metinele.")
timer("nivelNem4", 10)
else
d.notice("Ati distru un metin, mai aveti "..d.getf("metin_countNem")..".")
end
end
-------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------- NIVEL 4 - OMOARA IGNITOR ------------------------------------------------------------------------------------
when nivelNem4.timer begin
d.setf("nivelnem", 4)
d.spawn_mob(6151, 427, 142)
nemere.NoticeTimeNem()
end
--==================================
when 6151.kill with pc.in_dungeon() and d.getf("nivelnem") == 4 begin
nemere.purge()
d.notice("Pregateste-te sa-l infrunti pe Nemere.")
timer("bossnem", 10)
end
--==================================
when bossnem.timer begin
d.jump_all(6047, 1926)
d.set_regen_file("data/dungeon/snowdungeon/nemere.txt")
d.setf("nivelnem", 5)
nemere.NoticeTimeNem()
end
-------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------- NIVEL 5 - OMOARA NEMERE ------------------------------------------------------------------------------------
when 6191.kill with pc.in_dungeon() and d.getf("nivelnem") == 5 begin
notice_all("Cu o ultima suflare de speranta liderul "..pc.get_name().."")
notice_all("Urmat de razboinicii lui de incredere, au reusit sa-l invinga pe Nemere.")

d.setqf2("nemere", "exit_time", get_global_time()+15)

nemere.purge()
nemere.clearall()
timer("endnem", 60)
end
--==================================
when endnem.timer begin
warp_all_to_village(pc.get_map_index())
end

when 30302.use begin
if pc.getf("nemere", "exit_time") > 0 then
pc.setf("nemere", "exit_time", 0)
syschat("Ti-ai resetat timpul Nemere!")
end
end
-------------------------------------------------------------------------------------------------------------------------------------------------
end ----state
end ---- quest
Avatar utilizator
magicdante91
Nivel 1

Nivel 1
Mesaje: 75
Membru din: 25 Sep 2019, 09:03
Server: Metin2OA
Regat: Jinno
Aprecieri: 142  
Mulţumiri: 3  
Discord: Copiază ID
Medalii

up
Avatar utilizator
[RaKu]
Membru Club

Membru Club
Mesaje: 2137
Membru din: 30 Noi 2016, 21:49
Regat: Jinno
Aprecieri: 202  
Mulţumiri: 424  
Discord: Copiază ID
Medalii

Inactiv. Arhivat
Închis
Răspunsuri
0
Vizualizări
224
Răspunsuri
1
Vizualizări
359
Răspunsuri
2
Vizualizări
147
Răspunsuri
1
Vizualizări
264

Înapoi la “Arhivă”

  • Informaţie
  • Cine este conectat

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