Cümleten selamın kolay gelsin, başlıktan da belli elimde düzenlediğim nemere razador kodları var ama şöyle oluyor. Razador için 351 map indexte 3510000 indexten başlayıp instance oluşturuyor ve ışınlıyor ama boss spawn olmuyor, oyundan çıkıp tekrar girince map index 351'e geçiyor ve boss spawn oluyor ama bunda da şöyle bir durum var aynı anda 3 kişi girdiyse 3510001 3510002 3510003 indexten 351 indexe çekiyor ve aynı nemereye çıkıyorlar. Kodlar aşağıda yardımcı olabilecek arkadaşlara şimdiden teşekkür ederim.
Razador:
------------------------------------------------------------------
-- Flame Dungeon – Tek Kat (Solo) v7.0
-- • NPC 20394 • Harita 351
-- • Süre 15 dk • Boss vnum 6091
------------------------------------------------------------------
quest flame_dungeon_solo begin
state start begin
----------------------------------------------------------
-- Zindana giriş
when 20394.chat."Alev Zindani (Solo)" begin
if party.is_party() then
say("Bu zindana yalnizca tek kisilik giris yapilabilir.")
return
end
if not pc.can_warp() then
say("Su anda isinlanamazsin.")
return
end
if pc.get_level() < 100 then
say("Bu zindana girebilmek icin seviyen 100 uzerinde olmalidir.")
return
end
say_title("Alev Zindani Bilgilendirmesi:")
say("Zindanda yalnizca Boss bulunur ve 15 dakikan var.")
say("Girmek istiyor musun?")
local s = select("Evet", "Hayir")
if s == 2 then return end
-- Yeni instance olustur
local map_idx = d.new_jump(351, 8109*100, 6867*100)
if not d.select(map_idx) then
syschat("DEBUG: d.select basarisiz! map_idx="..map_idx)
return
end
syschat("DEBUG: Yeni instance olusturuldu, map_idx="..map_idx)
-- Boss spawn (instance index'inde)
local boss_x = 8110
local boss_y = 6781
d.set_regen_file("") -- instance map kullanacak
d.spawn_mob(6091, boss_x, boss_y)
syschat("DEBUG: Boss spawn edildi instance map_idx="..map_idx)
-- Sureyi ayarla
d.setf("end_time", get_global_time() + 900) -- 15 dakika
notice_all("[Alev Zindani] Boss ortaya cikti! Onu yenmek icin 15 dakikan var.")
-- Sure kontrol timer
server_loop_timer("fds_warn_check", 60, map_idx)
end
----------------------------------------------------------
-- Sure kontrolu ve uyarilar
when fds_warn_check.server_timer begin
local map_idx = get_server_timer_arg()
if not d.select(map_idx) then return end
local end_time = d.getf("end_time")
if end_time == 0 then return end
local remain_time = end_time - get_global_time()
if remain_time <= 0 then
clear_server_timer("fds_warn_check", map_idx)
notice_all("[Alev Zindani] SUREN DOLDU! Zindandan cikariliyorsun.")
server_timer("fds_kick_timeout", 10, map_idx)
elseif remain_time <= 60 then
notice_all("[Alev Zindani] Son 1 dakika!")
elseif remain_time <= 300 then
notice_all("[Alev Zindani] Son 5 dakika!")
end
end
----------------------------------------------------------
-- Sure bitiminde cikarma
when fds_kick_timeout.server_timer begin
local map_idx = get_server_timer_arg()
if d.select(map_idx) then
d.set_warp_location(62, 6142, 7068)
d.exit_all()
end
end
----------------------------------------------------------
-- Boss oldugunde
when 6091.kill begin
local map_idx = d.get_map_index()
if map_idx >= 3510000 then
clear_server_timer("fds_warn_check", map_idx)
notice_all("[Alev Zindani] Boss'u yendin! 60 saniye sonra disari cikarilacaksin.")
server_timer("fds_exit_success", 60, map_idx)
end
end
----------------------------------------------------------
-- Basarili cikis
when fds_exit_success.server_timer begin
local map_idx = get_server_timer_arg()
if d.select(map_idx) then
d.set_warp_location(62, 6142, 7068)
d.exit_all()
end
end
end
end
Nemere:
------------------------------------------------------------------
-- Kar Zindani – Tek Kat (Solo + Nemere)
-- • NPC 20395 • Boss vnum 6191
-- • Süre 30 dk
------------------------------------------------------------------
quest snow_dungeon_solo begin
state start begin
-- Zindana giriş
when 20395.chat."Kar Zindani (Son Kat)" begin
if not pc.can_warp() then
say("Şu anda ışınlanamazsın.")
return
end
if pc.get_level() < 100 then
say("Bu zindana girebilmek için seviyen 100 üzerinde olmalı.")
return
end
say_title("Zindan Bilgilendirmesi:")
say("Zindanda sadece Boss ve Nemere vardır. 30 dakikan olacak.")
say("Girmek istiyor musun?")
local s = select("Evet", "Hayır")
if s == 2 then return end
-- Solo instance oluştur ve map indexini güvenli al
local map_idx = d.new_jump(352, 6047*100, 1924*100)
syschat("DEBUG: Snow Dungeon instance oluşturuldu. map_idx="..map_idx)
server_timer("snow_init_spawn", 5, map_idx) -- 5 sn beklet, sonra spawn başlat
end
--------------------------------------------------------------
-- Zindanı başlat ve bossları spawn et
when snow_init_spawn.server_timer begin
local map_idx = get_server_timer_arg()
if not d.select(map_idx) then
syschat("DEBUG: snow_init_spawn - d.select başarısız map_idx="..map_idx)
return
end
-- Spawn noktaları BasePosition'a göre hesaplanmıştır
d.spawn_mob(6191, 6070, 1876) -- Nemere
d.setf("end_time", get_global_time() + 1800) -- 30 dk (1800 sn)
notice_all("[Kar Zindani] Boss ve Nemere ortaya çıktı! 30 dakikan var!")
server_loop_timer("snow_warn_check", 60, map_idx)
end
--------------------------------------------------------------
-- Süre uyarıları ve bitiş kontrolü
when snow_warn_check.server_timer begin
local map_idx = get_server_timer_arg()
if not d.select(map_idx) then
syschat("DEBUG: snow_warn_check - d.select başarısız map_idx="..map_idx..", retrying in 2 sec")
server_timer("snow_warn_check", 2, map_idx)
return
end
local end_time = d.getf("end_time")
if not end_time or end_time <= 0 then
syschat("DEBUG: snow_warn_check - end_time yok veya geçersiz map_idx="..map_idx)
return
end
local remain_time = end_time - get_global_time()
if remain_time <= 0 then
clear_server_timer("snow_warn_check", map_idx)
d.notice("Süre doldu, dışarı ışınlanıyorsun!")
d.exit_all()
return
end
-- 10, 5 ve 1 dk kala uyarı gönder
if remain_time == 600 then
d.notice("10 dakikan kaldı!")
elseif remain_time == 300 then
d.notice("5 dakikan kaldı!")
elseif remain_time == 60 then
d.notice("1 dakikan kaldı!")
end
end
end
end
Catacomb:
quest catacomb_dungeon begin
state start begin
when logout begin
local map = pc.get_map_index()
if map >= 2160000 and map < 2170000 then
pc.setf("catacomb_dead","dungeon_time", get_global_time() + 30*60)
end
end
when 20367.chat."Catacomb (BUNU KULLAN)" begin
if pc.get_level() < 75 then
say("75. seviyenin altında giremezsin.")
return
end
if pc.count_item(30319) < 1 then
say("Gerekli eşyaya sahip değilsin.")
say_item_vnum(30319)
return
end
if pc.getf("catacomb_dead","dungeon_time") > get_global_time() then
say("Henüz yeniden giremezsin.")
return
end
say("Zindana girmek istiyor musun?")
local s = select("Evet", "Hayır")
if s == 1 then
pc.remove_item(30319, 1)
d.new_jump(216, 3145 * 100, 13177 * 100)
local map_idx = d.get_map_index()
if map_idx >= 2160000 then
d.spawn_mob_dir(2598, 3145, 13177, 1)
d.notice("Catacomb Zindanına Hoşgeldin!")
d.notice("30 dakika içinde Boss'u yok etmelisin!")
timer("catacomb_timeup", 30 * 60)
end
end
end
when catacomb_timeup.timer begin
local map_idx = pc.get_map_index()
if map_idx >= 2160000 then
d.notice("Zaman doldu, zindandan çıkarılıyorsun!")
d.exit_all()
end
end
when kill with npc.get_race() == 2598 begin
local map_idx = d.get_map_index()
if map_idx >= 2160000 then
pc.setf("catacomb_dead","dungeon_time", get_global_time() + 30*60)
notice_all("|cff00ff00"..pc.get_name().." Catacomb Boss'unu yendi!")
timer("catacomb_exit_success", 60)
end
end
when catacomb_exit_success.timer begin
local map_idx = pc.get_map_index()
if map_idx >= 2160000 then
d.exit_all()
end
end
end
end