Yardım dragon_soul questı okuttum bı hata aldım ıncelermısnız daha once vermemısti

Konu sahibi bu konuda soru soruyor. Sorusu ile ilgili bilgisi olanların yanıtlamasını bekliyor.

coskun66

Üye
Üye
Mesaj
105
Çözümler
4
Beğeni
30
Puan
699
Ticaret Puanı
0
daha once calısıyordu sımdı calısmıyor cozemedım zamanını falan ayarlamak ıstıyorum.
Lua (Quest):
quest dragon_soul begin
    state start begin
        function fark_al(numb_1, numb_2)
if numb_1>=numb_2 then
return numb_1-numb_2
else numb_2>numb_1 then
return numb_2-numb_1
end
end
when levelup or letter with pc.level >= 30 begin
            send_letter(gameforge.dragon_soul._1010_sendLetter)
            local v = find_npc_by_vnum(20001)
            if 0 != v then
                target.vid("__TARGET__", v, mob_name(20001))
            end
        end
        when info or button begin
            say(gameforge.dragon_soul._1020_say)
        end
        when 20001.chat.gameforge.dragon_soul._1030_npcChat with pc.level >= 30 begin
            target.delete("__TARGET__")
            say_title(mob_name(20001))
            say(gameforge.dragon_soul._1040_say)
            set_state(state_learning)
        end
    end
    state state_learning begin
        when letter begin
            send_letter(gameforge.dragon_soul._1050_sendLetter)
        end
        when info or button begin
            say(gameforge.dragon_soul._1060_say)
        end
        when kill begin
            if npc.is_pc() then
                return
            end
            ------------
            if pc.get_map_index() >= 2400000 and pc.get_map_index() <= 2405000 or pc.get_map_index() >= 2350000 and pc.get_map_index() <= 2355000 then
            return
            else
            -----------------------
                if pc.getf("dragon_soul","drop_on") == 1 then
                    if pc.count_item(30270) < 15 then
                        if drop_gamble_with_flag("ds_drop") then
local level_ayari=15 -- Mob ile karakter arasında level farkı 10 dan fazla olursa item düşmez. Değiştirebilirsiniz.
if dragon_soul.fark_al(pc.get_level(), get_mob_level(npc.get_race())) <= level_ayari then
local oran_ver=50 -- İstediğiniz oranı verebilirsiniz. 1 ile 100 arasında, arttırdıkça düşme oranı da artar.
if number(1,100)<=oran_ver then
game.drop_item_with_ownership(30270)
end
end
                        end
                    end
                end
            -------------------------
            end
            ------------
        end
        when 20001.chat.gameforge.dragon_soul._1050_sendLetter begin
            say_title(mob_name(20001))
            if pc.count_item(30270) >= 10 then
                say(gameforge.dragon_soul._1070_say)
                pc.remove_item(30270, 10)
                ds.give_qualification()
                char_log(pc.get_player_id(), 'DS_QUALIFICATION', 'SUCCESS')
                pc.give_item2(50255)
                local today = math.floor(get_global_time() / 7200)
                pc.setf("dragon_soul", "eye_timestamp", today)
                pc.setf("dragon_soul", "eye_left", 3)
                set_state(state_farming)
            else
                say(gameforge.dragon_soul._1080_say)
            end
        end
    end
    state state_farming begin
        when letter begin
            send_letter(gameforge.dragon_soul._1090_sendLetter)
        end
        when info or button begin
            say(string.format(gameforge.dragon_soul._1100_say, pc.getf("dragon_soul", "eye_left")))
        end
        when kill begin
            if npc.is_pc() then
                return
            end
            ---------
            if pc.get_map_index() >= 2400000 and pc.get_map_index() <= 2405000 or pc.get_map_index() >= 2350000 and pc.get_map_index() <= 2355000 then
            return
            else
            ------------------------------------
                if pc.getf("dragon_soul","drop_on") == 1 then
                if drop_gamble_with_flag("ds_drop") then
                    local eye_left = pc.getf("dragon_soul", "eye_left")
                    local haved_gemstone_number = pc.count_item(30270)
                    if eye_left > haved_gemstone_number / 10 then
local level_ayari=10 -- Mob ile karakter arasında level farkı 10 dan fazla olursa item düşmez. Değiştirebilirsiniz.
if dragon_soul.fark_al(pc.get_level(), get_mob_level(npc.get_race())) <= level_ayari then
local oran_ver=50 -- İstediğiniz oranı verebilirsiniz. 1 ile 100 arasında, arttırdıkça düşme oranı da artar.
if number(1,100)<=oran_ver then
game.drop_item_with_ownership(30270)
end
end
                    end
                end
                end
                ----------------------------
            end
            -----------
        end
        when 30270.pick begin
            local eye_left = pc.getf("dragon_soul", "eye_left")
            if eye_left <= 0 then
                return
            end
            if pc.count_item(30270) >= 10 then
                pc.setf("dragon_soul", "eye_left", eye_left - 1)
                pc.remove_item(30270, 10)
                pc.give_item2(50255)
                if 1 == eye_left then
                    notice_multiline(gameforge.dragon_soul._1110_notice, notice)
                    set_state(state_closed_season)
                end
            end
        end
        when 20001.chat.gameforge.dragon_soul._1120_npcChat begin
            say_title(mob_name(20001))
            local today = math.floor(get_global_time() / 7200)
            if today == pc.getf("dragon_soul", "eye_timestamp") then
                say(gameforge.dragon_soul._1130_say)
            else
                say(gameforge.dragon_soul._1140_say)
                pc.setf("dragon_soul", "eye_timestamp", today)
                pc.setf("dragon_soul", "eye_left", 3)
                pc.setf("dragon_soul","drop_on",1)
            end
        end
    end
    state state_closed_season begin
        when letter begin
            send_letter(gameforge.dragon_soul._1150_sendLetter)
        end
        when info or button begin
            say(gameforge.dragon_soul._1160_say)
            local today = math.floor(get_global_time() / 7200)
            if today == pc.getf("dragon_soul", "eye_timestamp") then
                say(gameforge.dragon_soul._1170_say)
            else
                say(gameforge.dragon_soul._1180_say)
            end
        end

        when 20001.chat.gameforge.dragon_soul._1090_sendLetter begin
            say_title(mob_name(20001))
            local today = math.floor(get_global_time() / 7200)
            if today == pc.getf("dragon_soul", "eye_timestamp") then
                say(gameforge.dragon_soul._1130_say)
            else
                say(gameforge.dragon_soul._1140_say)
                pc.setf("dragon_soul", "eye_timestamp", today)
                pc.setf("dragon_soul", "eye_left", 3)
                set_state(state_farming)
            end
        end
    end
    -- deprecated states. so, jump to new state.
    state state_1 begin
        when login begin
            set_state(state_learning)
        end
    end
    state state_2 begin
        when login begin
            set_state(state_learning)
        end
    end
    state state_3 begin
        when login begin
            set_state(state_closed_season)
        end
    end
end

@Whistle

dragon soul.PNG
 
En son bir moderatör tarafından düzenlenmiş:
Lua (Quest):
quest dragon_soul begin
    state start begin
        when login begin
            if pc.getqf("give_qualification") == 0 then
                ds.give_qualification()
                pc.setqf("give_qualification",1)
            end
            set_state(state_farming)
        end
    end
    state state_farming begin
        when letter begin
            send_letter(gameforge.dragon_soul._1090_sendLetter)
        end
        when info or button begin
            say(string.format(gameforge.dragon_soul._1100_say, pc.getf("dragon_soul", "eye_left")))
        end
        when kill begin
            if npc.is_pc() then
                return
            end
            ---------
            if pc.get_map_index() >= 2400000 and pc.get_map_index() <= 2405000 or pc.get_map_index() >= 2350000 and pc.get_map_index() <= 2355000 then
            return
            else
            ------------------------------------
                if pc.getf("dragon_soul","drop_on") == 1 then
                if drop_gamble_with_flag("ds_drop") then
                    game.drop_item_with_ownership(30270)
                end
                end
                ----------------------------
            end
            -----------
        end
        when 30270.pick begin
            if pc.count_item(30270) >= 10 then
                pc.remove_item(30270, 10)
                pc.give_item2(50255)
            end
        end
    end
end
BUDA BENIM CALISAN QUESTIM FAKAT BUNDA NE LEVEL VAR NEDE SINIR :)
 
Resimde get_mob_level isimli fonksiyonu bulamadığını söylüyor. O yüzden quest düzgün çalışmıyor olabilir.
 
Resimde get_mob_level isimli fonksiyonu bulamadığını söylüyor. O yüzden quest düzgün çalışmıyor olabilir.
Serverin questini verdim adminim bu fileste oto arındırma olduğundan fonksiyon karı farklı galiba bu yuzdenmi sorun oluyor bide o questte level falan belirtmemiş biz ekleyerek bilirmiyiz eklersek nasıl yapmaliyiz
 
dragon-soul-png.1636

Burada bulamadığı fonksiyonların listesini sonda vermiş.
 
Kaynak kodlarında fonksiyon varsa quest içindeki quest_functions dosyasına fonksiyonu eklemeniz gerek.
 
@Whistle dediğimizi anladım ama buna gerek yok diye düşünüyorum. Çünkü oyunun kendi questinde ki çalışıyor ama farmlik sw ye gore kodlanmis yukarda verdiğim 2 tane kod var 1 i az olan oyunda çalışan diğeri çalışmayan bana çalışmayan lazim o queste funcdion eklenemezmi bi yardımcı olsanız o konuda
 
Şöyle anlatayım ben files değiştirdim aldığım daha kapsamlı bir sw ama oda darm olduğundan questi o şekilde ve get_funcdion u da uymuyordu hali ole bu questi funcdionlarini ayarlayamazmiyiz
 
sayın @Whistle sıze soyle anlatayım
Lua (Quest):
quest dragon_soul begin
    state start begin
        when login begin
            if pc.getqf("give_qualification") == 0 then
                ds.give_qualification()
                pc.setqf("give_qualification",1)
            end
            set_state(state_farming)
        end
    end
    state state_farming begin
        when letter begin
            send_letter(gameforge.dragon_soul._1090_sendLetter)
        end
        when info or button begin
            say(string.format(gameforge.dragon_soul._1100_say, pc.getf("dragon_soul", "eye_left")))
        end
        when kill begin
            if npc.is_pc() then
                return
            end
            ---------
            if pc.get_map_index() >= 2400000 and pc.get_map_index() <= 2405000 or pc.get_map_index() >= 2350000 and pc.get_map_index() <= 2355000 then
            return
            else
            ------------------------------------
                if pc.getf("dragon_soul","drop_on") == 1 then
                if drop_gamble_with_flag("ds_drop") then
                    game.drop_item_with_ownership(30270)
                end
                end
                ----------------------------
            end
            -----------
        end
        when 30270.pick begin
            if pc.count_item(30270) >= 10 then
                pc.remove_item(30270, 10)
                pc.give_item2(50255)
            end
        end
    end
end
bu benım suankı yenı aldıgım fıleste calısan dragon soul fakat ben buna level sınırı ve 2 saatte bır cor sınırı eklemek ıstıyorum tıpkı
Lua (Quest):
quest dragon_soul begin
    state start begin
        function fark_al(numb_1, numb_2)
if numb_1>=numb_2 then
return numb_1-numb_2
else numb_2>numb_1 then
return numb_2-numb_1
end
end
when levelup or letter with pc.level >= 30 begin
            send_letter(gameforge.dragon_soul._1010_sendLetter)
            local v = find_npc_by_vnum(20001)
            if 0 != v then
                target.vid("__TARGET__", v, mob_name(20001))
            end
        end
        when info or button begin
            say(gameforge.dragon_soul._1020_say)
        end
        when 20001.chat.gameforge.dragon_soul._1030_npcChat with pc.level >= 30 begin
            target.delete("__TARGET__")
            say_title(mob_name(20001))
            say(gameforge.dragon_soul._1040_say)
            set_state(state_learning)
        end
    end
    state state_learning begin
        when letter begin
            send_letter(gameforge.dragon_soul._1050_sendLetter)
        end
        when info or button begin
            say(gameforge.dragon_soul._1060_say)
        end
        when kill begin
            if npc.is_pc() then
                return
            end
            ------------
            if pc.get_map_index() >= 2400000 and pc.get_map_index() <= 2405000 or pc.get_map_index() >= 2350000 and pc.get_map_index() <= 2355000 then
            return
            else
            -----------------------
                if pc.getf("dragon_soul","drop_on") == 1 then
                    if pc.count_item(30270) < 15 then
                        if drop_gamble_with_flag("ds_drop") then
local level_ayari=15 -- Mob ile karakter arasında level farkı 10 dan fazla olursa item düşmez. Değiştirebilirsiniz.
if dragon_soul.fark_al(pc.get_level(), get_mob_level(npc.get_race())) <= level_ayari then
local oran_ver=50 -- İstediğiniz oranı verebilirsiniz. 1 ile 100 arasında, arttırdıkça düşme oranı da artar.
if number(1,100)<=oran_ver then
game.drop_item_with_ownership(30270)
end
end
                        end
                    end
                end
            -------------------------
            end
            ------------
        end
        when 20001.chat.gameforge.dragon_soul._1050_sendLetter begin
            say_title(mob_name(20001))
            if pc.count_item(30270) >= 10 then
                say(gameforge.dragon_soul._1070_say)
                pc.remove_item(30270, 10)
                ds.give_qualification()
                char_log(pc.get_player_id(), 'DS_QUALIFICATION', 'SUCCESS')
                pc.give_item2(50255)
                local today = math.floor(get_global_time() / 7200)
                pc.setf("dragon_soul", "eye_timestamp", today)
                pc.setf("dragon_soul", "eye_left", 3)
                set_state(state_farming)
            else
                say(gameforge.dragon_soul._1080_say)
            end
        end
    end
    state state_farming begin
        when letter begin
            send_letter(gameforge.dragon_soul._1090_sendLetter)
        end
        when info or button begin
            say(string.format(gameforge.dragon_soul._1100_say, pc.getf("dragon_soul", "eye_left")))
        end
        when kill begin
            if npc.is_pc() then
                return
            end
            ---------
            if pc.get_map_index() >= 2400000 and pc.get_map_index() <= 2405000 or pc.get_map_index() >= 2350000 and pc.get_map_index() <= 2355000 then
            return
            else
            ------------------------------------
                if pc.getf("dragon_soul","drop_on") == 1 then
                if drop_gamble_with_flag("ds_drop") then
                    local eye_left = pc.getf("dragon_soul", "eye_left")
                    local haved_gemstone_number = pc.count_item(30270)
                    if eye_left > haved_gemstone_number / 10 then
local level_ayari=10 -- Mob ile karakter arasında level farkı 10 dan fazla olursa item düşmez. Değiştirebilirsiniz.
if dragon_soul.fark_al(pc.get_level(), get_mob_level(npc.get_race())) <= level_ayari then
local oran_ver=50 -- İstediğiniz oranı verebilirsiniz. 1 ile 100 arasında, arttırdıkça düşme oranı da artar.
if number(1,100)<=oran_ver then
game.drop_item_with_ownership(30270)
end
end
                    end
                end
                end
                ----------------------------
            end
            -----------
        end
        when 30270.pick begin
            local eye_left = pc.getf("dragon_soul", "eye_left")
            if eye_left <= 0 then
                return
            end
            if pc.count_item(30270) >= 10 then
                pc.setf("dragon_soul", "eye_left", eye_left - 1)
                pc.remove_item(30270, 10)
                pc.give_item2(50255)
                if 1 == eye_left then
                    notice_multiline(gameforge.dragon_soul._1110_notice, notice)
                    set_state(state_closed_season)
                end
            end
        end
        when 20001.chat.gameforge.dragon_soul._1120_npcChat begin
            say_title(mob_name(20001))
            local today = math.floor(get_global_time() / 7200)
            if today == pc.getf("dragon_soul", "eye_timestamp") then
                say(gameforge.dragon_soul._1130_say)
            else
                say(gameforge.dragon_soul._1140_say)
                pc.setf("dragon_soul", "eye_timestamp", today)
                pc.setf("dragon_soul", "eye_left", 3)
                pc.setf("dragon_soul","drop_on",1)
            end
        end
    end
    state state_closed_season begin
        when letter begin
            send_letter(gameforge.dragon_soul._1150_sendLetter)
        end
        when info or button begin
            say(gameforge.dragon_soul._1160_say)
            local today = math.floor(get_global_time() / 7200)
            if today == pc.getf("dragon_soul", "eye_timestamp") then
                say(gameforge.dragon_soul._1170_say)
            else
                say(gameforge.dragon_soul._1180_say)
            end
        end
        when 20001.chat.gameforge.dragon_soul._1090_sendLetter begin
            say_title(mob_name(20001))
            local today = math.floor(get_global_time() / 7200)
            if today == pc.getf("dragon_soul", "eye_timestamp") then
                say(gameforge.dragon_soul._1130_say)
            else
                say(gameforge.dragon_soul._1140_say)
                pc.setf("dragon_soul", "eye_timestamp", today)
                pc.setf("dragon_soul", "eye_left", 3)
                set_state(state_farming)
            end
        end
    end
    -- deprecated states. so, jump to new state.
    state state_1 begin
        when login begin
            set_state(state_learning)
        end
    end
    state state_2 begin
        when login begin
            set_state(state_learning)
        end
    end
    state state_3 begin
        when login begin
            set_state(state_closed_season)
        end
    end
end
bu ornekte oldugu gıbı benım bılgım yetersız kaldı eger yapma sansınız varsa bu konuda bı yardım edermısınız bana sadece level sınırı 35 level ve 2 saatte 3 cor olunca duracak sekılde lazım sımdıdden cok tesekkur ederım ılgınız ıcın
 
Geri
Üst