*Problemă/Întrebare: Mai jos
Tipologie server(PvM / PvP): 0
*Resursă folosită: *Link exclusiv J4M* 0
*ServerFiles utilizat: --
*Syserr: ---
Poză: -----
*Detalii suplimentare: Intrebarea este cum scot grupa de la nemere si razador... precizez ca am sursa daca este nevoie doar ca nu stiu sa o compilez.. si as vrea sa ma ajutati si la asta daca se poate.
Cum scot grupa
- ##SomeBody
-

- Mesaje: 330
- Membru din: 14 Apr 2021, 17:12
- Server: In lucru...
- Regat: Jinno
- Aprecieri: 443
- Mulţumiri: 71
- Discord: Copiază ID
- ##SomeBody
-

- Mesaje: 330
- Membru din: 14 Apr 2021, 17:12
- Server: In lucru...
- Regat: Jinno
- Aprecieri: 443
- Mulţumiri: 71
- Discord: Copiază ID
imi poti spune cum fac asta ?? un tutorial cv ???
Lasă questurile aici dacă vrei să te ajute cineva.
- ##SomeBody
-

- Mesaje: 330
- Membru din: 14 Apr 2021, 17:12
- Server: In lucru...
- Regat: Jinno
- Aprecieri: 443
- Mulţumiri: 71
- Discord: Copiază ID
*quest flame_dungeon begin
state start begin
--when 20350.chat."Nu ai permis de trecere?" with pc.get_level() >= 95 and pc.count_item(30189) < 1 begin
-- addimage ( 5 , 10 , "portile_iadului.tga" )
-- say("")
-- say("")
-- say("")
-- say("")
-- say("Din intamplare am eu un permis")
-- say("dar te va costa ceva fiindca")
-- say("permisul acesta este cam rar...")
-- say("Costa 10kk (10.000.000 Yang)")
-- say("")
-- say("Doresti sa cumperi unul?")
-- local cump = select("Da", "Nu")
-- if cump == 1 then
-- if pc.get_gold() >= 10000000 then
-- pc.give_item2(30189, 1)
-- pc.changemoney(-10000000)
-- else
-- say("Ce!? nu ai destul Yang?")
-- say("pleaca de aici trantorule")
-- say("nu poti cumpara ceva fara bani!")
-- end
-- end
--end
when 20350.chat."<GM> Elimina timp" with pc.is_gm() begin
say("Exygo ti-a scos timpu'")
pc.setf("flame_dungeon","exit_time",1)
end
function setting()
return
{
["base"]={["x"] = 7424 , ["y"]= 6144 ,},
["floor1_entry"] = {["x"] = 341, ["y"] = 589,},
["bossroom_entry_pos"] = {8109,6867},
["boss_pos"] = {686,637},
["doors_pos"] = {
{320,394},
{293,359},
{333,321},
{378,320},
{400,355},
{394,401}
},
["idoors_pos"] = {
{268,447},
{234,359},
{300,264},
{454,217},
{470,355},
{467,469}
},
["doors_dir"] = {135,90,210,152,90,223},
["idoors_dir"] = {135,90,210,135,90,239},
["dungeon_entry_pos"] = {7762, 6739},-- ??? ?? ???? ?
["DUNGEON_MAN_bpos"] = {690,722},
["DUNGEON_MAN_pos"] = {354,362},
["LEVEL2_STONE_pos"] = {195,352},
["LEVEL4_TARGET_pos"] = {470,175},
["LEVEL5_STONE_pos"] = {
{486, 345},
{511, 336},
{525, 349},
{521, 365},
{503, 372},
{486, 365},
{500, 354}
},
["LEVEL6_TARGET_pos"] = {511,480},
["outside_entry_pos"] = {5994,7563}, --??????? ??? ?
["YAK_pos"] = {376, 397} -- ?? ??
}
end
function is_flamed(idx) -- ???? ??? ??
return idx >= 351 * 10000 and idx < (351 + 1) *10000
end
function make_dungeon() -- ?? ???
local setting = flame_dungeon.setting()
d.new_jump_party (351, setting.floor1_entry.x + setting.base.x , setting.floor1_entry.y + setting.base.y )
-- d.spawn_mob_ac_dir(20385, setting.DUNGEON_MAN_pos[1], setting.DUNGEON_MAN_pos[2],0)
-- d.spawn_mob(YAK,setting.YAK_pos[1],setting.YAK_pos[2])
d.regen_file("data/dungeon/flame_dungeon/npc.txt")
d.setf("level",0)
for i=1,6 do
d.set_unique("door"..i, d.spawn_mob_ac_dir(20387, setting.doors_pos[1], setting.doors_pos[2],setting.doors_dir))
end
for i=1,6 do
d.set_unique("idoor"..i, d.spawn_mob_ac_dir(20388, setting.idoors_pos[1], setting.idoors_pos[2],setting.idoors_dir))
end
d.setf("clear_count",0)
d.setf("started",0)
d.setf("dungeon_enter",0) -- ????? ?????? // ??? : 0 ?? : 1 // ??? ??????? ?? ??
end
function go_boss() -- ??? ??
local setting = flame_dungeon.setting()
if pc.get_level() < 95 then --????
-- syschat(gameforge.flame_dungeon._580_notice)
say(gameforge.flame_dungeon._580_notice)
return
else
-- say_title(gameforge.flame_dungeon._010_say)
say(gameforge.flame_dungeon._010_say)
local warp = select(gameforge.flame_dungeon._020_select,gameforge.flame_dungeon._030_select)
if warp == 1 then
d.setf("level",17)
d.jump_all(setting.bossroom_entry_pos[1],setting.bossroom_entry_pos[2])
d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_fild_boss.txt")
-- d.spawn_mob(20385,setting.DUNGEON_MAN_bpos[1],setting.DUNGEON_MAN_bpos[2])
d.spawn_mob(6091,setting.boss_pos[1],setting.boss_pos[2])
end
end
end
function level_clear() -- ?? ???, ?????, ?????
d.setf("level",0)
d.clear_regen()
d.purge_area(750000,620000,817400,689400) -- ??? -- d.purge() ????
end
function clear_timer(inx) -- ??? ????
clear_server_timer ("flame_dungeon_0m_left_timer", inx)
clear_server_timer ("flame_dungeon_1m_left_timer", inx)
clear_server_timer ("flame_dungeon_5m_left_timer", inx)
clear_server_timer ("flame_dungeon_10m_left_timer", inx)
clear_server_timer ("flame_dungeon_15m_left_timer", inx)
clear_server_timer ("flame_dungeon_30m_left_timer", inx)
clear_server_timer ("flame_dungeon_45m_left_timer", inx)
clear_server_timer ("killed_A_1", inx)
clear_server_timer ("killed_A_2", inx)
clear_server_timer ("flame_dungeon_ticket_remove", inx)
end
when login begin
local idx = pc.get_map_index()
local setting = flame_dungeon.setting()
if idx == 351 then
pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62)
elseif flame_dungeon.is_flamed(idx) then -- ?? ??, ??? ?? ??
------------------------------------------------------------------------------------------------------------------------------------------------------
--??? ??? ???? ???? ???? ?????? ?? ?? ??? ????. ???? ??? ?? ???? ???? ?? ?? ??? ??? ??.
--???? ???? ?? ?? ?? ??? ??? ??, ???? ??? ??? ????? ?? ??? ????? ???? ??? ??? ??? ??.
------------------------------------------------------------------------------------------------------------------------------------------------------
-- pc.set_warp_location(0, 0 , 0) --???? ?? ???? ??? ?? ??
pc.set_warp_location(62, setting.outside_entry_pos[1] , setting.outside_entry_pos[2]) -- ?? ??? ? ??? ????
local ticketGroup = {30189, 1, 71130, 1}
if d.getf("dungeon_enter") == 0 then -- ???? ???
local canPass = false
for i=1, table.getn(ticketGroup),2 do
if pc.count_item(ticketGroup) >= ticketGroup[i+1] then
canPass = true
break
end
end
if get_global_time() - pc.getf("flame_dungeon","exit_time") < 30 * 60 then -- ??????? ????
d.notice(gameforge.flame_dungeon._050_notice)
say(gameforge.flame_dungeon._060_say)
timer("flame_dungeon_warp_timer", 5)
elseif not canPass then
d.notice(gameforge.flame_dungeon._070_notice)
say(gameforge.flame_dungeon._080_say)
timer("flame_dungeon_warp_timer", 5)
elseif pc.get_level() < 95 then
d.notice(gameforge.flame_dungeon._090_notice)
say(gameforge.flame_dungeon._100_say)
timer("flame_dungeon_warp_timer", 5)
end
elseif pc.getf("flame_dungeon","ticket_delete") == 0 then -- ????? ??? ???????
for i=1, table.getn(ticketGroup),2 do
if pc.count_item(ticketGroup) >= ticketGroup[i+1] then
pc.remove_item(ticketGroup, ticketGroup[i+1])
break
end
end
pc.setf("flame_dungeon","ticket_delete",1)
end
else
pc.setf("flame_dungeon","ticket_delete",0)
end
end
when flame_dungeon_warp_timer.timer begin
local setting = flame_dungeon.setting()
pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62)
end
when 20350.chat.gameforge.flame_dungeon._110_npcChat begin
local setting = flame_dungeon.setting()
if party.is_party() then
-- ?? ?? ?? ?? ??? ?????
local party_check = 0
if d.find(party.getf("dungeon_index")) then
party_check = (d.getf_from_map_index("party_leader_pid", party.getf("dungeon_index")) == party.get_leader_pid())
end
if d.find(party.getf("dungeon_index")) and party_check then
if get_global_time() - pc.getf("flame_dungeon","exit_time") < 5 * 60 then -- ?? ?? 5? ??
local dungeon_level = d.getf_from_map_index("level", party.getf("dungeon_index"))
local setting = flame_dungeon.setting()
if dungeon_level == 17 then -- ??
d.new_jump_party (351, setting.floor1_entry.x + setting.base.x , setting.floor1_entry.y + setting.base.y )
else
d.new_jump_party (351, setting.floor1_entry.x + setting.base.x , setting.floor1_entry.y + setting.base.y )
end
else -- 5? ???? ? ?? ??
say_title(mob_name(20350))
say(gameforge.flame_dungeon._590_say)
end
else
local pids = {party.get_member_pids()}
local noTicketMembers = {}
local notEnoughLevelMembers = {}
local ticketCheck = true
local levelCheck = true
local ticketGroup = {30189, 1, 71130, 1}
for i, pid in next, pids, nil do
q.begin_other_pc_block(pid)
local canPass = false
for idx=1, table.getn(ticketGroup),2 do
if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then
canPass = true
break
end
end
if not canPass then
table.insert(noTicketMembers, pc.get_name())
ticketCheck = false
end
if pc.level < 95 then
table.insert(notEnoughLevelMembers, pc.get_name())
levelCheck = false
end
q.end_other_pc_block()
end
if not ticketCheck then
say_title(mob_name(20350))
say(gameforge.flame_dungeon._610_say)
for i, name in next, noTicketMembers, nil do
say(color(1,1,0), " "..name)
end
if levelCheck then
return
else
wait()
end
end
if not levelCheck then
say_title(mob_name(20350))
say(gameforge.flame_dungeon._630_say)
for i, name in next, notEnoughLevelMembers, nil do
say(color(1,1,0), " "..name)
end
return
end
if party.is_leader() then
addimage ( 5 , 10 , "portile_iadului.tga" )
say("")
say("")
say("")
say("")
say(gameforge.flame_dungeon._120_say)
local warp = select(gameforge.flame_dungeon._130_select,gameforge.flame_dungeon._140_select)
if warp == 1 then
if party.is_map_member_flag_lt("exit_time", get_global_time() - 30 * 60 ) then
flame_dungeon.make_dungeon()
else
--say("test : ???? ?? ????? ??? ?????.")
say(gameforge.flame_dungeon._600_say)
end
end
party.setf("flame_dungeon_boss_kill_count", 0)
else
addimage ( 5 , 10 , "portile_iadului.tga" )
say("")
say("")
say("")
say("")
say(gameforge.flame_dungeon._150_say)
end
end
else
say(gameforge.flame_dungeon._160_say)
end
end
-- when 20350.chat."Test : ?????" with is_test_server() begin -- ????
-- local setting = flame_dungeon.setting()
-- pc.setf("flame_dungeon","fdRtest",1)
-- pc.warp( setting.dungeon_entry_pos[1]*100, setting.dungeon_entry_pos[2]*100, 351)
-- end
when 20350.chat."TEST : Init time limit init" with is_test_server() begin -- ????
pc.setf("flame_dungeon","exit_time",get_global_time()-1800)
say("Done")
end
-- when 20385.chat."Test : ?? ??" with is_test_server() begin -- ????
-- say("?? ??? : "..d.count_monster())
-- say("level : "..d.getf("level"))
-- say("Dmap index : "..d.get_map_index())
-- say("Pmap index : "..pc.get_map_index())
-- say("access limit : "..pc.getf("flame_dungeon","exit_time"))
-- say("global time : "..get_global_time())
-- if flame_dungeon.is_flamed(d.get_map_index()) then
-- say("in dungeon") -- is_flamed ?? ??
-- end
-- if d.is_unique_dead("stone1") then
-- say("stone1 is dead")
-- else
-- say("stone1 is not dead")
-- end
-- end
-- when 20385.chat."????" begin -- ????
-- say("??? ???")
-- flame_dungeon.clear_timer(d.get_map_index())
-- flame_dungeon.make_dungeon()
-- end
when 20385.chat."Test : Boss Room" with is_test_server() begin -- ????
flame_dungeon.go_boss()
end
-- < ?? ?? ???>
-- when 20385.chat."???" begin -- ???? ??? ?? ? ?? ???
-- local setting = flame_dungeon.setting()
-- say("??? ????????")
-- local warp = select("??","??")
-- if warp == 1 then
-- pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62)
-- end
-- end
when flame_dungeon_45m_left_timer.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice(string.format(gameforge.flame_dungeon._180_notice, 45))
d.notice(gameforge.flame_dungeon._170_notice)
server_timer('flame_dungeon_30m_left_timer', 15*60, get_server_timer_arg())
end
end
when flame_dungeon_30m_left_timer.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice(string.format(gameforge.flame_dungeon._180_notice, 30))
d.notice(gameforge.flame_dungeon._170_notice)
server_timer('flame_dungeon_15m_left_timer', 15*60, get_server_timer_arg())
end
end
when flame_dungeon_15m_left_timer.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice(string.format(gameforge.flame_dungeon._180_notice, 15))
d.notice(gameforge.flame_dungeon._170_notice)
server_timer('flame_dungeon_5m_left_timer', 10*60, get_server_timer_arg())
end
end
when flame_dungeon_5m_left_timer.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice(string.format(gameforge.flame_dungeon._180_notice, 5))
d.notice(gameforge.flame_dungeon._170_notice)
server_timer('flame_dungeon_1m_left_timer', 4*60, get_server_timer_arg())
end
end
when flame_dungeon_1m_left_timer.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice(string.format(gameforge.flame_dungeon._180_notice, 1))
d.notice(gameforge.flame_dungeon._170_notice)
server_timer ("flame_dungeon_0m_left_timer", 60, get_server_timer_arg())
end
end
when flame_dungeon_0m_left_timer.server_timer begin
local setting = flame_dungeon.setting()
if d.select(get_server_timer_arg()) then
d.notice(gameforge.flame_dungeon._190_notice)
d.notice(gameforge.flame_dungeon._200_notice)
server_timer("dungeon_end_timer",10,d.get_map_index())
end
end
-- <<<< ?? ??>>>> --
when 20385.chat.gameforge.flame_dungeon._210_npcChat with npc.lock() begin -- '0x'? x?? ?? ??? ?? ? ?? ?? , '1x'? x?? ?? ??? ???
local setting = flame_dungeon.setting()
if d.getf("started") == 0 then
say(gameforge.flame_dungeon._230_say)
say(gameforge.flame_dungeon._240_say)
wait()
d.setf("started",1)
-- ???? ?????? ??? ??? exit timer? ???? ???? ????? ????? ????? ?
server_timer ("flame_dungeon_45m_left_timer",15*60, d.get_map_index())
d.notice(gameforge.flame_dungeon._250_notice)
d.notice(gameforge.flame_dungeon._170_notice)
-- ??? ??? ??
-- ?? ?? ??? ?? ??? ???? ??? ???? ??? ??? ????.
local pids = {party.get_member_pids()}
local ticketGroup = {30189, 1, 71130, 1}
for i, pid in next, pids, nil do
q.begin_other_pc_block(pid)
local canPass = false
for idx=1, table.getn(ticketGroup),2 do
if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then
canPass = true
pc.remove_item(ticketGroup[idx], ticketGroup[idx+1])
break
end
end
if canPass == false then
pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62)
end
q.end_other_pc_block()
end
d.setqf2("flame_dungeon","ticket_delete",1)
d.setf("dungeon_enter",1)
-- ??? ??? ??? ?? ??? ????.
party.setf("dungeon_index", d.get_map_index())
d.setf("party_leader_pid", party.get_leader_pid())
end
if d.getf("level") < 7 then --???? ???
if d.getf("clear_count") == 6 then -- ? ??? ??? ???
d.setf("level",7)
else
local rand = number(1,6)--???? ????? ?? ???? ?? ?? ?????? ???
local setlev = 0
d.setf("level",7) -- ?? ?? ??? ?? ??? ?????? ??? ????? ????
for i=1,50 do
setlev = setlev + 1
if setlev > 6 then
setlev = 1
end
if not d.is_unique_dead("door"..setlev) then
rand = rand - 1
if rand == 0 then
d.setf("level",setlev)
d.setf("clear_count",d.getf("clear_count")+1)
break
end
end
end
end
end
if d.getf("level") == 1 then
say(gameforge.flame_dungeon._260_say)
d.notice(gameforge.flame_dungeon._260_say)
d.kill_unique("door1")
d.kill_unique("idoor1")
d.setf("level",11)
d.regen_file ("data/dungeon/flame_dungeon/".."fd_a.txt")
server_timer ("killed_A_1", 12, d.get_map_index())
elseif d.getf("level") == 11 then
say(gameforge.flame_dungeon._270_say)
say_title(gameforge.flame_dungeon._280_sayTitle .. d.count_monster())
elseif d.getf("level") == 2 then
say(gameforge.flame_dungeon._290_say)
say(gameforge.flame_dungeon._300_say)
d.notice(gameforge.flame_dungeon._290_say)
d.notice(gameforge.flame_dungeon._300_say)
d.spawn_mob(20386, setting.LEVEL2_STONE_pos[1], setting.LEVEL2_STONE_pos[2]) -- ??? ??
d.kill_unique("door2")
d.kill_unique("idoor2")
d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_b.txt")
d.setf("level",12)
elseif d.getf("level") == 12 then
say(gameforge.flame_dungeon._310_say)
elseif d.getf("level") == 3 then
say(gameforge.flame_dungeon._260_say)
d.notice(gameforge.flame_dungeon._260_say)
d.kill_unique("door3")
d.kill_unique("idoor3")
d.setf("level",13)
d.regen_file ("data/dungeon/flame_dungeon/".."fd_c.txt")
server_timer ("killed_A_1", 12, d.get_map_index())
elseif d.getf("level") == 13 then
say(gameforge.flame_dungeon._270_say)
say_title(gameforge.flame_dungeon._280_sayTitle..d.count_monster())
elseif d.getf("level") == 4 then -- 474 178
say(gameforge.flame_dungeon._320_notice)
d.notice(gameforge.flame_dungeon._320_notice)
d.setf("level",14)
d.kill_unique("door4")
d.kill_unique("idoor4")
d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_d.txt")
d.spawn_mob(6051,setting.LEVEL4_TARGET_pos[1],setting.LEVEL4_TARGET_pos[2] ) -- ????? ??
elseif d.getf("level") == 14 then
say(gameforge.flame_dungeon._330_say)
say(gameforge.flame_dungeon._340_say)
elseif d.getf("level") == 5 then -- 510 355
say(gameforge.flame_dungeon._350_say)
say(gameforge.flame_dungeon._360_say)
d.notice(gameforge.flame_dungeon._350_say)
d.notice(gameforge.flame_dungeon._360_say)
d.kill_unique("door5")
d.kill_unique("idoor5")
d.setf("level",15)
d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
local vis = { 0,0,0,0,0,0,0}
for i=1,7 do
vis = 0
end
for i = 1, 7 do -- ???? ???
local ran = number(1,7)
local st = 0
for j = 1, 50 do
st = st + 1
if st > 7 then
st = 1
end
if vis[st] == 0 then
ran = ran - 1
if ran == 0 then
vis[st] = 1
d.set_unique("stone5_"..st, d.spawn_mob(20386, setting.LEVEL5_STONE_pos[i][1], setting.LEVEL5_STONE_pos[i][2]))
break
end
end
end
end
elseif d.getf("level") == 15 then
say(gameforge.flame_dungeon._370_say)
elseif d.getf("level") == 6 then -- 507 490
say(gameforge.flame_dungeon._380_say)
d.notice(gameforge.flame_dungeon._380_say)
d.setf("level",16)
d.kill_unique("door6")
d.kill_unique("idoor6")
d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_f.txt")
d.spawn_mob(8057, setting.LEVEL6_TARGET_pos[1],setting.LEVEL6_TARGET_pos[2]) -- ?????? ??
elseif d.getf("level") == 16 then
say(gameforge.flame_dungeon._390_say)
say(gameforge.flame_dungeon._400_say)
elseif d.getf("level") == 7 then
-- setskin(NOWINDOW)
flame_dungeon.go_boss()
else
say(gameforge.flame_dungeon._410_say)
end
npc.unlock()
end
when dungeon_end_timer.server_timer begin -- ?? ??? (??? ????)
local setting = flame_dungeon.setting()
if d.select(get_server_timer_arg()) then
flame_dungeon.clear_timer(d.get_map_index())
d.set_warp_location(62, setting.outside_entry_pos[1] , setting.outside_entry_pos[2])
d.exit_all()
d.setf("party_leader_pid", 0)
end
end
when killed_A_1.server_timer begin -- ??? ???1 (level1,level3)
if d.select(get_server_timer_arg()) then
if d.count_monster() <= 0 then -- 1?? ??? ???
if d.getf("level") == 11 then
d.notice(gameforge.flame_dungeon._420_notice)
d.notice(gameforge.flame_dungeon._430_notice)
else
d.notice(gameforge.flame_dungeon._420_notice)
d.notice(gameforge.flame_dungeon._430_notice)
end
d.setf("level",0)
else
server_timer ("killed_A_2", 6, get_server_timer_arg())
end
end
end
when killed_A_2.server_timer begin -- ??? ???2 (1? 2 ?????? ???)
if d.select(get_server_timer_arg()) then
if d.count_monster() <= 0 then -- 1?? ??? ???
if d.getf("level") == 11 then
d.notice(gameforge.flame_dungeon._420_notice)
d.notice(gameforge.flame_dungeon._430_notice)
else
d.notice(gameforge.flame_dungeon._420_notice)
d.notice(gameforge.flame_dungeon._430_notice)
end
d.setf("level",0)
else
server_timer ("killed_A_1", 6, get_server_timer_arg())
end
end
end
when kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 12 begin -- 2?? ??? ?? ??
local i = number(1, 100) -- 100?? 1 ??? ????
if i == 1 then
game.drop_item (30329, 1)
end
end
when 20386.take with flame_dungeon.is_flamed(pc.get_map_index()) and item.vnum == 30329 and d.getf("level") == 12 begin -- 2?? ?? ????
local i = number(1, 5) -- 5?? 1 ??? ?? ??
if i == 1 then
npc.purge()
item.remove()
d.notice(gameforge.flame_dungeon._440_notice)
d.notice(gameforge.flame_dungeon._430_notice)
flame_dungeon.level_clear()
else
item.remove()
say(gameforge.flame_dungeon._450_say)
end
end
when 6051.kill with pc.in_dungeon() and flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 14 begin
d.notice(gameforge.flame_dungeon._460_notice)
d.notice(gameforge.flame_dungeon._430_notice)
flame_dungeon.level_clear()
end
when kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 15 begin -- 5?? ??? ?? ??
local i = number(1, 30) -- 30?? 1 ??? ????
if i == 1 then
game.drop_item (30330, 1)
end
end
when 20386.take with flame_dungeon.is_flamed(d.get_map_index()) and item.vnum == 30330 and d.getf("level") == 15 begin -- 5?? ???? ????
local setting = flame_dungeon.setting()
if npc.get_vid() == d.get_unique_vid("stone5_1") then -- ??? ?? ????? ? ?? ????? ???? ????
npc.purge()
item.remove()
say(gameforge.flame_dungeon._470_say)
d.setf("stonekill",2) -- 2? ?? ???
if d.count_monster() < 100 then
d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
end
elseif npc.get_vid() == d.get_unique_vid("stone5_2") then
if d.getf("stonekill") == 2 then -- 2??? ?? ??? 2???? ??? ??? ?
npc.purge()
item.remove()
say(gameforge.flame_dungeon._480_say)
d.setf("stonekill",3)
if d.count_monster() < 100 then
d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
end
else
item.remove()
say(gameforge.flame_dungeon._490_say)
-- say("2?")
end
elseif npc.get_vid() == d.get_unique_vid("stone5_3") then
if d.getf("stonekill") == 3 then
npc.purge()
item.remove()
say(gameforge.flame_dungeon._500_say)
d.setf("stonekill",4)
if d.count_monster() < 100 then
d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
end
else
item.remove()
say(gameforge.flame_dungeon._490_say)
-- say("3?")
end
elseif npc.get_vid() == d.get_unique_vid("stone5_4") then
if d.getf("stonekill") == 4 then
npc.purge()
item.remove()
say(gameforge.flame_dungeon._510_say)
d.setf("stonekill",5)
if d.count_monster() < 100 then
d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
end
else
item.remove()
say(gameforge.flame_dungeon._490_say)
-- say("4?")
end
elseif npc.get_vid() == d.get_unique_vid("stone5_5") then
if d.getf("stonekill") == 5 then
npc.purge()
item.remove()
say(gameforge.flame_dungeon._520_say)
d.setf("stonekill",6)
if d.count_monster() < 100 then
d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
end
else
item.remove()
say(gameforge.flame_dungeon._490_say)
-- say("5?")
end
elseif npc.get_vid() == d.get_unique_vid("stone5_6") then
if d.getf("stonekill") == 6 then
npc.purge()
item.remove()
say(gameforge.flame_dungeon._530_say)
d.setf("stonekill",7)
if d.count_monster() < 100 then
d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
end
else
item.remove()
say(gameforge.flame_dungeon._490_say)
-- say("6?")
end
else
if d.getf("stonekill") == 7 then
npc.purge()
item.remove()
d.notice(gameforge.flame_dungeon._440_notice)
d.notice(gameforge.flame_dungeon._430_notice)
flame_dungeon.level_clear()
else
item.remove()
say(gameforge.flame_dungeon._490_say)
-- say("7?")
end
end
end
when 8057.kill with flame_dungeon.is_flamed(d.get_map_index()) and d.getf("level") ==16 begin -- ??? ???? ?
d.notice(gameforge.flame_dungeon._540_notice)
d.notice(gameforge.flame_dungeon._430_notice)
flame_dungeon.level_clear()
end
when 6091.kill with pc.in_dungeon() and flame_dungeon.is_flamed(d.get_map_index()) and d.getf("level") ==17 begin -- ?? ????
d.notice(gameforge.flame_dungeon._550_notice)
d.notice(gameforge.flame_dungeon._560_notice)
--notice_all (""..pc.get_name().." l-a invins pe Razador! Felicitari !")
server_timer("dungeon_end_timer", 60,d.get_map_index())
flame_dungeon.level_clear()
-- ??? ?, ??? ?? ???(104?, 105? ???) ???? ??? ??? ??? ??? ???.
if party.is_party() then
party.setf("flame_dungeon_boss_kill_count", 1)
end
end
end
end
state start begin
--when 20350.chat."Nu ai permis de trecere?" with pc.get_level() >= 95 and pc.count_item(30189) < 1 begin
-- addimage ( 5 , 10 , "portile_iadului.tga" )
-- say("")
-- say("")
-- say("")
-- say("")
-- say("Din intamplare am eu un permis")
-- say("dar te va costa ceva fiindca")
-- say("permisul acesta este cam rar...")
-- say("Costa 10kk (10.000.000 Yang)")
-- say("")
-- say("Doresti sa cumperi unul?")
-- local cump = select("Da", "Nu")
-- if cump == 1 then
-- if pc.get_gold() >= 10000000 then
-- pc.give_item2(30189, 1)
-- pc.changemoney(-10000000)
-- else
-- say("Ce!? nu ai destul Yang?")
-- say("pleaca de aici trantorule")
-- say("nu poti cumpara ceva fara bani!")
-- end
-- end
--end
when 20350.chat."<GM> Elimina timp" with pc.is_gm() begin
say("Exygo ti-a scos timpu'")
pc.setf("flame_dungeon","exit_time",1)
end
function setting()
return
{
["base"]={["x"] = 7424 , ["y"]= 6144 ,},
["floor1_entry"] = {["x"] = 341, ["y"] = 589,},
["bossroom_entry_pos"] = {8109,6867},
["boss_pos"] = {686,637},
["doors_pos"] = {
{320,394},
{293,359},
{333,321},
{378,320},
{400,355},
{394,401}
},
["idoors_pos"] = {
{268,447},
{234,359},
{300,264},
{454,217},
{470,355},
{467,469}
},
["doors_dir"] = {135,90,210,152,90,223},
["idoors_dir"] = {135,90,210,135,90,239},
["dungeon_entry_pos"] = {7762, 6739},-- ??? ?? ???? ?
["DUNGEON_MAN_bpos"] = {690,722},
["DUNGEON_MAN_pos"] = {354,362},
["LEVEL2_STONE_pos"] = {195,352},
["LEVEL4_TARGET_pos"] = {470,175},
["LEVEL5_STONE_pos"] = {
{486, 345},
{511, 336},
{525, 349},
{521, 365},
{503, 372},
{486, 365},
{500, 354}
},
["LEVEL6_TARGET_pos"] = {511,480},
["outside_entry_pos"] = {5994,7563}, --??????? ??? ?
["YAK_pos"] = {376, 397} -- ?? ??
}
end
function is_flamed(idx) -- ???? ??? ??
return idx >= 351 * 10000 and idx < (351 + 1) *10000
end
function make_dungeon() -- ?? ???
local setting = flame_dungeon.setting()
d.new_jump_party (351, setting.floor1_entry.x + setting.base.x , setting.floor1_entry.y + setting.base.y )
-- d.spawn_mob_ac_dir(20385, setting.DUNGEON_MAN_pos[1], setting.DUNGEON_MAN_pos[2],0)
-- d.spawn_mob(YAK,setting.YAK_pos[1],setting.YAK_pos[2])
d.regen_file("data/dungeon/flame_dungeon/npc.txt")
d.setf("level",0)
for i=1,6 do
d.set_unique("door"..i, d.spawn_mob_ac_dir(20387, setting.doors_pos[1], setting.doors_pos[2],setting.doors_dir))
end
for i=1,6 do
d.set_unique("idoor"..i, d.spawn_mob_ac_dir(20388, setting.idoors_pos[1], setting.idoors_pos[2],setting.idoors_dir))
end
d.setf("clear_count",0)
d.setf("started",0)
d.setf("dungeon_enter",0) -- ????? ?????? // ??? : 0 ?? : 1 // ??? ??????? ?? ??
end
function go_boss() -- ??? ??
local setting = flame_dungeon.setting()
if pc.get_level() < 95 then --????
-- syschat(gameforge.flame_dungeon._580_notice)
say(gameforge.flame_dungeon._580_notice)
return
else
-- say_title(gameforge.flame_dungeon._010_say)
say(gameforge.flame_dungeon._010_say)
local warp = select(gameforge.flame_dungeon._020_select,gameforge.flame_dungeon._030_select)
if warp == 1 then
d.setf("level",17)
d.jump_all(setting.bossroom_entry_pos[1],setting.bossroom_entry_pos[2])
d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_fild_boss.txt")
-- d.spawn_mob(20385,setting.DUNGEON_MAN_bpos[1],setting.DUNGEON_MAN_bpos[2])
d.spawn_mob(6091,setting.boss_pos[1],setting.boss_pos[2])
end
end
end
function level_clear() -- ?? ???, ?????, ?????
d.setf("level",0)
d.clear_regen()
d.purge_area(750000,620000,817400,689400) -- ??? -- d.purge() ????
end
function clear_timer(inx) -- ??? ????
clear_server_timer ("flame_dungeon_0m_left_timer", inx)
clear_server_timer ("flame_dungeon_1m_left_timer", inx)
clear_server_timer ("flame_dungeon_5m_left_timer", inx)
clear_server_timer ("flame_dungeon_10m_left_timer", inx)
clear_server_timer ("flame_dungeon_15m_left_timer", inx)
clear_server_timer ("flame_dungeon_30m_left_timer", inx)
clear_server_timer ("flame_dungeon_45m_left_timer", inx)
clear_server_timer ("killed_A_1", inx)
clear_server_timer ("killed_A_2", inx)
clear_server_timer ("flame_dungeon_ticket_remove", inx)
end
when login begin
local idx = pc.get_map_index()
local setting = flame_dungeon.setting()
if idx == 351 then
pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62)
elseif flame_dungeon.is_flamed(idx) then -- ?? ??, ??? ?? ??
------------------------------------------------------------------------------------------------------------------------------------------------------
--??? ??? ???? ???? ???? ?????? ?? ?? ??? ????. ???? ??? ?? ???? ???? ?? ?? ??? ??? ??.
--???? ???? ?? ?? ?? ??? ??? ??, ???? ??? ??? ????? ?? ??? ????? ???? ??? ??? ??? ??.
------------------------------------------------------------------------------------------------------------------------------------------------------
-- pc.set_warp_location(0, 0 , 0) --???? ?? ???? ??? ?? ??
pc.set_warp_location(62, setting.outside_entry_pos[1] , setting.outside_entry_pos[2]) -- ?? ??? ? ??? ????
local ticketGroup = {30189, 1, 71130, 1}
if d.getf("dungeon_enter") == 0 then -- ???? ???
local canPass = false
for i=1, table.getn(ticketGroup),2 do
if pc.count_item(ticketGroup) >= ticketGroup[i+1] then
canPass = true
break
end
end
if get_global_time() - pc.getf("flame_dungeon","exit_time") < 30 * 60 then -- ??????? ????
d.notice(gameforge.flame_dungeon._050_notice)
say(gameforge.flame_dungeon._060_say)
timer("flame_dungeon_warp_timer", 5)
elseif not canPass then
d.notice(gameforge.flame_dungeon._070_notice)
say(gameforge.flame_dungeon._080_say)
timer("flame_dungeon_warp_timer", 5)
elseif pc.get_level() < 95 then
d.notice(gameforge.flame_dungeon._090_notice)
say(gameforge.flame_dungeon._100_say)
timer("flame_dungeon_warp_timer", 5)
end
elseif pc.getf("flame_dungeon","ticket_delete") == 0 then -- ????? ??? ???????
for i=1, table.getn(ticketGroup),2 do
if pc.count_item(ticketGroup) >= ticketGroup[i+1] then
pc.remove_item(ticketGroup, ticketGroup[i+1])
break
end
end
pc.setf("flame_dungeon","ticket_delete",1)
end
else
pc.setf("flame_dungeon","ticket_delete",0)
end
end
when flame_dungeon_warp_timer.timer begin
local setting = flame_dungeon.setting()
pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62)
end
when 20350.chat.gameforge.flame_dungeon._110_npcChat begin
local setting = flame_dungeon.setting()
if party.is_party() then
-- ?? ?? ?? ?? ??? ?????
local party_check = 0
if d.find(party.getf("dungeon_index")) then
party_check = (d.getf_from_map_index("party_leader_pid", party.getf("dungeon_index")) == party.get_leader_pid())
end
if d.find(party.getf("dungeon_index")) and party_check then
if get_global_time() - pc.getf("flame_dungeon","exit_time") < 5 * 60 then -- ?? ?? 5? ??
local dungeon_level = d.getf_from_map_index("level", party.getf("dungeon_index"))
local setting = flame_dungeon.setting()
if dungeon_level == 17 then -- ??
d.new_jump_party (351, setting.floor1_entry.x + setting.base.x , setting.floor1_entry.y + setting.base.y )
else
d.new_jump_party (351, setting.floor1_entry.x + setting.base.x , setting.floor1_entry.y + setting.base.y )
end
else -- 5? ???? ? ?? ??
say_title(mob_name(20350))
say(gameforge.flame_dungeon._590_say)
end
else
local pids = {party.get_member_pids()}
local noTicketMembers = {}
local notEnoughLevelMembers = {}
local ticketCheck = true
local levelCheck = true
local ticketGroup = {30189, 1, 71130, 1}
for i, pid in next, pids, nil do
q.begin_other_pc_block(pid)
local canPass = false
for idx=1, table.getn(ticketGroup),2 do
if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then
canPass = true
break
end
end
if not canPass then
table.insert(noTicketMembers, pc.get_name())
ticketCheck = false
end
if pc.level < 95 then
table.insert(notEnoughLevelMembers, pc.get_name())
levelCheck = false
end
q.end_other_pc_block()
end
if not ticketCheck then
say_title(mob_name(20350))
say(gameforge.flame_dungeon._610_say)
for i, name in next, noTicketMembers, nil do
say(color(1,1,0), " "..name)
end
if levelCheck then
return
else
wait()
end
end
if not levelCheck then
say_title(mob_name(20350))
say(gameforge.flame_dungeon._630_say)
for i, name in next, notEnoughLevelMembers, nil do
say(color(1,1,0), " "..name)
end
return
end
if party.is_leader() then
addimage ( 5 , 10 , "portile_iadului.tga" )
say("")
say("")
say("")
say("")
say(gameforge.flame_dungeon._120_say)
local warp = select(gameforge.flame_dungeon._130_select,gameforge.flame_dungeon._140_select)
if warp == 1 then
if party.is_map_member_flag_lt("exit_time", get_global_time() - 30 * 60 ) then
flame_dungeon.make_dungeon()
else
--say("test : ???? ?? ????? ??? ?????.")
say(gameforge.flame_dungeon._600_say)
end
end
party.setf("flame_dungeon_boss_kill_count", 0)
else
addimage ( 5 , 10 , "portile_iadului.tga" )
say("")
say("")
say("")
say("")
say(gameforge.flame_dungeon._150_say)
end
end
else
say(gameforge.flame_dungeon._160_say)
end
end
-- when 20350.chat."Test : ?????" with is_test_server() begin -- ????
-- local setting = flame_dungeon.setting()
-- pc.setf("flame_dungeon","fdRtest",1)
-- pc.warp( setting.dungeon_entry_pos[1]*100, setting.dungeon_entry_pos[2]*100, 351)
-- end
when 20350.chat."TEST : Init time limit init" with is_test_server() begin -- ????
pc.setf("flame_dungeon","exit_time",get_global_time()-1800)
say("Done")
end
-- when 20385.chat."Test : ?? ??" with is_test_server() begin -- ????
-- say("?? ??? : "..d.count_monster())
-- say("level : "..d.getf("level"))
-- say("Dmap index : "..d.get_map_index())
-- say("Pmap index : "..pc.get_map_index())
-- say("access limit : "..pc.getf("flame_dungeon","exit_time"))
-- say("global time : "..get_global_time())
-- if flame_dungeon.is_flamed(d.get_map_index()) then
-- say("in dungeon") -- is_flamed ?? ??
-- end
-- if d.is_unique_dead("stone1") then
-- say("stone1 is dead")
-- else
-- say("stone1 is not dead")
-- end
-- end
-- when 20385.chat."????" begin -- ????
-- say("??? ???")
-- flame_dungeon.clear_timer(d.get_map_index())
-- flame_dungeon.make_dungeon()
-- end
when 20385.chat."Test : Boss Room" with is_test_server() begin -- ????
flame_dungeon.go_boss()
end
-- < ?? ?? ???>
-- when 20385.chat."???" begin -- ???? ??? ?? ? ?? ???
-- local setting = flame_dungeon.setting()
-- say("??? ????????")
-- local warp = select("??","??")
-- if warp == 1 then
-- pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62)
-- end
-- end
when flame_dungeon_45m_left_timer.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice(string.format(gameforge.flame_dungeon._180_notice, 45))
d.notice(gameforge.flame_dungeon._170_notice)
server_timer('flame_dungeon_30m_left_timer', 15*60, get_server_timer_arg())
end
end
when flame_dungeon_30m_left_timer.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice(string.format(gameforge.flame_dungeon._180_notice, 30))
d.notice(gameforge.flame_dungeon._170_notice)
server_timer('flame_dungeon_15m_left_timer', 15*60, get_server_timer_arg())
end
end
when flame_dungeon_15m_left_timer.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice(string.format(gameforge.flame_dungeon._180_notice, 15))
d.notice(gameforge.flame_dungeon._170_notice)
server_timer('flame_dungeon_5m_left_timer', 10*60, get_server_timer_arg())
end
end
when flame_dungeon_5m_left_timer.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice(string.format(gameforge.flame_dungeon._180_notice, 5))
d.notice(gameforge.flame_dungeon._170_notice)
server_timer('flame_dungeon_1m_left_timer', 4*60, get_server_timer_arg())
end
end
when flame_dungeon_1m_left_timer.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice(string.format(gameforge.flame_dungeon._180_notice, 1))
d.notice(gameforge.flame_dungeon._170_notice)
server_timer ("flame_dungeon_0m_left_timer", 60, get_server_timer_arg())
end
end
when flame_dungeon_0m_left_timer.server_timer begin
local setting = flame_dungeon.setting()
if d.select(get_server_timer_arg()) then
d.notice(gameforge.flame_dungeon._190_notice)
d.notice(gameforge.flame_dungeon._200_notice)
server_timer("dungeon_end_timer",10,d.get_map_index())
end
end
-- <<<< ?? ??>>>> --
when 20385.chat.gameforge.flame_dungeon._210_npcChat with npc.lock() begin -- '0x'? x?? ?? ??? ?? ? ?? ?? , '1x'? x?? ?? ??? ???
local setting = flame_dungeon.setting()
if d.getf("started") == 0 then
say(gameforge.flame_dungeon._230_say)
say(gameforge.flame_dungeon._240_say)
wait()
d.setf("started",1)
-- ???? ?????? ??? ??? exit timer? ???? ???? ????? ????? ????? ?
server_timer ("flame_dungeon_45m_left_timer",15*60, d.get_map_index())
d.notice(gameforge.flame_dungeon._250_notice)
d.notice(gameforge.flame_dungeon._170_notice)
-- ??? ??? ??
-- ?? ?? ??? ?? ??? ???? ??? ???? ??? ??? ????.
local pids = {party.get_member_pids()}
local ticketGroup = {30189, 1, 71130, 1}
for i, pid in next, pids, nil do
q.begin_other_pc_block(pid)
local canPass = false
for idx=1, table.getn(ticketGroup),2 do
if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then
canPass = true
pc.remove_item(ticketGroup[idx], ticketGroup[idx+1])
break
end
end
if canPass == false then
pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62)
end
q.end_other_pc_block()
end
d.setqf2("flame_dungeon","ticket_delete",1)
d.setf("dungeon_enter",1)
-- ??? ??? ??? ?? ??? ????.
party.setf("dungeon_index", d.get_map_index())
d.setf("party_leader_pid", party.get_leader_pid())
end
if d.getf("level") < 7 then --???? ???
if d.getf("clear_count") == 6 then -- ? ??? ??? ???
d.setf("level",7)
else
local rand = number(1,6)--???? ????? ?? ???? ?? ?? ?????? ???
local setlev = 0
d.setf("level",7) -- ?? ?? ??? ?? ??? ?????? ??? ????? ????
for i=1,50 do
setlev = setlev + 1
if setlev > 6 then
setlev = 1
end
if not d.is_unique_dead("door"..setlev) then
rand = rand - 1
if rand == 0 then
d.setf("level",setlev)
d.setf("clear_count",d.getf("clear_count")+1)
break
end
end
end
end
end
if d.getf("level") == 1 then
say(gameforge.flame_dungeon._260_say)
d.notice(gameforge.flame_dungeon._260_say)
d.kill_unique("door1")
d.kill_unique("idoor1")
d.setf("level",11)
d.regen_file ("data/dungeon/flame_dungeon/".."fd_a.txt")
server_timer ("killed_A_1", 12, d.get_map_index())
elseif d.getf("level") == 11 then
say(gameforge.flame_dungeon._270_say)
say_title(gameforge.flame_dungeon._280_sayTitle .. d.count_monster())
elseif d.getf("level") == 2 then
say(gameforge.flame_dungeon._290_say)
say(gameforge.flame_dungeon._300_say)
d.notice(gameforge.flame_dungeon._290_say)
d.notice(gameforge.flame_dungeon._300_say)
d.spawn_mob(20386, setting.LEVEL2_STONE_pos[1], setting.LEVEL2_STONE_pos[2]) -- ??? ??
d.kill_unique("door2")
d.kill_unique("idoor2")
d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_b.txt")
d.setf("level",12)
elseif d.getf("level") == 12 then
say(gameforge.flame_dungeon._310_say)
elseif d.getf("level") == 3 then
say(gameforge.flame_dungeon._260_say)
d.notice(gameforge.flame_dungeon._260_say)
d.kill_unique("door3")
d.kill_unique("idoor3")
d.setf("level",13)
d.regen_file ("data/dungeon/flame_dungeon/".."fd_c.txt")
server_timer ("killed_A_1", 12, d.get_map_index())
elseif d.getf("level") == 13 then
say(gameforge.flame_dungeon._270_say)
say_title(gameforge.flame_dungeon._280_sayTitle..d.count_monster())
elseif d.getf("level") == 4 then -- 474 178
say(gameforge.flame_dungeon._320_notice)
d.notice(gameforge.flame_dungeon._320_notice)
d.setf("level",14)
d.kill_unique("door4")
d.kill_unique("idoor4")
d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_d.txt")
d.spawn_mob(6051,setting.LEVEL4_TARGET_pos[1],setting.LEVEL4_TARGET_pos[2] ) -- ????? ??
elseif d.getf("level") == 14 then
say(gameforge.flame_dungeon._330_say)
say(gameforge.flame_dungeon._340_say)
elseif d.getf("level") == 5 then -- 510 355
say(gameforge.flame_dungeon._350_say)
say(gameforge.flame_dungeon._360_say)
d.notice(gameforge.flame_dungeon._350_say)
d.notice(gameforge.flame_dungeon._360_say)
d.kill_unique("door5")
d.kill_unique("idoor5")
d.setf("level",15)
d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
local vis = { 0,0,0,0,0,0,0}
for i=1,7 do
vis = 0
end
for i = 1, 7 do -- ???? ???
local ran = number(1,7)
local st = 0
for j = 1, 50 do
st = st + 1
if st > 7 then
st = 1
end
if vis[st] == 0 then
ran = ran - 1
if ran == 0 then
vis[st] = 1
d.set_unique("stone5_"..st, d.spawn_mob(20386, setting.LEVEL5_STONE_pos[i][1], setting.LEVEL5_STONE_pos[i][2]))
break
end
end
end
end
elseif d.getf("level") == 15 then
say(gameforge.flame_dungeon._370_say)
elseif d.getf("level") == 6 then -- 507 490
say(gameforge.flame_dungeon._380_say)
d.notice(gameforge.flame_dungeon._380_say)
d.setf("level",16)
d.kill_unique("door6")
d.kill_unique("idoor6")
d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_f.txt")
d.spawn_mob(8057, setting.LEVEL6_TARGET_pos[1],setting.LEVEL6_TARGET_pos[2]) -- ?????? ??
elseif d.getf("level") == 16 then
say(gameforge.flame_dungeon._390_say)
say(gameforge.flame_dungeon._400_say)
elseif d.getf("level") == 7 then
-- setskin(NOWINDOW)
flame_dungeon.go_boss()
else
say(gameforge.flame_dungeon._410_say)
end
npc.unlock()
end
when dungeon_end_timer.server_timer begin -- ?? ??? (??? ????)
local setting = flame_dungeon.setting()
if d.select(get_server_timer_arg()) then
flame_dungeon.clear_timer(d.get_map_index())
d.set_warp_location(62, setting.outside_entry_pos[1] , setting.outside_entry_pos[2])
d.exit_all()
d.setf("party_leader_pid", 0)
end
end
when killed_A_1.server_timer begin -- ??? ???1 (level1,level3)
if d.select(get_server_timer_arg()) then
if d.count_monster() <= 0 then -- 1?? ??? ???
if d.getf("level") == 11 then
d.notice(gameforge.flame_dungeon._420_notice)
d.notice(gameforge.flame_dungeon._430_notice)
else
d.notice(gameforge.flame_dungeon._420_notice)
d.notice(gameforge.flame_dungeon._430_notice)
end
d.setf("level",0)
else
server_timer ("killed_A_2", 6, get_server_timer_arg())
end
end
end
when killed_A_2.server_timer begin -- ??? ???2 (1? 2 ?????? ???)
if d.select(get_server_timer_arg()) then
if d.count_monster() <= 0 then -- 1?? ??? ???
if d.getf("level") == 11 then
d.notice(gameforge.flame_dungeon._420_notice)
d.notice(gameforge.flame_dungeon._430_notice)
else
d.notice(gameforge.flame_dungeon._420_notice)
d.notice(gameforge.flame_dungeon._430_notice)
end
d.setf("level",0)
else
server_timer ("killed_A_1", 6, get_server_timer_arg())
end
end
end
when kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 12 begin -- 2?? ??? ?? ??
local i = number(1, 100) -- 100?? 1 ??? ????
if i == 1 then
game.drop_item (30329, 1)
end
end
when 20386.take with flame_dungeon.is_flamed(pc.get_map_index()) and item.vnum == 30329 and d.getf("level") == 12 begin -- 2?? ?? ????
local i = number(1, 5) -- 5?? 1 ??? ?? ??
if i == 1 then
npc.purge()
item.remove()
d.notice(gameforge.flame_dungeon._440_notice)
d.notice(gameforge.flame_dungeon._430_notice)
flame_dungeon.level_clear()
else
item.remove()
say(gameforge.flame_dungeon._450_say)
end
end
when 6051.kill with pc.in_dungeon() and flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 14 begin
d.notice(gameforge.flame_dungeon._460_notice)
d.notice(gameforge.flame_dungeon._430_notice)
flame_dungeon.level_clear()
end
when kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 15 begin -- 5?? ??? ?? ??
local i = number(1, 30) -- 30?? 1 ??? ????
if i == 1 then
game.drop_item (30330, 1)
end
end
when 20386.take with flame_dungeon.is_flamed(d.get_map_index()) and item.vnum == 30330 and d.getf("level") == 15 begin -- 5?? ???? ????
local setting = flame_dungeon.setting()
if npc.get_vid() == d.get_unique_vid("stone5_1") then -- ??? ?? ????? ? ?? ????? ???? ????
npc.purge()
item.remove()
say(gameforge.flame_dungeon._470_say)
d.setf("stonekill",2) -- 2? ?? ???
if d.count_monster() < 100 then
d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
end
elseif npc.get_vid() == d.get_unique_vid("stone5_2") then
if d.getf("stonekill") == 2 then -- 2??? ?? ??? 2???? ??? ??? ?
npc.purge()
item.remove()
say(gameforge.flame_dungeon._480_say)
d.setf("stonekill",3)
if d.count_monster() < 100 then
d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
end
else
item.remove()
say(gameforge.flame_dungeon._490_say)
-- say("2?")
end
elseif npc.get_vid() == d.get_unique_vid("stone5_3") then
if d.getf("stonekill") == 3 then
npc.purge()
item.remove()
say(gameforge.flame_dungeon._500_say)
d.setf("stonekill",4)
if d.count_monster() < 100 then
d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
end
else
item.remove()
say(gameforge.flame_dungeon._490_say)
-- say("3?")
end
elseif npc.get_vid() == d.get_unique_vid("stone5_4") then
if d.getf("stonekill") == 4 then
npc.purge()
item.remove()
say(gameforge.flame_dungeon._510_say)
d.setf("stonekill",5)
if d.count_monster() < 100 then
d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
end
else
item.remove()
say(gameforge.flame_dungeon._490_say)
-- say("4?")
end
elseif npc.get_vid() == d.get_unique_vid("stone5_5") then
if d.getf("stonekill") == 5 then
npc.purge()
item.remove()
say(gameforge.flame_dungeon._520_say)
d.setf("stonekill",6)
if d.count_monster() < 100 then
d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
end
else
item.remove()
say(gameforge.flame_dungeon._490_say)
-- say("5?")
end
elseif npc.get_vid() == d.get_unique_vid("stone5_6") then
if d.getf("stonekill") == 6 then
npc.purge()
item.remove()
say(gameforge.flame_dungeon._530_say)
d.setf("stonekill",7)
if d.count_monster() < 100 then
d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt")
end
else
item.remove()
say(gameforge.flame_dungeon._490_say)
-- say("6?")
end
else
if d.getf("stonekill") == 7 then
npc.purge()
item.remove()
d.notice(gameforge.flame_dungeon._440_notice)
d.notice(gameforge.flame_dungeon._430_notice)
flame_dungeon.level_clear()
else
item.remove()
say(gameforge.flame_dungeon._490_say)
-- say("7?")
end
end
end
when 8057.kill with flame_dungeon.is_flamed(d.get_map_index()) and d.getf("level") ==16 begin -- ??? ???? ?
d.notice(gameforge.flame_dungeon._540_notice)
d.notice(gameforge.flame_dungeon._430_notice)
flame_dungeon.level_clear()
end
when 6091.kill with pc.in_dungeon() and flame_dungeon.is_flamed(d.get_map_index()) and d.getf("level") ==17 begin -- ?? ????
d.notice(gameforge.flame_dungeon._550_notice)
d.notice(gameforge.flame_dungeon._560_notice)
--notice_all (""..pc.get_name().." l-a invins pe Razador! Felicitari !")
server_timer("dungeon_end_timer", 60,d.get_map_index())
flame_dungeon.level_clear()
-- ??? ?, ??? ?? ???(104?, 105? ???) ???? ??? ??? ??? ??? ???.
if party.is_party() then
party.setf("flame_dungeon_boss_kill_count", 1)
end
end
end
end
- ##SomeBody
-

- Mesaje: 330
- Membru din: 14 Apr 2021, 17:12
- Server: In lucru...
- Regat: Jinno
- Aprecieri: 443
- Mulţumiri: 71
- Discord: Copiază ID
deci primul e de la razador cred ca oricine isi da seama... acum asta de mai joss e de la nemere
quest snowdungeon begin
state start begin
-- Statuia leu inghetat sohan
when 20397.chat."Turnul lui Nemeres" with pc.get_map_index() == 61 begin
say_title2("Statuia Leului de Gheaţă [ENTER]")
say2("Forţele răului se prezintă în multe forme!")
say2("Puterile sale distrugătoare cresc pe zi ce trece, iar regatele încep")
say2("să se destrame pe zi ce trece! Cine este in stare să se împotrivească?")
say2("Ultima noastră speranţă rămâne in oameni simpli![ENTER]")
say_reward("Eşti pregatit să îl înfrunţi?[ENTER]")
if select("Da!","Nu") == 1 then
if pc.get_level() >= 100 then
pc.warp(520800,182000)
else
syschat("Nu eşti destul de puternic. Revino cand ajungi la nivelul 100.")
end
else
syschat("Revino cand esti pregătit!")
end
end
-- end statuia leu inghetat sohan
-- Statuia leu inghetat
when 20397.chat."Turnul lui Nemeres" with pc.get_map_index() == 240 begin
say_title2("Statuia Leului de Gheaţă [ENTER]")
say2("Forţele răului se prezintă în multe forme!")
say2("Puterile sale distrugătoare cresc pe zi ce trece, iar regatele încep")
say2("să se destrame, pe zi ce trece! Cine este in stare să se împotrivească?")
say2("Ultima noastră speranţă rămâne in oameni simpli![ENTER]")
if pc.get_level() >= 100 then
if party.is_party() or pc.is_gm() then
if party.is_leader() or pc.is_gm() then
if pc.count_item(31089) > 0 or pc.is_gm() then
say_reward("Eşti pregatit să îl înfrunţi?[ENTER]")
if select("Da!","Nu") == 1 then
pc.remove_item(31089,1)
d.join(240)
end
else
say_reward("Ai nevoie de următorul item")
say_item_vnum(31089)
end
else
say_reward("Trebuie sa fii liderul grupei!")
end
else
say_reward("Trebuie să faci parte dintr-un grup!")
end
else
say_reward("Trebuie să ai nivelul 100 !")
end
end
-- end statuia leu inghetat
-- Statuia leu inghetat 222222222222222
when 20397.chat."Lăcaşul lui Nemeres" with d.getf("actual_round") == 9 begin
if party.is_leader() or pc.is_gm() then
say_title2("Statuia Leului de Gheaţă [ENTER]")
say2("A fost foarte greu dar in final ai ajuns la sursa răului!")
say2("Maleficul Nemeres te aşteaptă! Eşti pregătit să îl înfrunţi?[ENTER]")
if select("Da!","Nu") == 1 then
if d.getf("used_statue", 0) then
d.setf("used_statue", 1)
syschat("În urmatoarele 10 secunde veţi fi teleportaţi.")
timer("nextlevel",10)
end
end
end
end
-- end statuia leu inghetat 222222222222222
-- func start
when login with pc.get_map_index() >= 2400000 and pc.get_map_index() <= 2405000 begin
d.notice("[Turnul lui Nemeres] Bătălia a început!")
d.notice("[Turnul lui Nemeres] Curăţă camera pentru a avansa! Mult success!")
if party.is_party() then
if party.is_leader() then
snowdungeon.start()
end
else
if pc.is_gm() then
snowdungeon.start()
end
end
end
-- FUNCTII
------
when 20398.take begin
if d.getf("actual_round") == 5 then
if item.get_vnum() == 30332 then
----------------------------------
local sequence = {{1,2,3,4,5,5},{4,3,2,1,5,5},{4,5,3,1,2,2},{5,3,4,2,1,1},{5,1,3,4,2,2}}
if snowdungeon.GetPillarID() == sequence[d.getf("sequence")][d.getf("box_opened")] then
pc.remove_item(item.get_vnum(),1)
npc.purge()
d.setf("box_opened", d.getf("box_opened")+1)
if d.getf("box_opened") == 6 then
d.notice("[Turnul lui Nemeres] Sigiliile au fost deschise. Veţi urca la nivelul 6!")
snowdungeon.purge()
timer("nextlevel",10)
else
d.notice("[Turnul lui Nemeres] Mai ai "..6-d.getf("box_opened").." sigilii de deschis!")
end
elseif snowdungeon.GetPillarID() == false then
syschat("Du-te mai aproape şi trage cheia!")
elseif snowdungeon.GetPillarID() != sequence[d.getf("sequence")][d.getf("box_opened")] then
pc.remove_item(item.get_vnum(),1)
syschat("[Turnul lui Nemeres] Nu ai pus cheia pe sigiliul corect, caută altul!")
end
----------------------------------
end
end
end
when 30331.use begin
if d.getf("actual_round") == 2 then
if pc.get_job() == 3 or pc.get_job() == 7 then
if number(1,8) == 5 then
d.notice("[Turnul lui Nemeres] Ai avut noroc. Cheia a fost perfectă!")
d.notice("[Turnul lui Nemeres] Imediat veţii fi duşi la urmatorul nivel.")
snowdungeon.purge()
timer("nextlevel",10)
else
d.notice("[Turnul lui Nemeres] Cheia nu a fost destul de puternică şi s-a spart.")
d.notice("[Turnul lui Nemeres] Incearcă din nou!")
pc.remove_item(30331,1)
end
else
syschat("Doar un Shaman curajos poate folosi aceasta cheie.")
end
end
end
when 30333.use begin
if pc.get_job() == 3 or pc.get_job() == 7 or pc.get_job() == 1 or pc.get_job() == 5 then
if d.getf("actual_round") == 8 then
if number(1,8) == 5 then
d.notice("[Turnul lui Nemeres] Ai avut noroc. Cheia a fost perfectă!")
d.notice("[Turnul lui Nemeres] Imediat veţii fi duşi la urmatorul nivel.")
snowdungeon.purge()
timer("nextlevel",10)
else
d.notice("[Turnul lui Nemeres] Cheia nu a fost destul de puternică şi s-a spart.")
d.notice("[Turnul lui Nemeres] Incearcă din nou!")
pc.remove_item(30333,1)
end
else
syschat("Doar un saman sau un ninja curajos poate folosi aceasta cheie.")
end
end
end
when kill with pc.get_map_index() >= 2400000 and pc.get_map_index() <= 2405000 begin
if d.getf("actual_round") == 6 and npc.get_race() == 8058 then
d.notice("[Turnul lui Nemeres] Felicitări, aţi distrus sursa puterilor lui Nemeres!")
d.notice("[Turnul lui Nemeres] În câteva momente veţi urca la nivelul 7.")
timer("nextlevel",10)
end
if d.getf("actual_round") == 7 and npc.get_race() == 6151 then
d.notice("[Turnul lui Nemeres] Felicitări, uciderea lui Szel v-a adus cu un pas mai")
d.notice("[Turnul lui Nemeres] aproare de vătălia cu Nemeres!")
snowdungeon.purge()
timer("nextlevel",10)
end
if d.getf("actual_round") == 9 and npc.get_race() == 20399 then
d.notice("[Turnul lui Nemeres] Ultimul pilon din defensiva lui Nemeres a fost dărâmat!")
d.notice("[Turnul lui Nemeres] Sufletul leului de gheaţă a apărut!")
snowdungeon.purge()
d.spawn_mob(20397, 848, 669)
end
if d.getf("actual_round") == 10 and npc.get_race() == 6191 then
d.notice("[Turnul lui Nemeres] Felicitări, aţi reuşit sa-l învingeţi pe Nemeres!")
d.setf("actual_round","0")
------------------
-- local time = get_time()
-- d.setqf2("snowdungeon","daily_nemeres_last_kill", time)
-- d.setqf2("snowdungeon","daily_nemeres", 1)
------------------
d.clear_regen()
d.kill_all()
d.spawn_mob(9012, 928, 338)
timer("exit_snow", 60)
d.notice("În 60 de secunde veţi fi teleportaţi afară!")
end
if d.getf("actual_round") == 1 then
d.setf("kill_count_sd1",d.getf("kill_count_sd1") +1)
if d.getf("kill_count_sd1") == d.getf("sd_kill_to_next") then
d.notice("[Turnul lui Nemeres] Aţi terminat primul nivel!")
d.notice("[Turnul lui Nemeres] În cateva momente veţi urca la nivelul 2.")
snowdungeon.purge()
timer("nextlevel",10)
end
elseif d.getf("actual_round") == 2 then
if number(1,20) == 11 then
game.drop_item_with_ownership(30331,1)
end
elseif d.getf("actual_round") == 3 then
d.setf("kill_count_sd3",d.getf("kill_count_sd3") +1)
if d.getf("kill_count_sd3") == d.getf("sd3_kill_to_next") then
snowdungeon.purge()
d.notice("[Turnul lui Nemeres] Aţi terminat al 3lea nivel!")
d.notice("[Turnul lui Nemeres] În câteva momente veţi urca la nivelul 4.")
timer("nextlevel",10)
end
elseif d.getf("actual_round") == 4 then
d.setf("kill_count_sd4",d.getf("kill_count_sd4") +1)
if d.getf("kill_count_sd4") == d.getf("sd4_kill_to_next") then
snowdungeon.purge()
d.notice("[Turnul lui Nemeres] Al doilea val a fost nimicit!")
d.notice("[Turnul lui Nemeres] In cateva momente veţi urca la nivelul 5.")
timer("nextlevel",10)
end
elseif d.getf("actual_round") == 5 then
if number(1,25) == 19 then
game.drop_item_with_ownership(30332,1)
end
elseif d.getf("actual_round") == 6 then
d.setf("kill_count_sd6",d.getf("kill_count_sd6") +1)
if d.getf("kill_count_sd6") == d.getf("sd6_kill_to_next") then
d.notice("[Turnul lui Nemeres] Ce se întâmplă? Se zăreşte ceva albastru pe cer!?")
snowdungeon.purge()
timer("level7metin",5)
end
elseif d.getf("actual_round") == 8 then
if number(1,25) == 11 then
game.drop_item_with_ownership(30333,1)
end
end
end
------
when level7metin.timer begin
if d.getf("actual_round") == 6 then
d.spawn_mob(8058, 570, 649)
end
end
when nextlevel.timer begin
if d.getf("actual_round") == 1 then
-- NIVEL 2
d.jump_all(5120+760,1536+270)
d.setf("actual_round",2)
d.set_regen_file("data/dungeon/snowdungeon/nivel_2.txt")
d.notice("[Turnul lui Nemeres] Aţi ajuns la nivelul 2!")
d.notice("[Turnul lui Nemeres] Caută Cheia pentru a putea avansa la urmatorul nivel.")
elseif d.getf("actual_round") == 2 then
-- NIVEL 3
d.jump_all(5120+210,1536+438)
d.setf("actual_round",3)
d.setf("kill_count_sd3","0")
d.setf("sd3_kill_to_next","300") -- NUMARUL DE MOBI PANA LA URMATORUL NIVEL DE MODIFICAT in 250
d.set_regen_file("data/dungeon/snowdungeon/nivel_3.txt")
d.notice("[Turnul lui Nemeres] Aţi ajuns la nivelul 3!")
d.notice("[Turnul lui Nemeres] Ucideţi armata lui Nemeres pentru a putea avansa.")
elseif d.getf("actual_round") == 3 then
-- NIVEL 4
d.jump_all(5120+420,1536+260)
d.setf("actual_round",4)
d.setf("kill_count_sd4","0")
d.setf("sd4_kill_to_next","300") -- NUMARUL DE MOBI PANA LA URMATORUL NIVEL DE MODIFICAT in 250
d.set_regen_file("data/dungeon/snowdungeon/nivel_4.txt")
d.notice("[Turnul lui Nemeres] Aţi ajuns la nivelul 4! Un alt val din armata lui Nemeres atacă pe neaşteptate!")
d.notice("[Turnul lui Nemeres] Distrugeţi-i pe toţi pentru a putea avansa!")
elseif d.getf("actual_round") == 4 then
-- NIVEL 5
d.jump_all(5120+421,1536+533)
d.setf("actual_round",5)
d.set_regen_file("data/dungeon/snowdungeon/nivel_5.txt")
-------------
local sequence = {{1,2,3,4,5},{4,3,2,1,5},{4,5,3,1,2},{5,3,4,2,1},{5,1,3,4,2}}
local n = number(1,5)
local coords = {{391,490},{451,490},{463,455},{380,456},{420,422}}
for i = 1, 5 do
d.spawn_mob(20398, coords[1],coords[2])
end
d.setf("box_opened", 1)
d.setf("sequence",n)
-----------
d.notice("[Turnul lui Nemeres] Aţi ajuns la nivelul 5.")
d.notice("[Turnul lui Nemeres] Trecerea este sigilitată de gheaţă.")
d.notice("[Turnul lui Nemeres] Deschide sigiliile pentru a putea avansa!")
elseif d.getf("actual_round") == 5 then
-- NIVEL 6
d.jump_all(5120+570,1536+690)
d.setf("actual_round",6)
d.setf("kill_count_sd6","0")
d.setf("sd6_kill_to_next","200") -- NUMARUL DE MOBI PANA LA URMATORUL NIVEL DE MODIFICAT in 250
d.set_regen_file("data/dungeon/snowdungeon/nivel_6.txt")
d.notice("[Turnul lui Nemeres] Aţi ajuns la nivelul 6!")
d.notice("[Turnul lui Nemeres] Trupele lu Nemeres au început să se destrame!")
elseif d.getf("actual_round") == 6 then
-- NIVEL 7
d.jump_all(5120+747,1536+517)
d.setf("actual_round",7)
d.regen_file("data/dungeon/snowdungeon/nivel_7.txt")
d.spawn_mob(6151, 747, 442)
d.spawn_mob(6151, 768, 475)
d.spawn_mob(6151, 735, 486)
d.notice("[Turnul lui Nemeres] Aţi ajuns la nivelul 7!")
d.notice("[Turnul lui Nemeres] Distrugeţi-i pe cei 3 Iakari pentru a putea trece mai departe.")
elseif d.getf("actual_round") == 7 then
-- NIVEL 8
d.jump_all(5120+303,1536+711)
d.setf("actual_round",8)
d.set_regen_file("data/dungeon/snowdungeon/nivel_8.txt")
d.notice("[Turnul lui Nemeres] Aţi ajuns la nivelul 8!")
d.notice("[Turnul lui Nemeres] Caută Cheia pentru a putea avansa la urmatorul nivel.")
elseif d.getf("actual_round") == 8 then
-- NIVEL 9
d.jump_all(5120+848,1536+689)
d.set_regen_file("data/dungeon/snowdungeon/nivel_9.txt")
d.setf("actual_round",9)
d.spawn_mob(20399, 849, 659)
d.notice("[Turnul lui Nemeres] Aţi ajuns la nivelul 9!")
d.notice("[Turnul lui Nemeres] Distrugeţi Pilonul Dragonului.")
elseif d.getf("actual_round") == 9 then
-- NIVEL 10 BOSS ROOM
d.setf("used_statue", 0)
d.spawn_mob(6191, 927, 323)
d.jump_all(5120+928,1536+390)
d.setf("actual_round",10)
d.set_regen_file("data/dungeon/snowdungeon/nivel_10.txt")
end
snowdungeon.NoticeTime()
end
function start()
d.set_regen_file("data/dungeon/snowdungeon/nivel_1.txt")
d.setf("actual_round",1)
d.setf("time", get_time()+60*60*1)
d.setf("sd_kill_to_next",300) --------------------------------------------------- DE MODIFICAT LA FINAL in 300
d.setf("kill_count_sd1",0)
server_timer("snowdungeontime",3600,pc.get_map_index())
--server_loop_timer("snowdungeontimenotice",300)
snowdungeon.NoticeTime()
end
when snowdungeontimenotice.server_timer begin
if pc.get_map_index()<= 2405000 then
snowdungeon.NoticeTime()
end
end
function GetPillarID()
if pc.get_local_x() >= 391 - 5 and pc.get_local_x() <= 391 + 5 and pc.get_local_y() >= 490 - 5 and pc.get_local_y() <= 490 + 5 then
return 1
elseif pc.get_local_x() >= 451 - 5 and pc.get_local_x() <= 451 + 5 and pc.get_local_y() >= 490 - 5 and pc.get_local_y() <= 490 + 5 then
return 2
elseif pc.get_local_x() >= 463 - 5 and pc.get_local_x() <= 463 + 5 and pc.get_local_y() >= 455 - 5 and pc.get_local_y() <= 455 + 5 then
return 3
elseif pc.get_local_x() >= 380 - 5 and pc.get_local_x() <= 380 + 5 and pc.get_local_y() >= 456 - 5 and pc.get_local_y() <= 456 + 5 then
return 4
elseif pc.get_local_x() >= 420 - 5 and pc.get_local_x() <= 420 + 5 and pc.get_local_y() >= 422 - 5 and pc.get_local_y() <= 422 + 5 then
return 5
else
return false
end
end
when snowdungeontime.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("Ai la dispozitie!")
d.exit_all()
end
end
when exit_snow.timer begin
d.exit_all()
end
function NoticeTime()
local secondsLeft = (d.getf("time") - get_time())
local minutesLeft = math.ceil(secondsLeft / 60)
d.notice("[Turnul lui Nemeres] Timp Ramas: "..minutesLeft.." Minute!")
end
function purge()
d.kill_all()
d.clear_regen()
end
-- FINAL DE QUEST
end
end
quest snowdungeon begin
state start begin
-- Statuia leu inghetat sohan
when 20397.chat."Turnul lui Nemeres" with pc.get_map_index() == 61 begin
say_title2("Statuia Leului de Gheaţă [ENTER]")
say2("Forţele răului se prezintă în multe forme!")
say2("Puterile sale distrugătoare cresc pe zi ce trece, iar regatele încep")
say2("să se destrame pe zi ce trece! Cine este in stare să se împotrivească?")
say2("Ultima noastră speranţă rămâne in oameni simpli![ENTER]")
say_reward("Eşti pregatit să îl înfrunţi?[ENTER]")
if select("Da!","Nu") == 1 then
if pc.get_level() >= 100 then
pc.warp(520800,182000)
else
syschat("Nu eşti destul de puternic. Revino cand ajungi la nivelul 100.")
end
else
syschat("Revino cand esti pregătit!")
end
end
-- end statuia leu inghetat sohan
-- Statuia leu inghetat
when 20397.chat."Turnul lui Nemeres" with pc.get_map_index() == 240 begin
say_title2("Statuia Leului de Gheaţă [ENTER]")
say2("Forţele răului se prezintă în multe forme!")
say2("Puterile sale distrugătoare cresc pe zi ce trece, iar regatele încep")
say2("să se destrame, pe zi ce trece! Cine este in stare să se împotrivească?")
say2("Ultima noastră speranţă rămâne in oameni simpli![ENTER]")
if pc.get_level() >= 100 then
if party.is_party() or pc.is_gm() then
if party.is_leader() or pc.is_gm() then
if pc.count_item(31089) > 0 or pc.is_gm() then
say_reward("Eşti pregatit să îl înfrunţi?[ENTER]")
if select("Da!","Nu") == 1 then
pc.remove_item(31089,1)
d.join(240)
end
else
say_reward("Ai nevoie de următorul item")
say_item_vnum(31089)
end
else
say_reward("Trebuie sa fii liderul grupei!")
end
else
say_reward("Trebuie să faci parte dintr-un grup!")
end
else
say_reward("Trebuie să ai nivelul 100 !")
end
end
-- end statuia leu inghetat
-- Statuia leu inghetat 222222222222222
when 20397.chat."Lăcaşul lui Nemeres" with d.getf("actual_round") == 9 begin
if party.is_leader() or pc.is_gm() then
say_title2("Statuia Leului de Gheaţă [ENTER]")
say2("A fost foarte greu dar in final ai ajuns la sursa răului!")
say2("Maleficul Nemeres te aşteaptă! Eşti pregătit să îl înfrunţi?[ENTER]")
if select("Da!","Nu") == 1 then
if d.getf("used_statue", 0) then
d.setf("used_statue", 1)
syschat("În urmatoarele 10 secunde veţi fi teleportaţi.")
timer("nextlevel",10)
end
end
end
end
-- end statuia leu inghetat 222222222222222
-- func start
when login with pc.get_map_index() >= 2400000 and pc.get_map_index() <= 2405000 begin
d.notice("[Turnul lui Nemeres] Bătălia a început!")
d.notice("[Turnul lui Nemeres] Curăţă camera pentru a avansa! Mult success!")
if party.is_party() then
if party.is_leader() then
snowdungeon.start()
end
else
if pc.is_gm() then
snowdungeon.start()
end
end
end
-- FUNCTII
------
when 20398.take begin
if d.getf("actual_round") == 5 then
if item.get_vnum() == 30332 then
----------------------------------
local sequence = {{1,2,3,4,5,5},{4,3,2,1,5,5},{4,5,3,1,2,2},{5,3,4,2,1,1},{5,1,3,4,2,2}}
if snowdungeon.GetPillarID() == sequence[d.getf("sequence")][d.getf("box_opened")] then
pc.remove_item(item.get_vnum(),1)
npc.purge()
d.setf("box_opened", d.getf("box_opened")+1)
if d.getf("box_opened") == 6 then
d.notice("[Turnul lui Nemeres] Sigiliile au fost deschise. Veţi urca la nivelul 6!")
snowdungeon.purge()
timer("nextlevel",10)
else
d.notice("[Turnul lui Nemeres] Mai ai "..6-d.getf("box_opened").." sigilii de deschis!")
end
elseif snowdungeon.GetPillarID() == false then
syschat("Du-te mai aproape şi trage cheia!")
elseif snowdungeon.GetPillarID() != sequence[d.getf("sequence")][d.getf("box_opened")] then
pc.remove_item(item.get_vnum(),1)
syschat("[Turnul lui Nemeres] Nu ai pus cheia pe sigiliul corect, caută altul!")
end
----------------------------------
end
end
end
when 30331.use begin
if d.getf("actual_round") == 2 then
if pc.get_job() == 3 or pc.get_job() == 7 then
if number(1,8) == 5 then
d.notice("[Turnul lui Nemeres] Ai avut noroc. Cheia a fost perfectă!")
d.notice("[Turnul lui Nemeres] Imediat veţii fi duşi la urmatorul nivel.")
snowdungeon.purge()
timer("nextlevel",10)
else
d.notice("[Turnul lui Nemeres] Cheia nu a fost destul de puternică şi s-a spart.")
d.notice("[Turnul lui Nemeres] Incearcă din nou!")
pc.remove_item(30331,1)
end
else
syschat("Doar un Shaman curajos poate folosi aceasta cheie.")
end
end
end
when 30333.use begin
if pc.get_job() == 3 or pc.get_job() == 7 or pc.get_job() == 1 or pc.get_job() == 5 then
if d.getf("actual_round") == 8 then
if number(1,8) == 5 then
d.notice("[Turnul lui Nemeres] Ai avut noroc. Cheia a fost perfectă!")
d.notice("[Turnul lui Nemeres] Imediat veţii fi duşi la urmatorul nivel.")
snowdungeon.purge()
timer("nextlevel",10)
else
d.notice("[Turnul lui Nemeres] Cheia nu a fost destul de puternică şi s-a spart.")
d.notice("[Turnul lui Nemeres] Incearcă din nou!")
pc.remove_item(30333,1)
end
else
syschat("Doar un saman sau un ninja curajos poate folosi aceasta cheie.")
end
end
end
when kill with pc.get_map_index() >= 2400000 and pc.get_map_index() <= 2405000 begin
if d.getf("actual_round") == 6 and npc.get_race() == 8058 then
d.notice("[Turnul lui Nemeres] Felicitări, aţi distrus sursa puterilor lui Nemeres!")
d.notice("[Turnul lui Nemeres] În câteva momente veţi urca la nivelul 7.")
timer("nextlevel",10)
end
if d.getf("actual_round") == 7 and npc.get_race() == 6151 then
d.notice("[Turnul lui Nemeres] Felicitări, uciderea lui Szel v-a adus cu un pas mai")
d.notice("[Turnul lui Nemeres] aproare de vătălia cu Nemeres!")
snowdungeon.purge()
timer("nextlevel",10)
end
if d.getf("actual_round") == 9 and npc.get_race() == 20399 then
d.notice("[Turnul lui Nemeres] Ultimul pilon din defensiva lui Nemeres a fost dărâmat!")
d.notice("[Turnul lui Nemeres] Sufletul leului de gheaţă a apărut!")
snowdungeon.purge()
d.spawn_mob(20397, 848, 669)
end
if d.getf("actual_round") == 10 and npc.get_race() == 6191 then
d.notice("[Turnul lui Nemeres] Felicitări, aţi reuşit sa-l învingeţi pe Nemeres!")
d.setf("actual_round","0")
------------------
-- local time = get_time()
-- d.setqf2("snowdungeon","daily_nemeres_last_kill", time)
-- d.setqf2("snowdungeon","daily_nemeres", 1)
------------------
d.clear_regen()
d.kill_all()
d.spawn_mob(9012, 928, 338)
timer("exit_snow", 60)
d.notice("În 60 de secunde veţi fi teleportaţi afară!")
end
if d.getf("actual_round") == 1 then
d.setf("kill_count_sd1",d.getf("kill_count_sd1") +1)
if d.getf("kill_count_sd1") == d.getf("sd_kill_to_next") then
d.notice("[Turnul lui Nemeres] Aţi terminat primul nivel!")
d.notice("[Turnul lui Nemeres] În cateva momente veţi urca la nivelul 2.")
snowdungeon.purge()
timer("nextlevel",10)
end
elseif d.getf("actual_round") == 2 then
if number(1,20) == 11 then
game.drop_item_with_ownership(30331,1)
end
elseif d.getf("actual_round") == 3 then
d.setf("kill_count_sd3",d.getf("kill_count_sd3") +1)
if d.getf("kill_count_sd3") == d.getf("sd3_kill_to_next") then
snowdungeon.purge()
d.notice("[Turnul lui Nemeres] Aţi terminat al 3lea nivel!")
d.notice("[Turnul lui Nemeres] În câteva momente veţi urca la nivelul 4.")
timer("nextlevel",10)
end
elseif d.getf("actual_round") == 4 then
d.setf("kill_count_sd4",d.getf("kill_count_sd4") +1)
if d.getf("kill_count_sd4") == d.getf("sd4_kill_to_next") then
snowdungeon.purge()
d.notice("[Turnul lui Nemeres] Al doilea val a fost nimicit!")
d.notice("[Turnul lui Nemeres] In cateva momente veţi urca la nivelul 5.")
timer("nextlevel",10)
end
elseif d.getf("actual_round") == 5 then
if number(1,25) == 19 then
game.drop_item_with_ownership(30332,1)
end
elseif d.getf("actual_round") == 6 then
d.setf("kill_count_sd6",d.getf("kill_count_sd6") +1)
if d.getf("kill_count_sd6") == d.getf("sd6_kill_to_next") then
d.notice("[Turnul lui Nemeres] Ce se întâmplă? Se zăreşte ceva albastru pe cer!?")
snowdungeon.purge()
timer("level7metin",5)
end
elseif d.getf("actual_round") == 8 then
if number(1,25) == 11 then
game.drop_item_with_ownership(30333,1)
end
end
end
------
when level7metin.timer begin
if d.getf("actual_round") == 6 then
d.spawn_mob(8058, 570, 649)
end
end
when nextlevel.timer begin
if d.getf("actual_round") == 1 then
-- NIVEL 2
d.jump_all(5120+760,1536+270)
d.setf("actual_round",2)
d.set_regen_file("data/dungeon/snowdungeon/nivel_2.txt")
d.notice("[Turnul lui Nemeres] Aţi ajuns la nivelul 2!")
d.notice("[Turnul lui Nemeres] Caută Cheia pentru a putea avansa la urmatorul nivel.")
elseif d.getf("actual_round") == 2 then
-- NIVEL 3
d.jump_all(5120+210,1536+438)
d.setf("actual_round",3)
d.setf("kill_count_sd3","0")
d.setf("sd3_kill_to_next","300") -- NUMARUL DE MOBI PANA LA URMATORUL NIVEL DE MODIFICAT in 250
d.set_regen_file("data/dungeon/snowdungeon/nivel_3.txt")
d.notice("[Turnul lui Nemeres] Aţi ajuns la nivelul 3!")
d.notice("[Turnul lui Nemeres] Ucideţi armata lui Nemeres pentru a putea avansa.")
elseif d.getf("actual_round") == 3 then
-- NIVEL 4
d.jump_all(5120+420,1536+260)
d.setf("actual_round",4)
d.setf("kill_count_sd4","0")
d.setf("sd4_kill_to_next","300") -- NUMARUL DE MOBI PANA LA URMATORUL NIVEL DE MODIFICAT in 250
d.set_regen_file("data/dungeon/snowdungeon/nivel_4.txt")
d.notice("[Turnul lui Nemeres] Aţi ajuns la nivelul 4! Un alt val din armata lui Nemeres atacă pe neaşteptate!")
d.notice("[Turnul lui Nemeres] Distrugeţi-i pe toţi pentru a putea avansa!")
elseif d.getf("actual_round") == 4 then
-- NIVEL 5
d.jump_all(5120+421,1536+533)
d.setf("actual_round",5)
d.set_regen_file("data/dungeon/snowdungeon/nivel_5.txt")
-------------
local sequence = {{1,2,3,4,5},{4,3,2,1,5},{4,5,3,1,2},{5,3,4,2,1},{5,1,3,4,2}}
local n = number(1,5)
local coords = {{391,490},{451,490},{463,455},{380,456},{420,422}}
for i = 1, 5 do
d.spawn_mob(20398, coords[1],coords[2])
end
d.setf("box_opened", 1)
d.setf("sequence",n)
-----------
d.notice("[Turnul lui Nemeres] Aţi ajuns la nivelul 5.")
d.notice("[Turnul lui Nemeres] Trecerea este sigilitată de gheaţă.")
d.notice("[Turnul lui Nemeres] Deschide sigiliile pentru a putea avansa!")
elseif d.getf("actual_round") == 5 then
-- NIVEL 6
d.jump_all(5120+570,1536+690)
d.setf("actual_round",6)
d.setf("kill_count_sd6","0")
d.setf("sd6_kill_to_next","200") -- NUMARUL DE MOBI PANA LA URMATORUL NIVEL DE MODIFICAT in 250
d.set_regen_file("data/dungeon/snowdungeon/nivel_6.txt")
d.notice("[Turnul lui Nemeres] Aţi ajuns la nivelul 6!")
d.notice("[Turnul lui Nemeres] Trupele lu Nemeres au început să se destrame!")
elseif d.getf("actual_round") == 6 then
-- NIVEL 7
d.jump_all(5120+747,1536+517)
d.setf("actual_round",7)
d.regen_file("data/dungeon/snowdungeon/nivel_7.txt")
d.spawn_mob(6151, 747, 442)
d.spawn_mob(6151, 768, 475)
d.spawn_mob(6151, 735, 486)
d.notice("[Turnul lui Nemeres] Aţi ajuns la nivelul 7!")
d.notice("[Turnul lui Nemeres] Distrugeţi-i pe cei 3 Iakari pentru a putea trece mai departe.")
elseif d.getf("actual_round") == 7 then
-- NIVEL 8
d.jump_all(5120+303,1536+711)
d.setf("actual_round",8)
d.set_regen_file("data/dungeon/snowdungeon/nivel_8.txt")
d.notice("[Turnul lui Nemeres] Aţi ajuns la nivelul 8!")
d.notice("[Turnul lui Nemeres] Caută Cheia pentru a putea avansa la urmatorul nivel.")
elseif d.getf("actual_round") == 8 then
-- NIVEL 9
d.jump_all(5120+848,1536+689)
d.set_regen_file("data/dungeon/snowdungeon/nivel_9.txt")
d.setf("actual_round",9)
d.spawn_mob(20399, 849, 659)
d.notice("[Turnul lui Nemeres] Aţi ajuns la nivelul 9!")
d.notice("[Turnul lui Nemeres] Distrugeţi Pilonul Dragonului.")
elseif d.getf("actual_round") == 9 then
-- NIVEL 10 BOSS ROOM
d.setf("used_statue", 0)
d.spawn_mob(6191, 927, 323)
d.jump_all(5120+928,1536+390)
d.setf("actual_round",10)
d.set_regen_file("data/dungeon/snowdungeon/nivel_10.txt")
end
snowdungeon.NoticeTime()
end
function start()
d.set_regen_file("data/dungeon/snowdungeon/nivel_1.txt")
d.setf("actual_round",1)
d.setf("time", get_time()+60*60*1)
d.setf("sd_kill_to_next",300) --------------------------------------------------- DE MODIFICAT LA FINAL in 300
d.setf("kill_count_sd1",0)
server_timer("snowdungeontime",3600,pc.get_map_index())
--server_loop_timer("snowdungeontimenotice",300)
snowdungeon.NoticeTime()
end
when snowdungeontimenotice.server_timer begin
if pc.get_map_index()<= 2405000 then
snowdungeon.NoticeTime()
end
end
function GetPillarID()
if pc.get_local_x() >= 391 - 5 and pc.get_local_x() <= 391 + 5 and pc.get_local_y() >= 490 - 5 and pc.get_local_y() <= 490 + 5 then
return 1
elseif pc.get_local_x() >= 451 - 5 and pc.get_local_x() <= 451 + 5 and pc.get_local_y() >= 490 - 5 and pc.get_local_y() <= 490 + 5 then
return 2
elseif pc.get_local_x() >= 463 - 5 and pc.get_local_x() <= 463 + 5 and pc.get_local_y() >= 455 - 5 and pc.get_local_y() <= 455 + 5 then
return 3
elseif pc.get_local_x() >= 380 - 5 and pc.get_local_x() <= 380 + 5 and pc.get_local_y() >= 456 - 5 and pc.get_local_y() <= 456 + 5 then
return 4
elseif pc.get_local_x() >= 420 - 5 and pc.get_local_x() <= 420 + 5 and pc.get_local_y() >= 422 - 5 and pc.get_local_y() <= 422 + 5 then
return 5
else
return false
end
end
when snowdungeontime.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("Ai la dispozitie!")
d.exit_all()
end
end
when exit_snow.timer begin
d.exit_all()
end
function NoticeTime()
local secondsLeft = (d.getf("time") - get_time())
local minutesLeft = math.ceil(secondsLeft / 60)
d.notice("[Turnul lui Nemeres] Timp Ramas: "..minutesLeft.." Minute!")
end
function purge()
d.kill_all()
d.clear_regen()
end
-- FINAL DE QUEST
end
end
- ##SomeBody
-

