Jump to content

Recommended Posts

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Premium

Try :

quest change_item begin
    state start begin
        when 9003.take begin
            if pc.getqf("change") <= 5 then
                say_title(" change : ")
                say("")
                say(" Hello "..pc.name..". I can change your items ")
                say(" If you want, I can change your old items to new")
                say(" ")
                say(" If you dont like it, always can you come back. ")
                local s = select("Change", "Back")
                if s == 2 then return end
                    pc.setqf("change", pc.getqf("change")+1)
                    local item = { 10, 11, 12, 13, 14, 15, 16 }
                    local itemsss = 0
                    for i = 1, table.getn(item) do
                    if item.get_vnum(item[i]) == item[i] then
                    itemsss = itemsss +1
                        pc.give_item2(71085, 10)
                    end
                end
                    if itemsss == 0 then
                    syschat(" This items can`t  be change ")
                end    
            else
            pc.setqf("change", get_global_time()+60*15) -- 15 minutes
            local time2 = pc.getqf("change") - get_global_time()
            local time = time2/60
            local min = math.floor(time)
            syschat(" change can possible "..time.." minutes ")
                if get_global_time() > time2 then
                    pc.setqf("change", 0)
                end
            end
        end
    end
end

If you're going to do something, then do it right.

Link to comment
https://metin2.dev/topic/4289-help-quest-not-working/#findComment-27322
Share on other sites

@Up

 

Ques does not work.

Time no working.
All time is 15 minutes
When I click "change" nothing is changed. Quest turns off.

The rest of the quest does not work at

 

quest change_item begin
    state start begin
        when 9003.take begin
            if pc.getqf("change") <= 5 then
                say_title(" change : ")
                say("")
                say(" Hello "..pc.name..". I can change your items ")
                say(" If you want, I can change your old items to new")
                say(" ")
                say(" If you dont like it, always can you come back. ")
                local s = select("Change", "Back")
                if s == 2 then return end
                    pc.setqf("change", pc.getqf("change")+1)
                    local item = { 10, 11, 12, 13, 14, 15, 16 }
                    local itemsss = 0
                    for i = 1, table.getn(item) do
                    if item.get_vnum(item[i]) == item[i] then
                    itemsss = itemsss +1
                        pc.give_item2(71085, 10)
                    end
                end
                    if itemsss == 0 then
                    syschat(" This items can`t  be change ")
                end    
            else
            pc.setqf("change", get_global_time()+60*15) -- 15 minutes
            local time2 = pc.getqf("change") - get_global_time()
            local time = time2/60
            local min = math.floor(time)
            syschat(" change can possible "..time.." minutes ")
                if get_global_time() > pc.getqf("change") then
                    pc.setqf("change", 0)
                end
            end
        end
    end
end
Link to comment
https://metin2.dev/topic/4289-help-quest-not-working/#findComment-27331
Share on other sites

  • Premium

Try Now :

 

quest change_item begin
    state start begin
        when 9003.take begin
            if pc.getqf("change") <= 5 then
                say_title(" change : ")
                say("")
                say(" Hello "..pc.name..". I can change your items ")
                say(" If you want, I can change your old items to new")
                say(" ")
                say(" If you dont like it, always can you come back. ")
                local s = select("Change", "Back")
                if s == 2 then return end
                    pc.setqf("change", pc.getqf("change")+1)
                    local item = { 10, 11, 12, 13, 14, 15, 16 }
                    local itemsss = 0
                    for i = 1, table.getn(item) do
                    if item.get_vnum() == item[i] then
                    itemsss = itemsss +1
                        pc.give_item2(71085, 10)
                    end
                end
                    if itemsss == 0 then
                    syschat(" This items can`t  be change ")
                end    
            else
            pc.setqf("change", get_global_time()+60*15) -- 15 minutes
            local time2 = pc.getqf("change") - get_global_time()
            local time = time2/60
            local min = math.floor(time)
            syschat(" change can possible "..time.." minutes ")
                if get_global_time() > pc.getqf("change") then
                    pc.setqf("change", 0)
                end
            end
        end
    end
end

If you're going to do something, then do it right.

Link to comment
https://metin2.dev/topic/4289-help-quest-not-working/#findComment-27344
Share on other sites

@Up

 

I fix the problem.

But i don`t now to how make time to minutes and seconds.

 

Np:

4 minutes time

 

say( 3 minutes 43 seconds left )

 

Do you now to how make this ?

pc.setqf("change", get_time()+60*4) -- 4 minutes
time2 = pc.getqf("change") - get_time()
            time = time2/60
            times = time2
            sec = math.floor(times)
            min = math.floor(time)
            syschat(" Change is possible for "..min.." min ! | "..times.." s ! ") -- how make to time for minutes and seconds ? Np. 3 minutes 44 seconds left.

 

 

Link to comment
https://metin2.dev/topic/4289-help-quest-not-working/#findComment-27357
Share on other sites

  • Premium

try:

            time = pc.getqf("change")
            times = time / 60
            sec = math.floor(time)
            min = math.floor(times)

 

            syschat(" Change is possible for "..min.." min ! | "..sec.." s ! ") -- how make to time for minutes and seconds ? Np. 3 minutes 44 seconds left.

If you're going to do something, then do it right.

Link to comment
https://metin2.dev/topic/4289-help-quest-not-working/#findComment-27370
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.