Jump to content
  • 0

QUEST ONE, DOUBLE, TRIPLE PENTA FIX PLS


HA MeCa

Question

i need quest for @up with timers.

 

my quest is bad stopping at one kill:

quest pentakill begin 
	state start begin 
		when kill with npc.is_pc() begin
			local ilosc = pc.getqf("ilosc")
			pc.setqf("ilosc", pc.getqf("ilosc")+1)
		if ilosc == 0 then
			cmdchat("PlayMusicxd onekill.mp3")
			timer("zerowy, 1")
			timer("zerowy1, 10")
		end
		end
		when zerowy.timer begin
		if ilosc == 1 then
			cleartimer("zerowy1, 10")
			timer("pierwszy, 1")
			timer("pierwszy1, 10")
			cmdchat("PlayMusicxd doublekill.mp3")
		end
		end
		when pierwszy.timer begin
		if ilosc == 2 then
			cleartimer("pierwszy1, 10")
			timer("drugi, 1")
			timer("drugi1, 10")
			cmdchat("PlayMusicxd triplekill.mp3")
		end
		end
		when drugi.timer begin
		if ilosc == 3 then
			cleartimer("drugi1, 10")
			timer("trzeci, 1")
			timer("trzeci1, 10")
			cmdchat("PlayMusicxd quadra.mp3")
		end
		end
		when trzeci.timer begin
		if ilosc == 4 then
			cleartimer("trzeci1, 10")
			timer("czwarty, 1")
			timer("czwarty1, 10")
			cmdchat("PlayMusicxd pentakill.mp3")
		end
		end
		when czwarty.timer begin
		if ilosc > 4 then
			cleartimer("czwarty1, 10")
			timer("elo, 1")
			timer("elo1, 10")
			cmdchat("PlayMusicxd hexakill.mp3")
		end
		end
		when zerowy1.timer begin
		if ilosc < 0 then
			cmdchat("PlayMusicxd onekill.mp3")
		end
		end
		when pierwszy1.timer begin
		if ilosc < 1 then
			cmdchat("PlayMusicxd onekill.mp3")
		end
		end
		when drugi1.timer begin
		if ilosc < 2 then
			cmdchat("PlayMusicxd onekill.mp3")
		end
		end
		when trzeci1.timer begin
		if ilosc < 3 then
			cmdchat("PlayMusicxd onekill.mp3")
		end
		end
		when czwarty1.timer begin
		if ilosc < 4 then
			cmdchat("PlayMusicxd onekill.mp3")
		end
		end
		when elo1.timer begin
		if ilosc < 0 then
			cmdchat("PlayMusicxd onekill.mp3")
			end
		end
	end
end
Link to comment
  • Answers 5
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

5 answers to this question

Recommended Posts

  • 0

Use a get_time() to do better.

 

when kill with npc.is_pc() begin
local kill,last,interval,new,sounds = pc.getqf("kills"),pc.getqf("last_kill"),10,0,{'onkill','doublekill','tripekill','cuadrakill','pentakill'}
if last+10<get_time() then
new=kill+1
cmdchat("PlayMusicxd "..sounds[new]..".mp3")
pc.setqf("kills",new)
chat("You have "..interval.." to do another kill.")
else
pc.setqf("kills",1)
end
pc.setqf("last_kill",get_time())
end
I don't have much time now, before I check it, regards.
  • Love 1
Link to comment
  • 0

Here is it i didnt test it but i think it should  work:

quest pentakill begin 
    state start begin 
        when kill with npc.is_pc() begin
            local ilosc = pc.getqf("ilosc")
            pc.setqf("ilosc", pc.getqf("ilosc")+1)
            if pc.getqf("ilosc") == 1 then
                cmdchat("PlayMusicxd onekill.mp3")
                timer("killone", 10)
            elseif pc.getqf("ilosc") == 2 then
                cmdchat("PlayMusicxd doublekill.mp3")
                timer("killtwo", 10)
                cleartimer("killone", 10)
            elseif pc.getqf("ilosc") == 3 then
                cmdchat("PlayMusicxd triplekill.mp3")
                timer("killthree", 10)
                cleartimer("killtwo", 10)
            elseif pc.getqf("ilosc") == 4 then
                cmdchat("PlayMusicxd quadra.mp3")
                timer("killfour", 10)
                cleartimer("killthree", 10)
            elseif pc.getqf("ilosc") == 5 then
                cmdchat("PlayMusicxd pentakill.mp3")
                timer("killfive", 10)
                cleartimer("killfour", 10)
            end
        end
        when killone.timer or killtwo.timer or killthree.timer or killfour.timer or killfive.timer begin
            pc.setqf("ilosc", 0)
        end
    end
end

Kind Regards,