- Mesaje: 330
- Membru din: 14 Apr 2021, 17:12
- Server: In lucru...
- Regat: Jinno
- Aprecieri: 443
- Mulţumiri: 71
- Discord: Copiază ID
??
Cod: Selectaţi tot
-- Statuia leu inghetat
when 20397.chat."Turnul lui Nemeres" with pc.get_map_index() == 240 begin
say_title2("Statuia Leului de Gheaţă [ENTER]")
say2("Forţele răului se prezintă în multe forme!")
say2("Puterile sale distrugătoare cresc pe zi ce trece, iar regatele încep")
say2("să se destrame, pe zi ce trece! Cine este in stare să se împotrivească?")
say2("Ultima noastră speranţă rămâne in oameni simpli![ENTER]")
if pc.get_level() >= 100 then
if party.is_party() or pc.is_gm() then
if party.is_leader() or pc.is_gm() then
if pc.count_item(31089) > 0 or pc.is_gm() then
say_reward("Eşti pregatit să îl înfrunţi?[ENTER]")
if select("Da!","Nu") == 1 then
pc.remove_item(31089,1)
d.join(240)
end
else
say_reward("Ai nevoie de următorul item")
say_item_vnum(31089)
end
else
say_reward("Trebuie sa fii liderul grupei!")
end
else
say_reward("Trebuie să faci parte dintr-un grup!")
end
else
say_reward("Trebuie să ai nivelul 100 !")
end
end
-- end statuia leu inghetat- ##SomeBody
-

- Mesaje: 330
- Membru din: 14 Apr 2021, 17:12
- Server: In lucru...
- Regat: Jinno
- Aprecieri: 443
- Mulţumiri: 71
- Discord: Copiază ID
deci pana la urma cum scot grupa?? sterg acel if parti.is_leader ?
- Kazuhiri
-

- Mesaje: 2088
- Membru din: 26 Mar 2017, 19:14
- Server: Demetris
- Regat: Shinsoo
- Aprecieri: 396
- Mulţumiri: 3227
- Rezolvări prob.: 2
- Discord: Copiază ID
##SomeBody scrie: ↑07 Mai 2021, 14:35 deci pana la urma cum scot grupa?? sterg acel if parti.is_leader ?
Nici n-ai incercat,nu?Nu te-ai gandit ca poate,party are legatura cu grupa?Normal ca comentezi/stergi verificarile pentru grupa(party)...
lasi si comentarii aiurea,inseamnand ca vreti totul pe tava,nu incercati deloc
-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 11 vizitatori

