Jump to content
  • 0

[HELP] Quest not working


kubasiek221

Question

  • Answers 5
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

5 answers to this question

Recommended Posts

  • 0
  • 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
Share on other sites

  • 0

@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
Share on other sites

  • 0
  • 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
Share on other sites

  • 0

@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
Share on other sites

  • 0
  • 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
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Activity

    1. 7

      Metin2 2003 Beta Client!!!!!

    2. 32

      Boss Effect Over Head

    3. 1

      Open Source API for Metin2 Server Management - Early Development

    4. 0

      Official Item Combination [18.4]

    5. 2

      Proper SIGNAL management for Windows

    6. 2

      Proper SIGNAL management for Windows

    7. 4

      syserr erorr ( not working OK button on client )

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.