Frozen

  • Love 1
Link to comment
  • 0
quest multikill begin
	state start begin
		when kill with npc.is_pc() begin
			if get_time()< pc.getqf("grupo") then 
			pc.delqf("grupo")
			pc.setqf("doble", get_time()+60)
			cmdchat("PlayMusicxd doublekill.mp3")
		elseif get_time()< pc.getqf("doble") then 
			pc.delqf("doble") 
			pc.setqf("triple", get_time()+50)
			cmdchat("PlayMusicxd triplekill.mp3")
		elseif get_time()< pc.getqf("triple") then
			pc.delqf("triple") 
			pc.setqf("quadra", get_time()+40)
			cmdchat("PlayMusicxd quadra.mp3")
		elseif get_time()< pc.getqf("quadra") then
			pc.delqf("quadra") 
			pc.setqf("pentakill", get_time()+30)
			cmdchat("PlayMusicxd pentakill.mp3")
		elseif get_time()< pc.getqf("pentakill") then
			pc.delqf("pentakill")
			pc.setqf("hexakill", get_time()+20)
			cmdchat("PlayMusicxd hexakill.mp3")
		elseif get_time()< pc.getqf("hexakill") then
			pc.delqf("hexakill") 
			pc.setqf("hexakill", get_time()+20)
			cmdchat("PlayMusicxd hexakill.mp3")
		else
			pc.setqf("grupo", get_time()+60)
			cmdchat("PlayMusicxd onekill.mp3")
			end
		end
	end
end

 

  • Love 1
Link to comment
  • 0
quest pentakillxd begin
    state start begin
        when kill with npc.is_pc() begin
            if get_time()< pc.getqf("grupo") then 
            pc.delqf("grupo")
            pc.setqf("doble", get_time()+10)
            cmdchat("PlayMusicxd doublekill.mp3")
        elseif get_time()< pc.getqf("doble") then 
            pc.delqf("doble") 
            pc.setqf("triple", get_time()+10)
            cmdchat("PlayMusicxd triplekill.mp3")
        elseif get_time()< pc.getqf("triple") then
            pc.delqf("triple") 
            pc.setqf("quadra", get_time()+10)
            cmdchat("PlayMusicxd quadra.mp3")
        elseif get_time()< pc.getqf("quadra") then
            pc.delqf("quadra") 
            pc.setqf("pentakill", get_time()+10)
            cmdchat("PlayMusicxd pentakill.mp3")
        elseif get_time()< pc.getqf("pentakill") then
            pc.delqf("pentakill")
            pc.setqf("hexakill", get_time()+10)
            cmdchat("PlayMusicxd hexakill.mp3")
        elseif get_time()< pc.getqf("hexakill") then
            pc.delqf("hexakill") 
            pc.setqf("hexakill", get_time()+10)
            cmdchat("PlayMusicxd hexakill.mp3")
        else
            pc.setqf("grupo", get_time()+10)
            cmdchat("PlayMusicxd onekill.mp3")
            end
        end
    end
end

THX GUYS ALL LIKE + 5

 

/Ratting is disable ;(

Link to comment
  • 0

why doesn't work in guild war?

quest pentakillxd begin
	state start begin
		when kill begin
		if npc.is_pc() then
		if get_time()< pc.getqf("grupo ") then 
			pc.delqf("grupo ")
			pc.setqf("doble ", get_time()+10)
			cmdchat("PlayMusicxd doublekill.mp3 ")
		elseif get_time()< pc.getqf("doble ") then 
			pc.delqf("doble ") 
			pc.setqf("triple ", get_time()+10)
			cmdchat("PlayMusicxd triplekill.mp3 ")
		elseif get_time()< pc.getqf("triple ") then
			pc.delqf("triple ") 
			pc.setqf("quadra ", get_time()+10)
			cmdchat("PlayMusicxd quadra.mp3 ")
		elseif get_time()< pc.getqf("quadra ") then
			pc.delqf("quadra ") 
			pc.setqf("pentakill ", get_time()+10)
			cmdchat("PlayMusicxd pentakill.mp3 ")
		elseif get_time()< pc.getqf("pentakill ") then
			pc.delqf("pentakill ")
			pc.setqf("hexakill ", get_time()+10)
			cmdchat("PlayMusicxd hexakill.mp3 ")
		elseif get_time()< pc.getqf("hexakill ") then
			pc.delqf("hexakill ") 
			pc.setqf("hexakill ", get_time()+10)
			cmdchat("PlayMusicxd hexakill.mp3 ")
		else
			pc.setqf("grupo ", get_time()+10)
			cmdchat("PlayMusicxd onekill.mp3 ")
			end
			end
		end
	end
end
Link to comment

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


×
×
  • 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.