Ajutor, timp quest Biolog!

Totalitatea subiectelor care nu respectă regulamentul impus in sectiunea "Probleme şi Întrebări" vor fi stocate aici.
Închis
Avatar utilizator
sokuma63
Nivel 1

Nivel 1
Mesaje: 56
Membru din: 08 Ian 2016, 18:34
Server: LandOfMetin2
Regat: Jinno
Aprecieri: 22  
Mulţumiri: 2  
Discord: Copiază ID
 Contact:
Medalii

*Problemă: Quest Biolog
*Tipologie server: PvM Hard
*ServerFiles utilizat: just4metin
*Resursă folosită: De aici am luat Questul!
*Syserr: -
*Detalii suplimentare: Salut baieti, am instalat acest quest pentru biolog si nu stiu cum sa pun timpi de asteptare diferiti in functie de ce item trebuie adus. Ex: Pentru dinti de orc, o ora, pentru carti blesteme, 2 ore, etc.
Tin sa mentionez ca nu prea ma pricep la editat misiuni. Multumesc anticipat! ^:)^ ^:)^

Cod: Selectaţi tot

quest biologul_chaegirab begin
    -- Functiile necesare questului
    state functions begin
        function Data()
            local data
            data = {
                {
                    "Dintii de orc",
                    30006,
                    10,
                    "Valea orcilor",
                    {635, 636, 637}
                },
               
                {
                    "Cartile blestemate",
                    30047,
                    15,
                    "Valea orcilor",
                    {703, 704, 705, 707, 706}
                },
               
                {
                    "Amintirile de demon",
                    30015,
                    20,
                    "Turnul Demonilor",
                    {1001, 1002, 1003, 1004}
                },
               
                {
                    "Globurile de gheata",
                    30050,
                    20,
                    "Muntele Sohan",
                    {1102, 1103, 1104, 1107, 1106}
                },
               
                {
                    "Ramurile Zelkova",
                    30165,
                    20,
                    "Padurea Rosie",
                    {2301, 2302, 2303, 2304, 2305, 2311, 2312, 2313, 2314, 2315}
                },
               
                {
                    "Table sacre",
                    30166,
                    30,
                    "Campul cu serpi",
                    {1401, 1402, 1403, 1601, 1602, 1603}
                },
               
                {
                    "Crengile rosii",
                    30167,
                    30,
                    "Padurea Rosie",
                    {2311, 2312, 2313, 2314, 2315, 7024}
                },
               
                {
                    "Vestile despre Rege",
                    30168,
                    20,
                    "Atlantida",
                    {2401, 2402, 2403, 2404, 2411, 2412, 2413, 2414}
                }
            }
            return data
        end
        function getLevel(bquest_level)
            local levels
            local bquest_level = pc.getqf("blevel")
            levels = {30, 40, 50, 60, 70, 80, 90, 94, 100}
            return levels[bquest_level]
        end
        function getBonusName()
            local names
            local blevel = pc.getqf("blevel")
            names = {
                "Bonus +10 Viteză de mişcare (permanent)",
                "Bonus +5 valoare atac (permanent)",
                "Bonus +60 apărare (permanent)",
                "Bonus +50 atac (permanent)",
                "Bonus +11 viteză de mişcare (permanent)[ENTER]Bonus +10 rezistenţă la monştri (permanent)",
                "Bonus +10 forţă de atac (permanent)[ENTER]Bonus +6 viteză de atac (permanent)",
                "Bonus +10% contra semi-oamenilor (permanent)",
                "Bonus +10% critică (permanent)[ENTER]Bonus +10% pătrunzătoare (permanent)[ENTER]Bonus +3000 HP (permanent)"
            }
            return names[blevel]
        end
        function applyBonus()
            local blevel = pc.getqf("blevel")
            if blevel == 1 then
                affect.add_collect(apply.MOV_SPEED, 10, 60*60*24*365*60)
            elseif blevel == 2 then
                affect.add_collect(apply.ATT_SPEED,5,60*60*24*365*60) 
            elseif blevel == 3 then
                affect.add_collect(apply.DEF_GRADE_BONUS,60,60*60*24*365*60)
            elseif blevel == 4 then
                affect.add_collect(apply.ATT_GRADE_BONUS,50,60*60*24*365*60)
            elseif blevel == 5 then
                affect.add_collect(apply.MOV_SPEED,11,60*60*24*365*60)   
                affect.add_collect_point(POINT_DEF_BONUS,10,60*60*24*365*60)
            elseif blevel == 6 then
                affect.add_collect(apply.ATT_SPEED,6,60*60*24*365*60)        
                affect.add_collect_point(POINT_ATT_BONUS,10,60*60*24*365*60)
            elseif blevel == 7 then
                affect.add_collect(apply.ATTBONUS_HUMAN,10,60*60*24*365*60)
            elseif blevel == 8 then
                affect.add_collect(apply.CRITICAL_PCT,10,60*60*24*365*60)
                affect.add_collect(apply.PENETRATE_PCT,10,60*60*24*365*60)
                affect.add_collect(apply.MAX_HP,3000,60*60*24*365*60) 
            end
        end
    end
    state start begin
        when login or levelup with pc.get_level() >= 30 and not pc.is_gm() begin
            local v = find_npc_by_vnum(20084)
            if v != 0 then
                target.vid("__TARGET__", v, "Chaegirab")
            end
            send_letter("Cauta-l pe Biolog")
        end
        when button or info begin
            say_title("Cauta-l pe Biolog!")
            say("Biologul are nevoie de ajutorul")
            say("tau pentru studiile sale.")
            say("Cauta-l si intreaba-l cu ce il poti")
            say("ajuta. Ajutorul tau nu o sa ramana")
            say("nerasplatit.")
            say("")
        end
        when __TARGET__.target.click or 20084.chat."Caut ajutor" begin
            target.delete("__TARGET__")
            say_title("Caut ajutor")
            say("Salut tinere razboinic,")
            say("Am nevoie de ajutorul tau pentru")
            say("a-mi termina studiile despre monstrii")
            say("ce ne cutreiera lumea noastra.")
            say("")
            say_reward("Citeste cu atentie informatiile urmatoare!")
            say("")
            wait()
            say_title("Cercetari")
            say("Cercetarile mele se bazeaza pe")
            say("anumite obiecte care se afla la")
            say("monstrii de pe continent.")
            say("Adu-mi toate materialele de care")
            say("am nevoie si te voi rasplati cu")
            say("o gramada de lucruri.")
            say("")
            wait()
            set_state(mission_start)
            clear_letter()
            pc.setqf("blevel", 1)
        end
    end
    state mission_start begin
        when letter or login or levelup begin
            local data = biologul_chaegirab.Data()
            local blevel = pc.getqf("blevel")
            if pc.get_level() >= biologul_chaegirab.getLevel() then
                send_letter("BIOLOG ~ "..data[blevel][1])
            end
            if pc.count_item(data[blevel][2]) > 0 then
                local v = find_npc_by_vnum(20084)
                if v != 0 then
                    target.vid("__TARGET__", v, "Chaegirab")
                end
            end
        end
        when button or info begin
            local data = biologul_chaegirab.Data()
            local blevel = pc.getqf("blevel")
            say_title("Dintii de orc")
            say("Salut tinere razboinic,")
            say("Biologul are nevoie sa ii aduci")
            say(""..data[blevel][3].."x "..item_name(data[blevel][2]).."")
            say("Se gasesc in "..data[blevel][4].."!")
            say("Poti aduce o bucata odata la 3 ore.")
            say("")
            wait()
        end
        when __TARGET__.target.click or 20084.click begin
            target.delete("__TARGET__")
            local data = biologul_chaegirab.Data()
            local blevel = pc.getqf("blevel")
            if pc.get_level() >= biologul_chaegirab.getLevel() then
                say_title(data[blevel][1])
                say("Salut "..pc.get_name().."!")
                say("Ai venit sa imi aduci niste obiecte?")
                say("Tine minte! Poti sa imi aduci odata la")
                say("3 ore pentru a avea timp sa le studiez!")
                say("")
                wait()
                say_title(data[blevel][1])
                say("Ai venit sa imi aduci "..item_name(data[blevel][2]).."?")
                if pc.is_gm() then
                    pc.setqf("duration", get_time()+0)
                end
                if pc.count_item(data[blevel][2]) == 0 then
                    say("")
                    say_reward("Se pare ca inca nu ai facut rost de nici un obiect!")
                    say_reward("Revino cand ai obiectele cerute.")
                    return
                end
                if get_time() < pc.getqf("duration") then 
                    say("")
                    say_reward("Inca nu au trecut cele 3 ore.")
                    say_reward("Revino mai tarziu.")
                    return
                end
                local bcount = pc.getqf("bcount")+1
                if bcount == data[blevel][3] then
                    say("Felicitari!")
                    say("Mi-ai adus toate obiectele necesare")
                    say("pentru a-mi termina studiul.")
                    say("")
                    say_reward("Rasplata : ")
                    say_reward(biologul_chaegirab.getBonusName())
                    wait()
                    biologul_chaegirab.applyBonus()
                    pc.setqf("blevel", pc.getqf("blevel")+1)
                    pc.setqf("bcount", 0)
                    pc.setqf("duration", get_time())
                    set_state(mission_next)
                else
                    say("Ooh...ai gasit "..item_name(data[blevel][2]).."?")
                    say("Lasa-ma sa studiez...")
                    say("...")
                    say("Se pare ca este bun.")
                    say("Mai ai de adus "..(data[blevel][3] - pc.getqf("bcount") - 1).."!")
                    say("")
                    pc.remove_item(data[blevel][2], 1)
                    pc.setqf("duration", get_time()+60*60*3)
                    pc.setqf("bcount", bcount)
                end
            else
                say_title("Biolog")
                say("Eu ma ocup de toate studiile")
                say("din acest regat de aceea sunt")
                say("foarte ocupat momentan.")
                say("")
            end
        end
        when 30130.use begin
            if get_time() < pc.getqf("duration")-5 then
                pc.setqf("duration", get_time()+5)
                chat("Timpul a fost redus la 5 secunde!")
                pc.remove_item(30130, 1)
            else
                chat("Timpul este deja scazut!")
            end
        end
        when kill begin
            local data = biologul_chaegirab.Data()
            local blevel = pc.getqf("blevel")
            for k,r in pairs(data[blevel][5]) do 
                if npc.get_race() == r and pc.count_item(data[blevel][2]) < data[blevel][3] then
                    local c = math.random(0, 30)
                    if c == 1 then
                        pc.give_item2(data[blevel][2], 1)
                    end
                end
            end
        end
    end
    state mission_next begin
        when login or levelup or letter begin
            local data = biologul_chaegirab.Data()
            local blevel = pc.getqf("blevel")
            if pc.get_level() >= biologul_chaegirab.getLevel() then
                set_state(mission_start)
            end
        end
    end
    state __END__ begin
    end
end
Avatar utilizator
DAM0NN
Ţepar / Untrusted User

Ţepar / Untrusted User
Mesaje: 143
Membru din: 11 Apr 2018, 17:47
Server: #
Regat: Chunjo
Aprecieri: 59  
Mulţumiri: 332  
Medalii

sokuma63 scrie:*Problemă: Quest Biolog
*Tipologie server: PvM Hard
*ServerFiles utilizat: just4metin
*Resursă folosită: De aici am luat Questul!
*Syserr: -
*Detalii suplimentare: Salut baieti, am instalat acest quest pentru biolog si nu stiu cum sa pun timpi de asteptare diferiti in functie de ce item trebuie adus. Ex: Pentru dinti de orc, o ora, pentru carti blesteme, 2 ore, etc.
Tin sa mentionez ca nu prea ma pricep la editat misiuni. Multumesc anticipat! ^:)^ ^:)^

Cod: Selectaţi tot

quest biologul_chaegirab begin
    -- Functiile necesare questului
    state functions begin
        function Data()
            local data
            data = {
                {
                    "Dintii de orc",
                    30006,
                    10,
                    "Valea orcilor",
                    {635, 636, 637}
                },
               
                {
                    "Cartile blestemate",
                    30047,
                    15,
                    "Valea orcilor",
                    {703, 704, 705, 707, 706}
                },
               
                {
                    "Amintirile de demon",
                    30015,
                    20,
                    "Turnul Demonilor",
                    {1001, 1002, 1003, 1004}
                },
               
                {
                    "Globurile de gheata",
                    30050,
                    20,
                    "Muntele Sohan",
                    {1102, 1103, 1104, 1107, 1106}
                },
               
                {
                    "Ramurile Zelkova",
                    30165,
                    20,
                    "Padurea Rosie",
                    {2301, 2302, 2303, 2304, 2305, 2311, 2312, 2313, 2314, 2315}
                },
               
                {
                    "Table sacre",
                    30166,
                    30,
                    "Campul cu serpi",
                    {1401, 1402, 1403, 1601, 1602, 1603}
                },
               
                {
                    "Crengile rosii",
                    30167,
                    30,
                    "Padurea Rosie",
                    {2311, 2312, 2313, 2314, 2315, 7024}
                },
               
                {
                    "Vestile despre Rege",
                    30168,
                    20,
                    "Atlantida",
                    {2401, 2402, 2403, 2404, 2411, 2412, 2413, 2414}
                }
            }
            return data
        end
        function getLevel(bquest_level)
            local levels
            local bquest_level = pc.getqf("blevel")
            levels = {30, 40, 50, 60, 70, 80, 90, 94, 100}
            return levels[bquest_level]
        end
        function getBonusName()
            local names
            local blevel = pc.getqf("blevel")
            names = {
                "Bonus +10 Viteză de mişcare (permanent)",
                "Bonus +5 valoare atac (permanent)",
                "Bonus +60 apărare (permanent)",
                "Bonus +50 atac (permanent)",
                "Bonus +11 viteză de mişcare (permanent)[ENTER]Bonus +10 rezistenţă la monştri (permanent)",
                "Bonus +10 forţă de atac (permanent)[ENTER]Bonus +6 viteză de atac (permanent)",
                "Bonus +10% contra semi-oamenilor (permanent)",
                "Bonus +10% critică (permanent)[ENTER]Bonus +10% pătrunzătoare (permanent)[ENTER]Bonus +3000 HP (permanent)"
            }
            return names[blevel]
        end
        function applyBonus()
            local blevel = pc.getqf("blevel")
            if blevel == 1 then
                affect.add_collect(apply.MOV_SPEED, 10, 60*60*24*365*60)
            elseif blevel == 2 then
                affect.add_collect(apply.ATT_SPEED,5,60*60*24*365*60) 
            elseif blevel == 3 then
                affect.add_collect(apply.DEF_GRADE_BONUS,60,60*60*24*365*60)
            elseif blevel == 4 then
                affect.add_collect(apply.ATT_GRADE_BONUS,50,60*60*24*365*60)
            elseif blevel == 5 then
                affect.add_collect(apply.MOV_SPEED,11,60*60*24*365*60)   
                affect.add_collect_point(POINT_DEF_BONUS,10,60*60*24*365*60)
            elseif blevel == 6 then
                affect.add_collect(apply.ATT_SPEED,6,60*60*24*365*60)        
                affect.add_collect_point(POINT_ATT_BONUS,10,60*60*24*365*60)
            elseif blevel == 7 then
                affect.add_collect(apply.ATTBONUS_HUMAN,10,60*60*24*365*60)
            elseif blevel == 8 then
                affect.add_collect(apply.CRITICAL_PCT,10,60*60*24*365*60)
                affect.add_collect(apply.PENETRATE_PCT,10,60*60*24*365*60)
                affect.add_collect(apply.MAX_HP,3000,60*60*24*365*60) 
            end
        end
    end
    state start begin
        when login or levelup with pc.get_level() >= 30 and not pc.is_gm() begin
            local v = find_npc_by_vnum(20084)
            if v != 0 then
                target.vid("__TARGET__", v, "Chaegirab")
            end
            send_letter("Cauta-l pe Biolog")
        end
        when button or info begin
            say_title("Cauta-l pe Biolog!")
            say("Biologul are nevoie de ajutorul")
            say("tau pentru studiile sale.")
            say("Cauta-l si intreaba-l cu ce il poti")
            say("ajuta. Ajutorul tau nu o sa ramana")
            say("nerasplatit.")
            say("")
        end
        when __TARGET__.target.click or 20084.chat."Caut ajutor" begin
            target.delete("__TARGET__")
            say_title("Caut ajutor")
            say("Salut tinere razboinic,")
            say("Am nevoie de ajutorul tau pentru")
            say("a-mi termina studiile despre monstrii")
            say("ce ne cutreiera lumea noastra.")
            say("")
            say_reward("Citeste cu atentie informatiile urmatoare!")
            say("")
            wait()
            say_title("Cercetari")
            say("Cercetarile mele se bazeaza pe")
            say("anumite obiecte care se afla la")
            say("monstrii de pe continent.")
            say("Adu-mi toate materialele de care")
            say("am nevoie si te voi rasplati cu")
            say("o gramada de lucruri.")
            say("")
            wait()
            set_state(mission_start)
            clear_letter()
            pc.setqf("blevel", 1)
        end
    end
    state mission_start begin
        when letter or login or levelup begin
            local data = biologul_chaegirab.Data()
            local blevel = pc.getqf("blevel")
            if pc.get_level() >= biologul_chaegirab.getLevel() then
                send_letter("BIOLOG ~ "..data[blevel][1])
            end
            if pc.count_item(data[blevel][2]) > 0 then
                local v = find_npc_by_vnum(20084)
                if v != 0 then
                    target.vid("__TARGET__", v, "Chaegirab")
                end
            end
        end
        when button or info begin
            local data = biologul_chaegirab.Data()
            local blevel = pc.getqf("blevel")
            say_title("Dintii de orc")
            say("Salut tinere razboinic,")
            say("Biologul are nevoie sa ii aduci")
            say(""..data[blevel][3].."x "..item_name(data[blevel][2]).."")
            say("Se gasesc in "..data[blevel][4].."!")
            say("Poti aduce o bucata odata la 3 ore.")
            say("")
            wait()
        end
        when __TARGET__.target.click or 20084.click begin
            target.delete("__TARGET__")
            local data = biologul_chaegirab.Data()
            local blevel = pc.getqf("blevel")
            if pc.get_level() >= biologul_chaegirab.getLevel() then
                say_title(data[blevel][1])
                say("Salut "..pc.get_name().."!")
                say("Ai venit sa imi aduci niste obiecte?")
                say("Tine minte! Poti sa imi aduci odata la")
                say("3 ore pentru a avea timp sa le studiez!")
                say("")
                wait()
                say_title(data[blevel][1])
                say("Ai venit sa imi aduci "..item_name(data[blevel][2]).."?")
                if pc.is_gm() then
                    pc.setqf("duration", get_time()+0)
                end
                if pc.count_item(data[blevel][2]) == 0 then
                    say("")
                    say_reward("Se pare ca inca nu ai facut rost de nici un obiect!")
                    say_reward("Revino cand ai obiectele cerute.")
                    return
                end
                if get_time() < pc.getqf("duration") then 
                    say("")
                    say_reward("Inca nu au trecut cele 3 ore.")
                    say_reward("Revino mai tarziu.")
                    return
                end
                local bcount = pc.getqf("bcount")+1
                if bcount == data[blevel][3] then
                    say("Felicitari!")
                    say("Mi-ai adus toate obiectele necesare")
                    say("pentru a-mi termina studiul.")
                    say("")
                    say_reward("Rasplata : ")
                    say_reward(biologul_chaegirab.getBonusName())
                    wait()
                    biologul_chaegirab.applyBonus()
                    pc.setqf("blevel", pc.getqf("blevel")+1)
                    pc.setqf("bcount", 0)
                    pc.setqf("duration", get_time())
                    set_state(mission_next)
                else
                    say("Ooh...ai gasit "..item_name(data[blevel][2]).."?")
                    say("Lasa-ma sa studiez...")
                    say("...")
                    say("Se pare ca este bun.")
                    say("Mai ai de adus "..(data[blevel][3] - pc.getqf("bcount") - 1).."!")
                    say("")
                    pc.remove_item(data[blevel][2], 1)
                    pc.setqf("duration", get_time()+60*60*3)
                    pc.setqf("bcount", bcount)
                end
            else
                say_title("Biolog")
                say("Eu ma ocup de toate studiile")
                say("din acest regat de aceea sunt")
                say("foarte ocupat momentan.")
                say("")
            end
        end
        when 30130.use begin
            if get_time() < pc.getqf("duration")-5 then
                pc.setqf("duration", get_time()+5)
                chat("Timpul a fost redus la 5 secunde!")
                pc.remove_item(30130, 1)
            else
                chat("Timpul este deja scazut!")
            end
        end
        when kill begin
            local data = biologul_chaegirab.Data()
            local blevel = pc.getqf("blevel")
            for k,r in pairs(data[blevel][5]) do 
                if npc.get_race() == r and pc.count_item(data[blevel][2]) < data[blevel][3] then
                    local c = math.random(0, 30)
                    if c == 1 then
                        pc.give_item2(data[blevel][2], 1)
                    end
                end
            end
        end
    end
    state mission_next begin
        when login or levelup or letter begin
            local data = biologul_chaegirab.Data()
            local blevel = pc.getqf("blevel")
            if pc.get_level() >= biologul_chaegirab.getLevel() then
                set_state(mission_start)
            end
        end
    end
    state __END__ begin
    end
end
Salut, timpul îl modifici la : 30166 , 30005 , 30165 , gen alea de desupt de ce îți spune să aduci și te joci cu ele ...ca să-i vezi timpul gen :30130 este 5 secunde de așteptare de aici cred că te descurci ! Baftă .
Imagine
Afișează semnătura
Avatar utilizator
sokuma63
Nivel 1

Nivel 1
Mesaje: 56
Membru din: 08 Ian 2016, 18:34
Server: LandOfMetin2
Regat: Jinno
Aprecieri: 22  
Mulţumiri: 2  
Discord: Copiază ID
 Contact:
Medalii

OCB1214 scrie:
sokuma63 scrie:*Problemă: Quest Biolog
*Tipologie server: PvM Hard
*ServerFiles utilizat: just4metin
*Resursă folosită: De aici am luat Questul!
*Syserr: -
*Detalii suplimentare: Salut baieti, am instalat acest quest pentru biolog si nu stiu cum sa pun timpi de asteptare diferiti in functie de ce item trebuie adus. Ex: Pentru dinti de orc, o ora, pentru carti blesteme, 2 ore, etc.
Tin sa mentionez ca nu prea ma pricep la editat misiuni. Multumesc anticipat! ^:)^ ^:)^

Cod: Selectaţi tot

quest biologul_chaegirab begin
    -- Functiile necesare questului
    state functions begin
        function Data()
            local data
            data = {
                {
                    "Dintii de orc",
                    30006,
                    10,
                    "Valea orcilor",
                    {635, 636, 637}
                },
               
                {
                    "Cartile blestemate",
                    30047,
                    15,
                    "Valea orcilor",
                    {703, 704, 705, 707, 706}
                },
               
                {
                    "Amintirile de demon",
                    30015,
                    20,
                    "Turnul Demonilor",
                    {1001, 1002, 1003, 1004}
                },
               
                {
                    "Globurile de gheata",
                    30050,
                    20,
                    "Muntele Sohan",
                    {1102, 1103, 1104, 1107, 1106}
                },
               
                {
                    "Ramurile Zelkova",
                    30165,
                    20,
                    "Padurea Rosie",
                    {2301, 2302, 2303, 2304, 2305, 2311, 2312, 2313, 2314, 2315}
                },
               
                {
                    "Table sacre",
                    30166,
                    30,
                    "Campul cu serpi",
                    {1401, 1402, 1403, 1601, 1602, 1603}
                },
               
                {
                    "Crengile rosii",
                    30167,
                    30,
                    "Padurea Rosie",
                    {2311, 2312, 2313, 2314, 2315, 7024}
                },
               
                {
                    "Vestile despre Rege",
                    30168,
                    20,
                    "Atlantida",
                    {2401, 2402, 2403, 2404, 2411, 2412, 2413, 2414}
                }
            }
            return data
        end
        function getLevel(bquest_level)
            local levels
            local bquest_level = pc.getqf("blevel")
            levels = {30, 40, 50, 60, 70, 80, 90, 94, 100}
            return levels[bquest_level]
        end
        function getBonusName()
            local names
            local blevel = pc.getqf("blevel")
            names = {
                "Bonus +10 Viteză de mişcare (permanent)",
                "Bonus +5 valoare atac (permanent)",
                "Bonus +60 apărare (permanent)",
                "Bonus +50 atac (permanent)",
                "Bonus +11 viteză de mişcare (permanent)[ENTER]Bonus +10 rezistenţă la monştri (permanent)",
                "Bonus +10 forţă de atac (permanent)[ENTER]Bonus +6 viteză de atac (permanent)",
                "Bonus +10% contra semi-oamenilor (permanent)",
                "Bonus +10% critică (permanent)[ENTER]Bonus +10% pătrunzătoare (permanent)[ENTER]Bonus +3000 HP (permanent)"
            }
            return names[blevel]
        end
        function applyBonus()
            local blevel = pc.getqf("blevel")
            if blevel == 1 then
                affect.add_collect(apply.MOV_SPEED, 10, 60*60*24*365*60)
            elseif blevel == 2 then
                affect.add_collect(apply.ATT_SPEED,5,60*60*24*365*60) 
            elseif blevel == 3 then
                affect.add_collect(apply.DEF_GRADE_BONUS,60,60*60*24*365*60)
            elseif blevel == 4 then
                affect.add_collect(apply.ATT_GRADE_BONUS,50,60*60*24*365*60)
            elseif blevel == 5 then
                affect.add_collect(apply.MOV_SPEED,11,60*60*24*365*60)   
                affect.add_collect_point(POINT_DEF_BONUS,10,60*60*24*365*60)
            elseif blevel == 6 then
                affect.add_collect(apply.ATT_SPEED,6,60*60*24*365*60)        
                affect.add_collect_point(POINT_ATT_BONUS,10,60*60*24*365*60)
            elseif blevel == 7 then
                affect.add_collect(apply.ATTBONUS_HUMAN,10,60*60*24*365*60)
            elseif blevel == 8 then
                affect.add_collect(apply.CRITICAL_PCT,10,60*60*24*365*60)
                affect.add_collect(apply.PENETRATE_PCT,10,60*60*24*365*60)
                affect.add_collect(apply.MAX_HP,3000,60*60*24*365*60) 
            end
        end
    end
    state start begin
        when login or levelup with pc.get_level() >= 30 and not pc.is_gm() begin
            local v = find_npc_by_vnum(20084)
            if v != 0 then
                target.vid("__TARGET__", v, "Chaegirab")
            end
            send_letter("Cauta-l pe Biolog")
        end
        when button or info begin
            say_title("Cauta-l pe Biolog!")
            say("Biologul are nevoie de ajutorul")
            say("tau pentru studiile sale.")
            say("Cauta-l si intreaba-l cu ce il poti")
            say("ajuta. Ajutorul tau nu o sa ramana")
            say("nerasplatit.")
            say("")
        end
        when __TARGET__.target.click or 20084.chat."Caut ajutor" begin
            target.delete("__TARGET__")
            say_title("Caut ajutor")
            say("Salut tinere razboinic,")
            say("Am nevoie de ajutorul tau pentru")
            say("a-mi termina studiile despre monstrii")
            say("ce ne cutreiera lumea noastra.")
            say("")
            say_reward("Citeste cu atentie informatiile urmatoare!")
            say("")
            wait()
            say_title("Cercetari")
            say("Cercetarile mele se bazeaza pe")
            say("anumite obiecte care se afla la")
            say("monstrii de pe continent.")
            say("Adu-mi toate materialele de care")
            say("am nevoie si te voi rasplati cu")
            say("o gramada de lucruri.")
            say("")
            wait()
            set_state(mission_start)
            clear_letter()
            pc.setqf("blevel", 1)
        end
    end
    state mission_start begin
        when letter or login or levelup begin
            local data = biologul_chaegirab.Data()
            local blevel = pc.getqf("blevel")
            if pc.get_level() >= biologul_chaegirab.getLevel() then
                send_letter("BIOLOG ~ "..data[blevel][1])
            end
            if pc.count_item(data[blevel][2]) > 0 then
                local v = find_npc_by_vnum(20084)
                if v != 0 then
                    target.vid("__TARGET__", v, "Chaegirab")
                end
            end
        end
        when button or info begin
            local data = biologul_chaegirab.Data()
            local blevel = pc.getqf("blevel")
            say_title("Dintii de orc")
            say("Salut tinere razboinic,")
            say("Biologul are nevoie sa ii aduci")
            say(""..data[blevel][3].."x "..item_name(data[blevel][2]).."")
            say("Se gasesc in "..data[blevel][4].."!")
            say("Poti aduce o bucata odata la 3 ore.")
            say("")
            wait()
        end
        when __TARGET__.target.click or 20084.click begin
            target.delete("__TARGET__")
            local data = biologul_chaegirab.Data()
            local blevel = pc.getqf("blevel")
            if pc.get_level() >= biologul_chaegirab.getLevel() then
                say_title(data[blevel][1])
                say("Salut "..pc.get_name().."!")
                say("Ai venit sa imi aduci niste obiecte?")
                say("Tine minte! Poti sa imi aduci odata la")
                say("3 ore pentru a avea timp sa le studiez!")
                say("")
                wait()
                say_title(data[blevel][1])
                say("Ai venit sa imi aduci "..item_name(data[blevel][2]).."?")
                if pc.is_gm() then
                    pc.setqf("duration", get_time()+0)
                end
                if pc.count_item(data[blevel][2]) == 0 then
                    say("")
                    say_reward("Se pare ca inca nu ai facut rost de nici un obiect!")
                    say_reward("Revino cand ai obiectele cerute.")
                    return
                end
                if get_time() < pc.getqf("duration") then 
                    say("")
                    say_reward("Inca nu au trecut cele 3 ore.")
                    say_reward("Revino mai tarziu.")
                    return
                end
                local bcount = pc.getqf("bcount")+1
                if bcount == data[blevel][3] then
                    say("Felicitari!")
                    say("Mi-ai adus toate obiectele necesare")
                    say("pentru a-mi termina studiul.")
                    say("")
                    say_reward("Rasplata : ")
                    say_reward(biologul_chaegirab.getBonusName())
                    wait()
                    biologul_chaegirab.applyBonus()
                    pc.setqf("blevel", pc.getqf("blevel")+1)
                    pc.setqf("bcount", 0)
                    pc.setqf("duration", get_time())
                    set_state(mission_next)
                else
                    say("Ooh...ai gasit "..item_name(data[blevel][2]).."?")
                    say("Lasa-ma sa studiez...")
                    say("...")
                    say("Se pare ca este bun.")
                    say("Mai ai de adus "..(data[blevel][3] - pc.getqf("bcount") - 1).."!")
                    say("")
                    pc.remove_item(data[blevel][2], 1)
                    pc.setqf("duration", get_time()+60*60*3)
                    pc.setqf("bcount", bcount)
                end
            else
                say_title("Biolog")
                say("Eu ma ocup de toate studiile")
                say("din acest regat de aceea sunt")
                say("foarte ocupat momentan.")
                say("")
            end
        end
        when 30130.use begin
            if get_time() < pc.getqf("duration")-5 then
                pc.setqf("duration", get_time()+5)
                chat("Timpul a fost redus la 5 secunde!")
                pc.remove_item(30130, 1)
            else
                chat("Timpul este deja scazut!")
            end
        end
        when kill begin
            local data = biologul_chaegirab.Data()
            local blevel = pc.getqf("blevel")
            for k,r in pairs(data[blevel][5]) do 
                if npc.get_race() == r and pc.count_item(data[blevel][2]) < data[blevel][3] then
                    local c = math.random(0, 30)
                    if c == 1 then
                        pc.give_item2(data[blevel][2], 1)
                    end
                end
            end
        end
    end
    state mission_next begin
        when login or levelup or letter begin
            local data = biologul_chaegirab.Data()
            local blevel = pc.getqf("blevel")
            if pc.get_level() >= biologul_chaegirab.getLevel() then
                set_state(mission_start)
            end
        end
    end
    state __END__ begin
    end
end
Salut, timpul îl modifici la : 30166 , 30005 , 30165 , gen alea de desupt de ce îți spune să aduci și te joci cu ele ...ca să-i vezi timpul gen :30130 este 5 secunde de așteptare de aici cred că te descurci ! Baftă .

Cod: Selectaţi tot

{
                    "Dintii de orc",
                    30006,
                    10,
                    "Valea orcilor",
                    {635, 636, 637}
                    pc.setqf("duration", get_time()+60*60*1)
                },
               
                {
                    "Cartile blestemate",
                    30047,
                    15,
                    "Valea orcilor",
                    {703, 704, 705, 707, 706}
                    pc.setqf("duration", get_time()+60*60*2)
                }
                
Asa? :D :D

Edit: Nu functioneaza :-s :-s

Cod: Selectaţi tot

Daca schimb de aici:
pc.setqf("duration", get_time()+60*60*3)
Imi schimba pentru toate misiunile
Avatar utilizator
LikePc
Nivel 10

Nivel 10
Mesaje: 2240
Membru din: 11 Aug 2015, 00:01
Server: M3
Regat: Chunjo
Aprecieri: 9  
Mulţumiri: 270  
 Contact:
Medalii

Subiect arhivat, autorul nu a dat nici un semn timp de 3zile.
https:/horus-maps.com
Afișează semnătura
Închis
Răspunsuri
3
Vizualizări
283
Răspunsuri
6
Vizualizări
798

Înapoi la “Arhivă Probleme şi Întrebări”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 25 vizitatori