Çözülemedi Eklenmeyen quest -.-

Ne yazık ki bu konuda sorulara çözüm bulunmuyor. Eğer konuda yorumlar varsa hepsini inceleyebilirsiniz. Belki sizlerin sorununuzu çözmek için için ipuçları bulabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

aykutleee

Üye
Üye
Mesaj
108
Çözümler
5
Beğeni
25
Puan
454
Merhaba forum üyeleri, serverime ortalıkta dolaşan kule sistemini eklemeye çalıştım c++ python her şey sorunsuz oyun için metinler slotlar efektler sandıklar vs ancak questleri eklerken hata alıyorum

duiy2rs.png
Lua (Quest):
quest Valentine2021_enter begin
    state start begin
        when 9376.chat."Hikayesi..." with not ShadowZoneLIB.isActive() begin
            addimage(25, 10, "shadowzone_bg1.tga"); say_title(string.format("[ENTER][ENTER][ENTER]%s:[ENTER]", mob_name(npc.get_race())));
            
            say("Yıllarca Şeytan kulesinde veya Şeytan yer altı mezarlarında iblislerle savaşıyoruz.[ENTER]Ama çok daha karanlık bir şey uyandı.[ENTER]Unutulmuş başka bir dünya var. Derin gölgede...[ENTER]Eski Krallıkların koridorlarını sadece söylentilerden biliyoruz.")
            
            wait()
            addimage(25, 10, "shadowzone_bg1.tga"); say_title(string.format("[ENTER][ENTER][ENTER]%s:[ENTER]", mob_name(npc.get_race())));
            
            say("Hayatta kalan pek çoğumuz şimdi aramızda yok.[ENTER]Çoğu, sonsuza dek orada sıkışıp kaldılar.[ENTER]Savaşmazsak, gölge kontrolü ele alacak ve dünyadaki çoğu yeri işgal edecek.")
        end
            
        when 9376.chat."Shadow tower" with not ShadowZoneLIB.isActive() begin
            local settings = ShadowZoneLIB.Settings();

            addimage(25, 10, "shadowzone_bg1.tga");
            say("[ENTER][ENTER]")
            say_title(string.format("%s:[ENTER]", mob_name(npc.get_race())))
            say_reward("Gerçekten zindana girmek istiyor musun?")
            
            if (select("Evet!", "Hayır") == 1) then
                if ShadowZoneLIB.checkEnter() then
                    ShadowZoneLIB.CreateDungeon();
                end
            end
        end
    end
end

Lua (Quest):
define FIRST_STONE 8494
define SECOND_STONE 8495
define THIRD_STONE 8496
define FOURTH_STONE 8499
define FIFTH_STONE 8497
define SIXTH_STONE 8498

define GATE_NPC 9382
define FIRST_SEAL 9377
define FIRST_STATUE 9378
define SECOND_STATUE 9379
define THIRD_STATUE 9380
define FOURTH_STATUE 9381
define FIRST_PILLAR 9383
define SECOND_PILLAR 9384
define THIRD_PILLAR 9385
define CHEST 9386

define SIXTH_BOSS 4387
define FINAL_BOSS 4388

define FIRST_KEY 30845
define SECOND_KEY 30846
define THIRD_KEY 30847
define ITEM_SOUL 30848
define DEMON_EYE 30849
define ITEM_AMULET 30850
define ITEM_MAIN_REWARD 30854
define ITEM_KEY_REWARD 30855
define ITEM_SMALL_REWARD 30856

quest ShadowZone_zone begin
    state start begin
        when login with ShadowZoneLIB.isActive() begin
            local settings = ShadowZoneLIB.Settings();           
            local OutsidePosition = settings["outside_pos"]           

            if (party.is_party() and party.is_leader() or not party.is_party()) then
                
                local FirstFloorTimer = settings["timer_first_floor"];
                
                d.setf("ShadowZone_floor", 1);                       
                d.setf("ShadowZone_FirstStone", 1);                       
                d.setf("ShadowZone_floor1_timer", FirstFloorTimer);                       
                d.setf("ShadowZone_nocool_timer", 1);                       
                
                d.set_warp_location(settings["outside_index"], OutsidePosition[1], OutsidePosition[2]);
                
                d.set_regen_file(settings["regen_file"].."regen_1a.txt");
                d.regen_file(settings["regen_file"].."regen_1b.txt");
                
                d.notice(string.format("Şeytan Kulesi: tüm %s'yi yok edin! Sayılı zamanınız var! Acele et!", mob_name(FIRST_STONE)));
                
                ShadowZoneLIB.setCoolTimer();           
                
                server_timer("ShadowZone_FirstFloor", FirstFloorTimer, d.get_map_index())
            end
        end
                
        ------------
        ---Players destroy first stone (3x), after that, timer is cleared and set another for jump them to next floor
        ------------
        when FIRST_STONE.kill with ShadowZoneLIB.isActive() and d.getf("ShadowZone_floor") == 1 begin
            local settings = ShadowZoneLIB.Settings();           
            local KILL_COUNT = settings["FIRST_STONE_COUNT"]
            local n = d.getf("ShadowZone_FirstStone_count") + 1
            
            d.setf("ShadowZone_FirstStone_count", n)
            
            if n >= KILL_COUNT then
            
                ShadowZoneLIB.clearDungeon()               
                clear_server_timer("ShadowZone_FirstFloor", d.get_map_index());
                
                d.setf("ShadowZone_FirstStone", 0);
                ShadowZoneLIB.clearCoolTimer();
                
                d.notice(string.format("Şeytan Kulesi: %s ortaya çıktı! Bir sonraki kata gidebilirsiniz!", mob_name(GATE_NPC)));
                ShadowZoneLIB.spawnPortalGate()
            end
        end

        -----
        --Server timer to check if the stones (8494) are destroyed, if not, dungeon is ended
        -----
        when ShadowZone_FirstFloor.server_timer begin
            if d.select(get_server_timer_arg()) then
                if d.getf("ShadowZone_FirstStone") == 1 then
                    d.notice("Şeytan Kulesi: Zaman doldu. Hata yaptın!")
                    
                    d.exit_all()
                end
            end
        end

        -----
        --Killing wave of monsters to get a key (2x)
        -----
        when kill with ShadowZoneLIB.isActive() and not npc.is_pc() and d.getf("ShadowZone_floor") == 2 and d.getf("ShadowZone_2f_KillMonsters") == 1 begin
            local settings = ShadowZoneLIB.Settings();       
            d.setf("ShadowZone_2f_KillCount", n)
            
            if pc.get_x() > 17729 and pc.get_y() > 22951 and pc.get_x() < 17932 and pc.get_y() < 23140 then               
                
                if n >= KILL_COUNT then
                    game.drop_item(FIRST_KEY, 1)
                    
                    d.setf("ShadowZone_2f_KillCount", 0)
                    d.setf("ShadowZone_2f_KillMonsters", 0)
                end
            end
        end
        
        -----
        --Destroying 2 Shadow seals to spawn a frist boss (4382)
        -----
        when FIRST_SEAL.take with item.get_vnum() == FIRST_KEY and ShadowZoneLIB.isActive() and d.getf("ShadowZone_floor") == 2 and d.getf("ShadowZone_2f_KillMonsters") == 0 begin
            local settings = ShadowZoneLIB.Settings();
            local Position = settings["first_boss_pos"]
            
            item.remove()
            npc.kill()
            
            if d.getf("ShadowZone_2f_Seal") == 2 then
            
                ShadowZoneLIB.clearDungeon()
                d.notice(string.format("Şeytan Kulesi: %s geliyor!", mob_name(FIRST_BOSS)))
                
                d.spawn_mob(FIRST_BOSS, Position[1], Position[2])
            else
                d.notice(string.format("Şeytan Kulesi: İkinci %s'yi yok etmek için ikinci canavar dalgasını öldürün!", mob_name(FIRST_SEAL)))
                
                d.setf("ShadowZone_2f_KillMonsters", 1);
                d.setf("ShadowZone_2f_Seal", 2);
                d.regen_file(settings["regen_file"].."regen_2a.txt");
            end
        end
        
        -----
        --Server timer to check if the stones (8494) are destroyed, if not, dungeon is ended
        -----
        when ShadowZone_SecondFloor.server_timer begin
            if d.select(get_server_timer_arg()) then
                    
                    d.exit_all()
                end
            end
        end
        
        -----
        -- Players kill the first boss (4382), after that, server timer for jump to next floor is set
        -----
        when FIRST_BOSS.kill with ShadowZoneLIB.isActive() and not npc.is_pc() and d.getf("ShadowZone_floor") == 2 begin
            local settings = ShadowZoneLIB.Settings();
            
            clear_server_timer("ShadowZone_SecondFloor", d.get_map_index());
            ShadowZoneLIB.clearCoolTimer();
            
            ShadowZoneLIB.spawnPortalGate();
            
            d.notice(string.format("Şeytan Kulesi: %s ortaya çıktı! Bir sonraki kata gidebilirsiniz!", mob_name(GATE_NPC)));
        end
        
        -----
        --Players destroying stones in third floor. 4 of them are fake, one is real
        -----
            local settings = ShadowZoneLIB.Settings();
            local n = d.getf("ShadowZone_wrong_count_f") + 1
            
            if npc.get_vid() == d.get_unique_vid("real") then
                ShadowZoneLIB.clearDungeon()
                ShadowZoneLIB.clearDungeon()
                
                d.notice("Şeytan Kulesi: Doğru taşı yok ettiniz!")
                d.notice(string.format("Şeytan Kulesi: %s ortaya çıktı! Bir sonraki kata gidebilirsiniz!", mob_name(GATE_NPC)));
                
                ShadowZoneLIB.spawnPortalGate()
            else
                d.setf("ShadowZone_wrong_count_f", n);   
                
                d.notice("Şeytan Kulesi: Bu sadece bir yanılsamaydı!")
            end
        end
                
        -----
        --Killing wave of monsters to get a key (30846 - 3x)
        -----
        when kill with ShadowZoneLIB.isActive() and not npc.is_pc() and d.getf("ShadowZone_floor") == 4 and d.getf("ShadowZone_4f_KillMonsters") == 1 begin
            local settings = ShadowZoneLIB.Settings();       
            local KILL_COUNT = settings["KILL_COUNT_4_FLOOR"];
            local n = d.getf("ShadowZone_4f_KillCount") + 1
            
            d.setf("ShadowZone_4f_KillCount", n)
            
            if pc.get_x() > 17353 and pc.get_y() > 22626 and pc.get_x() < 17511 and pc.get_y() < 22740 then               
                
                if n >= KILL_COUNT then
                    game.drop_item(SECOND_KEY, 1)
                    
                    d.setf("ShadowZone_4f_KillCount", 0)
                    d.setf("ShadowZone_4f_KillMonsters", 0)
                end
            end
        end
        

        -----
        -- Building a Statue of reaper (9378, 9379, 9380, 9381)
        -----
        when FIRST_STATUE.take with item.get_vnum() == SECOND_KEY and ShadowZoneLIB.isActive() and d.getf("ShadowZone_floor") == 4 and d.getf("ShadowZone_4f_KillMonsters") == 0 begin
            local settings = ShadowZoneLIB.Settings();
            local StatuePosition = settings["reaper_statue_pos"]
            item.remove()
            npc.kill()
            
            
            d.setf("ShadowZone_4f_KillMonsters", 1);
            
            d.spawn_mob_dir(THIRD_STATUE, StatuePosition[1], StatuePosition[2], StatuePosition[3]);
            d.regen_file(settings["regen_file"].."regen_4a.txt");
        end
                
        when THIRD_STATUE.take with item.get_vnum() == SECOND_KEY and ShadowZoneLIB.isActive() and d.getf("ShadowZone_floor") == 4 and d.getf("ShadowZone_4f_KillMonsters") == 0 begin
            local settings = ShadowZoneLIB.Settings();
            local StatuePosition = settings["reaper_statue_pos"]
            local BossPosition = settings["second_boss_pos"]
            
            ShadowZoneLIB.clearDungeon()
            
            item.remove()
            npc.kill()
            
            d.spawn_mob_dir(FOURTH_STATUE, StatuePosition[1], StatuePosition[2], StatuePosition[3]);
            
            ---- Shadow reaper spawn (HP are depending on negative points collected in third floor from destroying fake stones)
            d.set_unique("ShadowReaper", d.spawn_mob(SECOND_BOSS, BossPosition[1], BossPosition[2]))
            
            if d.getf("ShadowZone_wrong_count_f") == 1 then
                d.unique_set_maxhp("ShadowReaper", settings["REAPER_HP_3"])
            elseif d.getf("ShadowZone_wrong_count_f") == 4 then
                d.unique_set_maxhp("ShadowReaper", settings["REAPER_HP_4"])
            else
                return
            end
        end
                
        -----
        -- Players kill the second boss (4383), they drop a key (30847) to destroy Statue of reaper (9381)
        -----
        when SECOND_BOSS.kill with ShadowZoneLIB.isActive() and not npc.is_pc() and d.getf("ShadowZone_floor") == 4 begin
            game.drop_item(THIRD_KEY, 1);
            
            
            d.setf("ShadowZone_4f_CanDesSta", 1)
            
            d.notice(string.format("Şeytan Kulesi: Aferin! Şimdi devam etmek için %s'yi yok edin!", mob_name(FIRST_STATUE)));           
        end
        
        -----
        -- Players destroy statue of reaper (9381), then Shadow gate is spawned and players can proceed to next floor
        -----
        when FOURTH_STATUE.take with item.get_vnum() == THIRD_KEY and ShadowZoneLIB.isActive() and d.getf("ShadowZone_floor") == 4 and d.getf("ShadowZone_4f_CanDesSta") == 1 begin
            clear_server_timer("ShadowZone_FourthFloor", d.get_map_index());
            ShadowZoneLIB.clearCoolTimer();
            
            
            ShadowZoneLIB.clearDungeon();
            
            d.notice("Şeytan Kulesi: Harika iş! Birkaç saniye içinde devam edeceksiniz!")
            
            d.spawn_mob(GATE_NPC, pc.get_local_x(), pc.get_local_y());
        end
        
        -----
        --Server timer to check if the stones (8494) are destroyed, if not, dungeon is ended
        -----
        when ShadowZone_FifthFloor.server_timer begin
            if d.select(get_server_timer_arg()) then
                d.notice("Şeytan Kulesi: Zaman doldu. Hata yaptın!")
                    
                d.exit_all()
            end
        end
        
        -----
        --Players destroy a statue in sixth floor (8499)
        -----
        when FOURTH_STONE.kill with ShadowZoneLIB.isActive() and not npc.is_pc() and d.getf("ShadowZone_floor") == 6 begin
            d.setf("ShadowZone_PillarActive", 0);
            
            d.notice(string.format("Şeytan Kulesi:: %s'nin koruması gitti. Onu şimdi öldürebilirsin!", mob_name(FOURTH_BOSS)));
        end
        
        -----
        --Players kill Azrael boss, if the statue is not destroyed yet, boss will spawned again
                d.set_item_group("ShadowZone_6F_ticket", 1, ITEM_SOUL, 1)
                
                d.notice(string.format("Şeytan Kulesi: %s ortaya çıktı! Bir sonraki kata gidebilirsiniz!", mob_name(GATE_NPC)));
                
                ShadowZoneLIB.spawnPortalGate()
            end
        end
        
        -----
        --Players can not die in the dungeon
        -----
        when dead with ShadowZoneLIB.isActive() and d.getf("ShadowZone_floor") == 6 begin
            d.notice("Şeytan Kulesi: Öldün. Başarısız oldun.")
            
            d.exit_all()
        end
        -----
        --Server timer to check if the fourth boss (Azrael) is killed
        -----
        when ShadowZone_SixthFloor.server_timer begin
            if d.select(get_server_timer_arg()) then
                d.notice("Şeytan Kulesi: Zaman doldu. Hata yaptın!")
                    
                d.exit_all()
            end
        end
        
        -----
        --Players destroy a 8x stone in 7th floor, after that, boss is spawned
        -----
        when FIFTH_STONE.kill with ShadowZoneLIB.isActive() and not npc.is_pc() and d.getf("ShadowZone_floor") == 7 begin
            local settings = ShadowZoneLIB.Settings();
            local KILL_COUNT = settings["FIFTH_STONE_COUNT"]
            local n = d.getf("ShadowZone_7th_stone") + 1               
            
        end
        --Destrying pillar (3 phases - 9383-9385) at 8 floor
        -----
        when FIRST_PILLAR.take with item.get_vnum() == DEMON_EYE and ShadowZoneLIB.isActive() and d.getf("ShadowZone_floor") == 8 and d.getf("ShadowZone_8F_Pillar") == 1 begin
            local settings = ShadowZoneLIB.Settings();
            local PillarPos = settings["pillar2_pos"]
            
            d.setf("ShadowZone_8F_Pillar", 2);
            d.setf("ShadowZone_8F_Drop", 1);
            
            item.remove()
            npc.kill()
            
            d.spawn_mob_dir(SECOND_PILLAR, PillarPos[1],  PillarPos[2],  PillarPos[3])
        end
        
        when SECOND_PILLAR.take with item.get_vnum() == DEMON_EYE and ShadowZoneLIB.isActive() and d.getf("ShadowZone_floor") == 8 and d.getf("ShadowZone_8F_Pillar") == 2 begin
            local settings = ShadowZoneLIB.Settings();
            local PillarPos = settings["pillar2_pos"]
            d.spawn_mob_dir(THIRD_PILLAR, PillarPos[1],  PillarPos[2],  PillarPos[3])
        end
        
        when THIRD_PILLAR.take with item.get_vnum() == DEMON_EYE and ShadowZoneLIB.isActive() and d.getf("ShadowZone_floor") == 8 and d.getf("ShadowZone_8F_Pillar") == 3 begin
            local settings = ShadowZoneLIB.Settings();
            server_timer("ShadowZone_SixthBoss_spawner", Time, d.get_map_index())
        end
        
        -----
        --Players can use amulet to spawn the sixth boss with less HP.
        -----       
        when ITEM_AMULET.use with ShadowZoneLIB.isActive() begin
            local AmuletSetting = d.getf("ShadowZone_CanUseAmulet")
            
            if AmuletSetting == 1 then        --- Players can use the amulet       
                item.remove();           
                d.setf("ShadowAmuletIsActive", 2);
                
                d.notice(string.format("Şeytan Kulesi: %s zaten aktif! %s çok daha zayıf olacak!", item_name(ITEM_AMULET), mob_name(SIXTH_BOSS)));
                
            elseif AmuletSetting == 2 then        ---- Players already used the amulet, so the effect is already active       
                d.notice("Şeytan Kulesi: Bu efekt zaten aktif!");
                
            else        --- Players are in last floor, or the boss is already spawned
                d.notice("Şeytan Kulesi: Bunu sadece ilk 8 kat için kullanabilirsiniz!");
            end
        end
                
        -----
        --Server timer to spawn a sixth boss (4387)
        -----
        when ShadowZone_SixthBoss_spawner.server_timer begin
            if d.select(get_server_timer_arg()) then
                local settings = ShadowZoneLIB.Settings();
                local BossPosition = settings["sixth_boss_pos"]
                local ShadowAmuletIsActive = d.getf("ShadowAmulet")
            
                d.setf("ShadowZone_CanUseAmulet", 0)
                d.set_unique("SixthBoss", d.spawn_mob(SIXTH_BOSS, BossPosition[1], BossPosition[2]))
                
                if ShadowAmuletIsActive == 1 then
                    d.unique_set_maxhp("SixthBoss", settings["ABBADON_HP_SMALL"])
                else
                    d.unique_set_maxhp("SixthBoss", settings["ABBADON_HP_NORMAL"])
                end
                d.setf("ShadowZone_9f_StoneD", 0)
                
            else
                d.setf("ShadowZone_9f_StoneFail", 1)
            end               
        end
        
        -----
        --Server timer to spawn a fifth boss (4386)
        -----
        when ShadowZone_NinethFloor_1.server_timer begin
            if d.select(get_server_timer_arg()) then
                if d.getf("ShadowZone_9f_StoneD") == 1 then
                    d.setf("ShadowZone_9f_StoneD", 0)
                end
            end
        end
        
    -----
        --Server timer to spawn another wave of monsters
        -----
        when ShadowZone_NinethFloor_2.server_timer begin
            if d.select(get_server_timer_arg()) then
                local settings = ShadowZoneLIB.Settings();
                
                d.regen_file(settings["regen_file"].."regen_9a.txt");
            end
        end
        
        -----
        --Server timer to spawn random boss from previous stages
        -----
        when ShadowZone_NinethFloor_3.server_timer begin
                ShadowZoneLIB.spawnRandomBoss();
        end
            
        -----
        --Server timer to check if the boss is killed or not
        -----
        when ShadowZone_FinalBoss_kill.server_timer begin
            if d.select(get_server_timer_arg()) then
                if d.getf("ShadowZone_FinalBoss") == 1 then
                    d.notice("Şeytan Kulesi: Zaman doldu. Hata yaptın");
                    d.exit_all()
                end
            end
        end
        
        -----
        --Players kill Final boss (4388), after that, chest is spawned
        -----
        when FINAL_BOSS.kill with ShadowZoneLIB.isActive() and not npc.is_pc() and d.getf("ShadowZone_floor") == 9 and d.getf("ShadowZone_FinalBoss") == 1 begin
            local settings = ShadowZoneLIB.Settings();
            local Position = settings["chest_pos"]
            local TimeToExit = settings["time_to_final_exit"]
            local minutes = math.floor(TimeToExit / 60)
            
            ShadowZoneLIB.clearDungeon();
            ShadowZoneLIB.setReward();
            
            clear_server_timer("ShadowZone_FinalBoss_kill", d.get_map_index());
            ShadowZoneLIB.clearCoolTimer();
            
            d.setf("ShadowZone_FinalBoss", 0);
            d.setf("ShadowZone_CanTakeReward", 1);
            
            d.notice("Şeytan Kulesi: %s dakika içinde zindandan dışarı atılacaksınız.", minutes);
            d.notice("Şeytan Kulesi: Artık ödülünüzü alabilirsiniz!");
            
            d.spawn_mob_dir(CHEST, Position[1], Position[2], Position[3]);
            
            server_timer("ShadowZone_Final_Exit", TimeToExit, d.get_map_index());
        end
        
        
        -----
        --Players can take reward from the chest
        -----   
        when CHEST.chat."Take reward" with ShadowZoneLIB.isActive() and d.getf("ShadowZone_CanTakeReward") == 1 begin
            setskin(NOWINDOW);
            
            if d.getf(string.format("player_%d_reward_state", pc.get_player_id())) == 1 then
                pc.give_item2(ITEM_MAIN_REWARD, 1);
                
                d.setf(string.format("player_%d_reward_state", pc.get_player_id()), 0);   
            else
                syschat("Şeytan Kulesi: Ödülü zaten aldınız!")
            end
        end
        
        -----
        --Players can put key (30855) to the chest and take another smaller reward
        -----   
        when CHEST.take with item.get_vnum() == ITEM_KEY_REWARD and ShadowZoneLIB.isActive() and d.getf("ShadowZone_CanTakeReward") == 1 begin
            item.remove()
            pc.give_item2(ITEM_SMALL_REWARD, 1)
                d.setf("ShadowZone_2f_KillMonsters", 1);
                d.setf("ShadowZone_2f_Seal", 1);
                
                d.regen_file(settings["regen_file"].."regen_2a.txt");
                d.regen_file(settings["regen_file"].."regen_2b.txt");
                
                d.notice(string.format("Şeytan Kulesi: İki %s'yi de yok edin! Bir anahtar almak için tüm canavarlarrı yok edin!", mob_name(FIRST_SEAL)));
                
                d.jump_all(Position_2[1], Position_2[2])
                
                ShadowZoneLIB.setCoolTimer();
                server_timer("ShadowZone_SecondFloor", SecondFloorTimer, d.get_map_index())
            
            ---- Set and jump 3rd floor
            elseif Floor == 2 then
                local Position_3 = settings["pos_3_floor"]
                
                setskin(NOWINDOW);
                npc.purge();
                
                d.setf("ShadowZone_floor", 3);
                
                ShadowZoneLIB.spawnSecondStone();
                
                d.notice(string.format("Şeytan Kulesi: Gerçek %s'yi bulun ve yok edin!", mob_name(SECOND_STONE)));
                d.notice(string.format("Şeytan Kulesi: Her yanlış taş içinde %s saklar!", mob_name(FIRST_BOSS)));
                d.notice("Şeytan Kulesi: Ne kadar çok sahte taş yok ederseniz, yaklaşan bir patronun o kadar fazla HP'si olur!");
                
                ShadowZoneLIB.noCoolTimer();
                
                d.jump_all(Position_3[1], Position_3[2])
                            
            ---- Set and jump 4th floor
            elseif Floor == 3 then
                local Position_4 = settings["pos_4_floor"]
                local FourthFloorTimer = settings["timer_fourth_floor"]
                
                setskin(NOWINDOW);
                npc.purge();
                
                d.setf("ShadowZone_floor", 4);
                d.setf("ShadowZone_4f_KillMonsters", 1);
                
                d.spawn_mob_dir(FIRST_STATUE, StatuePosition[1], StatuePosition[2], StatuePosition[3]);
                d.regen_file(settings["regen_file"].."regen_4a.txt");
                
                d.jump_all(Position_4[1], Position_4[2])
                
                d.notice(string.format("Şeytan Kulesi: %s almak için tüm canavarlarrı öldürün, ardından bir %s inşa etmeye başlayın", item_name(SECOND_KEY), mob_name(FIRST_STATUE)));
                
                ShadowZoneLIB.setCoolTimer();
                
                server_timer("ShadowZone_FourthFloor", FourthFloorTimer, d.get_map_index())
            
            ---- Set and jump 5th floor
            elseif Floor == 4 then
                local Position_5 = settings["pos_5_floor"]
                local FifthFloorTimer = settings["timer_fifth_floor"]
                
                setskin(NOWINDOW);
                npc.purge();
                
                d.setf("ShadowZone_floor", 5);
                
                ShadowZoneLIB.spawnThirdStone();
                d.set_regen_file(settings["regen_file"].."regen_5a.txt");
                
                d.jump_all(Position_5[1], Position_5[2])
                
                ShadowZoneLIB.setCoolTimer();
                server_timer("ShadowZone_FifthFloor", FifthFloorTimer, d.get_map_index())
            
            ---- Set and jump 6th floor
            elseif Floor == 5 then
                local Position_6 = settings["pos_6_floor"]
                local PillarPos = settings["fourth_stone_pos"]
                local BossPos = settings["fourth_boss_pos"]
                local SixthFloorTimer = settings["timer_sixth_floor"]
                
                setskin(NOWINDOW);
                npc.purge();
                                    
                d.setf("ShadowZone_floor", 6);
                d.setf("ShadowZone_PillarActive", 1);
                
                d.spawn_mob(FOURTH_STONE, PillarPos[1],PillarPos[2]);
                d.spawn_mob(FOURTH_BOSS, BossPos[1],BossPos[2]);
                d.set_regen_file(settings["regen_file"].."regen_6a.txt");
                
                d.jump_all(Position_6[1], Position_6[2])
                
                ShadowZoneLIB.setCoolTimer();
                server_timer("ShadowZone_SixthFloor", SixthFloorTimer, d.get_map_index())
            
            ---- Set and jump 7th floor
            elseif Floor == 6 then
                local Position_7 = settings["pos_7_floor"]
                
                addimage(25, 10, "shadowzone_bg2.tga"); say("[ENTER][ENTER]")
                say_title(mob_name(9376))
                say("[ENTER]Devam etmek istiyorsanız, tüm insanların ihtiyacı var:")
                say_item(""..item_name(ITEM_SOUL).."", ITEM_SOUL, "")
                say_reward("Olmayanlar olacak [ENTER] devam ettikten sonra zindandan ayılacaktır.")
                
                if (select("Devam", "Çıkış") == 1) then
                    setskin(NOWINDOW);
                    npc.purge();
                    
                    d.exit_all_by_item_group ("ShadowZone_6F_ticket"); d.delete_item_in_item_group_from_all ("ShadowZone_6F_ticket");
                    d.setf("ShadowZone_floor", 7);
                    
                    d.regen_file(settings["regen_file"].."regen_7a.txt");
                    
                    ShadowZoneLIB.noCoolTimer();
                    
                    d.jump_all(Position_7[1], Position_7[2])
                end
                
            ---- Set and jump 8th floor
            elseif Floor == 7 then
                local Position_8 = settings["pos_8_floor"]
            for index = 1, table.getn(Items) do
                pc.remove_item(Items[index], pc.count_item(Items[index]));
            end
            
            if not pc.is_gm() then
                pc.setf("shadow_dungeon","exit_shadow_dungeon_time", get_global_time())
                pc.setqf("shadow_dungeon", get_time() + settings["dungeon_cooldown"])
            end
        end
    end
end

Lua (Quest):
ShadowZoneLIB = {};

ShadowZoneLIB.Settings = function()
    if (ShadowZoneLIB.data == nil) then
        ShadowZoneLIB.data = {
            --------------------------------------           
            -- Map settings (Coordinates, indexes)
            ["third_stone"] = 8496,
            
            ["bosses"] = {4382, 4383, 4384, 4385, 4386, 4387},  --- All bosses of the dungeon
            
            ---States
            ["REAPER_HP_1"] = 350000,
            ["REAPER_HP_2"] = 450000,
            ["REAPER_HP_3"] = 550000,
            ["REAPER_HP_4"] = 650000,

            ["ABBADON_HP_NORMAL"] = 600000,  --- This HP will be set for 6th boss (4387) if Shadow amulet (30850) ISN'T active
            ["time_to_kill_final_boss"] = 300, --- Time to finish first floor (destroy 3x stone), otherwise they will be teleported out of the dungeon
            
            ["time_to_destroy_finalstone"] = 240,
            
            ["time_to_final_exit"] = 120, -- After that time, players will be teleported out of dungeon
            
            ["dungeon_cooldown"] = 3600, --- Time until players can't enter dungeon afte they finish it
            };
    end
    
    return ShadowZoneLIB.data;
end

ShadowZoneLIB.isActive = function()
    local pMapIndex = pc.get_map_index(); local map_index = ShadowZoneLIB.Settings()["inside_index"];
    
    return pc.in_dungeon() and pMapIndex >= map_index*10000 and pMapIndex < (map_index+1)*10000;
end
ShadowZoneLIB.spawnPortalGate = function()
    local settings = ShadowZoneLIB.Settings();
    local Floor = d.getf("ShadowZone_floor")
    local PortalGate = settings["portal_gate"]
    local Position = settings["portal_gate_pos"]
    
    if Floor == 1 then
        d.spawn_mob_dir(PortalGate, Position[1][1], Position[1][2], Position[1][3]);
    elseif Floor == 2 then
        d.spawn_mob_dir(PortalGate, Position[2][1], Position[2][2], Position[2][3]);
    elseif Floor == 3 then
        d.spawn_mob_dir(PortalGate, Position[3][1], Position[3][2], Position[3][3]);
    elseif Floor == 4 then
        d.spawn_mob_dir(PortalGate, Position[4][1], Position[4][2], Position[4][3]);
    elseif Floor == 6 then
        d.spawn_mob_dir(PortalGate, Position[5][1], Position[5][2], Position[5][3]);
    elseif Floor == 7 then
        d.spawn_mob_dir(PortalGate, Position[6][1], Position[6][2], Position[6][3]);
    elseif Floor == 8 then
        d.spawn_mob_dir(PortalGate, Position[7][1], Position[7][2], Position[7][3]);
    end
end

ShadowZoneLIB.spawnThirdStone = function()
    local settings = ShadowZoneLIB.Settings();
    local Stone = settings["third_stone"];
    local stone_pos = settings["third_stone_pos"];
    local n = number(1,10);             

    table_shuffle(stone_pos);

    d.set_unique ("real_stone", d.spawn_mob(Stone, stone_pos[n][1], stone_pos[n][2]))
end


ShadowZoneLIB.clearCoolTimer = function()
    if party.is_party() then
        for _, pid in pairs({party.get_member_pids()}) do
            q.begin_other_pc_block(pid);
            
            cmdchat("ClearDungeonCoolTime");
            
            q.end_other_pc_block();
        end
    
    else
    
        cmdchat("ClearDungeonCoolTime");       
    end
end


ShadowZoneLIB.setCoolTimer = function()
    local settings = ShadowZoneLIB.Settings();
    local Floor = d.getf("ShadowZone_floor")
    local FinalStone = d.getf("ShadowZone_9f_StoneD")
    local FinalBoss = d.getf("ShadowZone_FinalBoss")
        
        if Floor == 1 then
            d.setf("ShadowZone_floor1_timer", settings["timer_first_floor"]);   
            cmdchat(string.format("SetDungeonCoolTime %d %d", Floor, d.getf("ShadowZone_floor1_timer")))
        
        elseif Floor == 2 then
            d.setf("ShadowZone_floor2_timer", settings["timer_second_floor"]);   
            cmdchat(string.format("SetDungeonCoolTime %d %d", Floor, d.getf("ShadowZone_floor2_timer")))
        
        elseif Floor == 4 then
            d.setf("ShadowZone_floor4_timer", settings["timer_fourth_floor"]);   
            cmdchat(string.format("SetDungeonCoolTime %d %d", Floor, d.getf("ShadowZone_floor4_timer")))
        
        elseif Floor == 5 then
            d.setf("ShadowZone_floor5_timer", settings["timer_fifth_floor"]);   
            cmdchat(string.format("SetDungeonCoolTime %d %d", Floor, d.getf("ShadowZone_floor5_timer")))
        
        elseif Floor == 6 then
            d.setf("ShadowZone_floor6_timer", settings["timer_sixth_floor"]);   
            cmdchat(string.format("SetDungeonCoolTime %d %d", Floor, d.getf("ShadowZone_floor6_timer")))
        
        elseif Floor == 8 then
            d.setf("ShadowZone_floor8_timer", settings["timer_eight_floor"]);   
            cmdchat(string.format("SetDungeonCoolTime %d %d", Floor, d.getf("ShadowZone_floor8_timer")))
        end
        
        if FinalStone == 1 then
            d.setf("ShadowZone_floor9_timer1", settings["time_to_destroy_finalstone"]);   
            cmdchat(string.format("SetDungeonCoolTime %d %d", Floor, d.getf("ShadowZone_floor9_timer1")))
        end
        
        if FinalBoss == 1 then
            d.setf("ShadowZone_floor9_timer2", settings["time_to_kill_final_boss"]);   
            cmdchat(string.format("SetDungeonCoolTime %d %d", Floor, d.getf("ShadowZone_floor9_timer2")))
        end
    end
end
 
3 tane tanımsız fonksiyon olduğunu belirtiyor. O fonksiyonları tanımlayın. Birde dosyanın karakter kodlaması nedir?
 
İlk hatada var olmayan bir fonksiyonu çağırmaya çalıştığı için hata veriyor. Muhtemelen quest_functions dosyasına da ekleme yapman gerekiyor.
Son iki hatada ise quest kodları 'quest' ile başlamadığı için tanınmıyor ve okumuyor.
 
3 tane tanımsız fonksiyon olduğunu belirtiyor. O fonksiyonları tanımlayın. Birde dosyanın karakter kodlaması nedir?
İlaveten, quest Valentine2021_enter begin diye başlıyor quest ama dosya adı farklı onları kontrol eder misin?

Ayrıca questte görsel eklenmiş, sen böyle bir tanımlama yapmadığın için hata veriyor olabilir.

addimage komutunun geçtiği yerler...

Quest resim ekleme konusunu bir gözden geçirir misin?
 
Herkese teşekkürler, dediklerinizi dikkate alarak biraz ugraştim ama en sonunda ben bu zindani projemden kaldirmaya karar verdim dolayisiyla bu sorunu çözmeme gerek kalmadı, kapatılabilir
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst