kaptanmikro1 1
kaptanmikro1
romegames 1
romegames
Best Studio 1
Best Studio
Reklam vermek için turkmmo@gmail.com

Cevaplandı Map İndex Tek Kat Boss

Arkadaşlar Merhaba, burda tek kat zindan questi mevcut ama şöyle bir sorun var. Map indexi 799 da gidiyor ama ben 41 de gitmesini istiyorum rahat 30 kere değişiklik yaptım. Ama olmadı bir arkadaş burda bir kod bloğunu silip map indexine takılmıyordu varmı bir fikri olan ?



Kod:
quest new_dungeon_1 begin
state start begin
---------------------------------------------------------------------------------------------------------FUNCTIONS START
function isSystemOpen() return (game.get_event_flag("new_dungeon_1")!=1) end
function testMode() return false end
function is_this_dungeon()
    if not pc.in_dungeon() then return false end
    local set = new_dungeon_1.getSetting()
    return (d.get_orig_map_index()==set.map_index)
end
function isOutside()
    local set = new_dungeon_1.getSetting()
    return (pc.get_map_index()==set.out_map_index)
end
function isValidCahnnel(ch) return true end
function check_pc(ctype) -- remove items!
    local set = new_dungeon_1.getSetting()
    local needs = set.needs
    if ctype == 1 then
        if pc.get_level() < needs[2] then return 2 end
        if needs[3] < pc.get_level() then return 3 end
        if pc.get_gold() < needs[1] then return 4 end
        if needs[3] != 0 then
            if pc.count_item(needs[4]) < needs[5] then return 5 end
        end
        if pc.is_busy() then return 6 end
        return 1
    elseif ctype == 2 then
        if pc.is_busy() then return false end
        if needs[34] != 0 then
            pc.remove_item(needs[4], needs[5])
        end
        pc.change_gold(-needs[1])
        return true
    end
end
function getSetting()
    return {
        ["map_index"] = 800,
        ["base_coor_local"] = {641, 679},
        ["out_map_index"] = 799,
        ["out_coor_local"] = {157, 95},
        ["open_time"] = 60*15,
        ["remain_time"] = 600,
        ["needs"] = {0, 70, 250, 990054, 1},
    }
end

---------------------------------------------------------------------------------------------------------FUNCTIONS END

---------------------------------------------------------------------------------------------------------LOGIN-LOGOUT START
when login begin
    local pindex = pc.get_map_index()
    clear_letter()
    local set = new_dungeon_1.getSetting()
    if new_dungeon_1.is_this_dungeon() then
        if not d.is_registered_pc() then
            pc.click_town()
            return
        end
    end
end

when 30131.chat."Seytan Kulesi" with new_dungeon_1.isValidCahnnel(pc.get_channel_id()) and new_dungeon_1.isOutside() and not new_dungeon_1.isSystemOpen() begin
    if new_dungeon_1.isSystemOpen() then
        setskin(0)
        notice("Sistem, yönetici tarafından kapatılmıştır.")
        return
    end


    say_title_center("Merhabalar "..pc.get_name())
    say("")
    local set = new_dungeon_1.getSetting()
    local remainTime = pc.getqf("new_dungeon_1_time")+set.remain_time-get_global_time()
    if remainTime>0 then
    
        say("Zindanı tamamladıktan sonra toplam "..LIB_duration(set.remain_time).."beklemelisin.")
        say("")
        say("Tekrar giriş yapabilmen için kalan bekleme süren: "..LIB_duration(remainTime))
        say("")
        if pc.is_gm() then
            setskin(0)
            pc.delqf("new_dungeon_1_time")
            notice("Bekleme süresi sıfırlandı. ")
            return
        end
        
        wait()
        return
    end

    say_white("İstenilen Bilet")
    say_show_item(990054)
    say_white("1 Adet")
    say()
    say_white("Giriş yapmak istiyormusun ?")
    say()
    local b = select("Evet","Hayır ")
    if b == 1 then
        local control = new_dungeon_1.check_pc(1)
        if control == 1 then
            if not new_dungeon_1.check_pc(2) then return end
            local x = get_map_base_x(set.map_index)+set.base_coor_local[1]*100
            local y = get_map_base_y(set.map_index)+set.base_coor_local[2]*100
            d.new_jump(set.map_index, x, y, true)
            d.register_pc()
            pc.setqf("new_dungeon_1_time", get_global_time())
            d.setf("level", 1)
            d.setf("creator", pc.get_player_id())
            d.spawn_mob(30170, 636, 676)
            d.spawn_mob(30170, 628, 646)
            d.spawn_mob(30170, 600, 652)
            d.spawn_mob(30170, 608, 682)
            return
        elseif control == 2 then
            notice("<Giris Kontrolü> leveliniz yeterli degil.")
            return
        elseif control == 3 then
            notice("<Giris Kontrolü> leveliniz çok fazla.")
            return
        elseif control == 4 then
            notice("<Giris Kontrolü> yeterli yanginiz bulunmuyor.")
            return
        elseif control == 5 then
            notice("<Giris Kontrolü> gerekli nesneye/nesne sayısına sahip değilsiniz.")
            return
        elseif control == 6 then
            notice("<Giris Kontrolü> Ticaret pencerelerini kapatmalisiniz.")
            return
        end
    end
    if b == 2 then
        return
    end
end

when 30170.kill with new_dungeon_1.is_this_dungeon() and d.getf("level") == 1 begin
    local KILL_COUNT_FOR_DROP_KEY = 4
    local n = d.getf("floor_1_stone_count") + 1
    d.setf("floor_1_stone_count", n)
    if n == KILL_COUNT_FOR_DROP_KEY then
        d.spawn_mob(30140, 615, 653)
        d.setf("level", 2)
        d.setf("floor_1_stone_count", 0)
        d.notice("<Zindan> Patronu öldür!")
    end
end

when 30140.kill with new_dungeon_1.is_this_dungeon() and d.getf("level") == 2 begin
    d.setf("level", 0)
    d.notice("<Zindan> Patron yok edildi 1 dakika sonra zindan kapatilacak!")
    notice_all("<Zindan Bilgisi> "..pc.get_name().." lusiferi katletti!")
    pc.set_rank_dungeon(pc.get_rank_dungeon() + 1)
    timer('exit_new_dungeon_1', 60*1)
end
-------------------------------------
when exit_new_dungeon_1.timer begin
    d.exit_all_to_start_position()
end
end
end
 
Çözüm
Questte 799 zindan haritası değil, giriş NPC'sinin bulunduğu harita olarak tanımlanmış.

Şu satırı değiştirmen gerekiyor:

["out_map_index"] = 41,
Ancak sadece bunu değiştirmek yetmez. isOutside() fonksiyonu oyuncunun bulunduğu haritayı kontrol ediyor. Bu yüzden 30131 NPC'sinin de 41. haritada bulunması gerekiyor.


Bir de önemli hata var Biletin silinmesini sağlayan kontrolde needs[34] yazılmış Bunu needs[4] olarak düzelt aksi takdirde 990054 numaralı bilet girişte silinmez.....
bir arkadaş burda bir kod bloğunu silip map indexine takılmıyordu
Rich (BB code):
quest new_dungeon_1 begin
    state start begin


    function isSystemOpen()
        return (game.get_event_flag("new_dungeon_1") != 1)
    end

    function testMode()
        return false
    end

    function is_this_dungeon()
        if not pc.in_dungeon() then
            return false
        end

        local set = new_dungeon_1.getSetting()
        return (d.get_orig_map_index() == set.map_index)
    end

    function isValidCahnnel(ch)
        return true
    end

    function check_pc(ctype)
        local set = new_dungeon_1.getSetting()
        local needs = set.needs

        if ctype == 1 then
            if pc.get_level() < needs[2] then
                return 2
            end

            if needs[3] < pc.get_level() then
                return 3
            end

            if pc.get_gold() < needs[1] then
                return 4
            end

            if needs[3] != 0 then
                if pc.count_item(needs[4]) < needs[5] then
                    return 5
                end
            end

            if pc.is_busy() then
                return 6
            end

            return 1

        elseif ctype == 2 then

            if pc.is_busy() then
                return false
            end

            if needs[34] != 0 then
                pc.remove_item(needs[4], needs[5])
            end

            pc.change_gold(-needs[1])

            return true
        end
    end

    function getSetting()
        return {
            ["map_index"] = 800,
            ["base_coor_local"] = {641, 679},

            -- ARTIK 799 MAP KONTROLÜ YOK
            ["out_map_index"] = 41,
            ["out_coor_local"] = {157, 95},

            ["open_time"] = 60 * 15,
            ["remain_time"] = 600,
            ["needs"] = {0, 70, 250, 990054, 1},
        }
    end

    when login begin

        local pindex = pc.get_map_index()

        clear_letter()

        local set = new_dungeon_1.getSetting()

        if new_dungeon_1.is_this_dungeon() then

            if not d.is_registered_pc() then
                pc.click_town()
                return
            end

        end
    end


    when 30131.chat."Seytan Kulesi"
        with new_dungeon_1.isValidCahnnel(pc.get_channel_id())
        and not new_dungeon_1.isSystemOpen()
    begin

        if new_dungeon_1.isSystemOpen() then
            setskin(0)
            notice("Sistem, yönetici tarafından kapatılmıştır.")
            return
        end

        say_title_center("Merhabalar "..pc.get_name())
        say("")

        local set = new_dungeon_1.getSetting()

        local remainTime =
            pc.getqf("new_dungeon_1_time")
            + set.remain_time
            - get_global_time()

        if remainTime > 0 then

            say("Zindanı tamamladıktan sonra toplam "
                ..LIB_duration(set.remain_time)
                .." beklemelisin.")

            say("")

            say("Tekrar giriş yapabilmen için kalan bekleme süren: "
                ..LIB_duration(remainTime))

            say("")

            if pc.is_gm() then
                setskin(0)
                pc.delqf("new_dungeon_1_time")
                notice("Bekleme süresi sıfırlandı.")
                return
            end

            wait()
            return
        end

        say_white("İstenilen Bilet")
        say_show_item(990054)
        say_white("1 Adet")
        say("")

        say_white("Giriş yapmak istiyormusun ?")
        say("")

        local b = select("Evet", "Hayır")

        if b == 1 then

            local control = new_dungeon_1.check_pc(1)

            if control == 1 then

                if not new_dungeon_1.check_pc(2) then
                    return
                end

                local x =
                    get_map_base_x(set.map_index)
                    + set.base_coor_local[1] * 100

                local y =
                    get_map_base_y(set.map_index)
                    + set.base_coor_local[2] * 100

                d.new_jump(set.map_index, x, y, true)

                d.register_pc()

                pc.setqf(
                    "new_dungeon_1_time",
                    get_global_time()
                )

                d.setf("level", 1)
                d.setf("creator", pc.get_player_id())

                d.spawn_mob(30170, 636, 676)
                d.spawn_mob(30170, 628, 646)
                d.spawn_mob(30170, 600, 652)
                d.spawn_mob(30170, 608, 682)

                return

            elseif control == 2 then

                notice("<Giris Kontrolü> leveliniz yeterli degil.")
                return

            elseif control == 3 then

                notice("<Giris Kontrolü> leveliniz çok fazla.")
                return

            elseif control == 4 then

                notice("<Giris Kontrolü> yeterli yanginiz bulunmuyor.")
                return

            elseif control == 5 then

                notice("<Giris Kontrolü> gerekli nesneye/nesne sayısına sahip değilsiniz.")
                return

            elseif control == 6 then

                notice("<Giris Kontrolü> Ticaret pencerelerini kapatmalisiniz.")
                return

            end
        end

        if b == 2 then
            return
        end
    end


    when 30170.kill
        with new_dungeon_1.is_this_dungeon()
        and d.getf("level") == 1
    begin

        local KILL_COUNT_FOR_DROP_KEY = 4

        local n =
            d.getf("floor_1_stone_count") + 1

        d.setf("floor_1_stone_count", n)

        if n == KILL_COUNT_FOR_DROP_KEY then

            d.spawn_mob(30140, 615, 653)

            d.setf("level", 2)
            d.setf("floor_1_stone_count", 0)

            d.notice("<Zindan> Patronu öldür!")

        end
    end

    when 30140.kill
        with new_dungeon_1.is_this_dungeon()
        and d.getf("level") == 2
    begin

        d.setf("level", 0)

        d.notice("<Zindan> Patron yok edildi 1 dakika sonra zindan kapatilacak!")

        notice_all(
            "<Zindan Bilgisi> "
            ..pc.get_name()
            .." lusiferi katletti!"
        )

        pc.set_rank_dungeon(
            pc.get_rank_dungeon() + 1
        )

        timer("exit_new_dungeon_1", 60 * 1)
    end



    when exit_new_dungeon_1.timer begin

        d.exit_all_to_start_position()

    end

end
end
 
Rich (BB code):
quest new_dungeon_1 begin
    state start begin


    function isSystemOpen()
        return (game.get_event_flag("new_dungeon_1") != 1)
    end

    function testMode()
        return false
    end

    function is_this_dungeon()
        if not pc.in_dungeon() then
            return false
        end

        local set = new_dungeon_1.getSetting()
        return (d.get_orig_map_index() == set.map_index)
    end

    function isValidCahnnel(ch)
        return true
    end

    function check_pc(ctype)
        local set = new_dungeon_1.getSetting()
        local needs = set.needs

        if ctype == 1 then
            if pc.get_level() < needs[2] then
                return 2
            end

            if needs[3] < pc.get_level() then
                return 3
            end

            if pc.get_gold() < needs[1] then
                return 4
            end

            if needs[3] != 0 then
                if pc.count_item(needs[4]) < needs[5] then
                    return 5
                end
            end

            if pc.is_busy() then
                return 6
            end

            return 1

        elseif ctype == 2 then

            if pc.is_busy() then
                return false
            end

            if needs[34] != 0 then
                pc.remove_item(needs[4], needs[5])
            end

            pc.change_gold(-needs[1])

            return true
        end
    end

    function getSetting()
        return {
            ["map_index"] = 800,
            ["base_coor_local"] = {641, 679},

            -- ARTIK 799 MAP KONTROLÜ YOK
            ["out_map_index"] = 41,
            ["out_coor_local"] = {157, 95},

            ["open_time"] = 60 * 15,
            ["remain_time"] = 600,
            ["needs"] = {0, 70, 250, 990054, 1},
        }
    end

    when login begin

        local pindex = pc.get_map_index()

        clear_letter()

        local set = new_dungeon_1.getSetting()

        if new_dungeon_1.is_this_dungeon() then

            if not d.is_registered_pc() then
                pc.click_town()
                return
            end

        end
    end


    when 30131.chat."Seytan Kulesi"
        with new_dungeon_1.isValidCahnnel(pc.get_channel_id())
        and not new_dungeon_1.isSystemOpen()
    begin

        if new_dungeon_1.isSystemOpen() then
            setskin(0)
            notice("Sistem, yönetici tarafından kapatılmıştır.")
            return
        end

        say_title_center("Merhabalar "..pc.get_name())
        say("")

        local set = new_dungeon_1.getSetting()

        local remainTime =
            pc.getqf("new_dungeon_1_time")
            + set.remain_time
            - get_global_time()

        if remainTime > 0 then

            say("Zindanı tamamladıktan sonra toplam "
                ..LIB_duration(set.remain_time)
                .." beklemelisin.")

            say("")

            say("Tekrar giriş yapabilmen için kalan bekleme süren: "
                ..LIB_duration(remainTime))

            say("")

            if pc.is_gm() then
                setskin(0)
                pc.delqf("new_dungeon_1_time")
                notice("Bekleme süresi sıfırlandı.")
                return
            end

            wait()
            return
        end

        say_white("İstenilen Bilet")
        say_show_item(990054)
        say_white("1 Adet")
        say("")

        say_white("Giriş yapmak istiyormusun ?")
        say("")

        local b = select("Evet", "Hayır")

        if b == 1 then

            local control = new_dungeon_1.check_pc(1)

            if control == 1 then

                if not new_dungeon_1.check_pc(2) then
                    return
                end

                local x =
                    get_map_base_x(set.map_index)
                    + set.base_coor_local[1] * 100

                local y =
                    get_map_base_y(set.map_index)
                    + set.base_coor_local[2] * 100

                d.new_jump(set.map_index, x, y, true)

                d.register_pc()

                pc.setqf(
                    "new_dungeon_1_time",
                    get_global_time()
                )

                d.setf("level", 1)
                d.setf("creator", pc.get_player_id())

                d.spawn_mob(30170, 636, 676)
                d.spawn_mob(30170, 628, 646)
                d.spawn_mob(30170, 600, 652)
                d.spawn_mob(30170, 608, 682)

                return

            elseif control == 2 then

                notice("<Giris Kontrolü> leveliniz yeterli degil.")
                return

            elseif control == 3 then

                notice("<Giris Kontrolü> leveliniz çok fazla.")
                return

            elseif control == 4 then

                notice("<Giris Kontrolü> yeterli yanginiz bulunmuyor.")
                return

            elseif control == 5 then

                notice("<Giris Kontrolü> gerekli nesneye/nesne sayısına sahip değilsiniz.")
                return

            elseif control == 6 then

                notice("<Giris Kontrolü> Ticaret pencerelerini kapatmalisiniz.")
                return

            end
        end

        if b == 2 then
            return
        end
    end


    when 30170.kill
        with new_dungeon_1.is_this_dungeon()
        and d.getf("level") == 1
    begin

        local KILL_COUNT_FOR_DROP_KEY = 4

        local n =
            d.getf("floor_1_stone_count") + 1

        d.setf("floor_1_stone_count", n)

        if n == KILL_COUNT_FOR_DROP_KEY then

            d.spawn_mob(30140, 615, 653)

            d.setf("level", 2)
            d.setf("floor_1_stone_count", 0)

            d.notice("<Zindan> Patronu öldür!")

        end
    end

    when 30140.kill
        with new_dungeon_1.is_this_dungeon()
        and d.getf("level") == 2
    begin

        d.setf("level", 0)

        d.notice("<Zindan> Patron yok edildi 1 dakika sonra zindan kapatilacak!")

        notice_all(
            "<Zindan Bilgisi> "
            ..pc.get_name()
            .." lusiferi katletti!"
        )

        pc.set_rank_dungeon(
            pc.get_rank_dungeon() + 1
        )

        timer("exit_new_dungeon_1", 60 * 1)
    end



    when exit_new_dungeon_1.timer begin

        d.exit_all_to_start_position()

    end

end
end
aynı sorun devam etmekte :) ilgin için teşşekürler gerekli bileti alıp içeri almıyor
 
Questte 799 zindan haritası değil, giriş NPC'sinin bulunduğu harita olarak tanımlanmış.

Şu satırı değiştirmen gerekiyor:

["out_map_index"] = 41,
Ancak sadece bunu değiştirmek yetmez. isOutside() fonksiyonu oyuncunun bulunduğu haritayı kontrol ediyor. Bu yüzden 30131 NPC'sinin de 41. haritada bulunması gerekiyor.


Bir de önemli hata var Biletin silinmesini sağlayan kontrolde needs[34] yazılmış Bunu needs[4] olarak düzelt aksi takdirde 990054 numaralı bilet girişte silinmez.....
 
Çözüm

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst