Quest Antiexp pentru buton

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Închis
Avatar utilizator
ionel987
Nivel 1

Nivel 1
Mesaje: 117
Membru din: 10 Mai 2015, 16:00
Regat: Shinsoo
Aprecieri: 15  
Mulţumiri: 1  
Medalii

salutare J4M!

am facut un buton antiexp langa inventar si iam facut un quest ca sa mearga...
dar nu reusesc. am facut asa:
quest antiexp begin
state start begin
when login begin
cmdchat("antiexp "..q.getcurrentquestindex())
pc.setqf("antiexp2", 0)
end
end

when button or info begin
if pc.getqf("antiexp2") == 0 then
pc.setqf("antiexp2", 1)
chat("Anti EXP activat!")
local ep = pc.get_exp()
pc.give_exp2(-ep)
timer("esperienza2", 3)
elseif pc.getqf("antiexp2") == 1 then
pc.setqf("antiexp2", 0)
chat("Anti EXP desactivat")
end
end
end
end

when esperienza2.timer with pc.getqf("antiexp2") == 1 begin
local ep = pc.get_exp()
pc.give_exp2(-ep)
pc.setqf("antiexp2", 1)
end
imi da in continu eroarea asta:
anti_exp.quest:9:expecting 'state'
Abort (core dumped)

ma poate ajuta cineva?
Avatar utilizator
akn
Nivel 2

Nivel 2
Mesaje: 238
Membru din: 16 Dec 2013, 16:05
Aprecieri: 17  
Mulţumiri: 70  
Discord: Copiază ID
 Contact:
Medalii

am aranjat end-urile pentru quest
ar trebui sa mearga acum
quest antiexp begin
	state start begin
		when login begin
			cmdchat("antiexp "..q.getcurrentquestindex())
			pc.setqf("antiexp2", 0)
		end -- when


		when button or info begin
			if pc.getqf("antiexp2") == 0 then
				pc.setqf("antiexp2", 1)
				chat("Anti EXP activat!")
				local ep = pc.get_exp()
				pc.give_exp2(-ep)
				timer("esperienza2", 3)
			elseif pc.getqf("antiexp2") == 1 then
				pc.setqf("antiexp2", 0)
				chat("Anti EXP desactivat")
			end -- if
		end -- when


		when esperienza2.timer with pc.getqf("antiexp2") == 1 begin
			local ep = pc.get_exp()
			pc.give_exp2(-ep)
			pc.setqf("antiexp2", 1)
		end -- when
	end --state
end --quest
Afișează semnătura
Avatar utilizator
ionel987
Nivel 1

Nivel 1
Mesaje: 117
Membru din: 10 Mai 2015, 16:00
Regat: Shinsoo
Aprecieri: 15  
Mulţumiri: 1  
Medalii

ala era! gresisem cu endurile, ms mult! rezolvat
Avatar utilizator
[RaffaeL]
Software Developer

Software Developer
Mesaje: 3223
Membru din: 19 Mar 2016, 12:58
Server: ...
Aprecieri: 15  
Mulţumiri: 2502  
  Rezolvări prob.: 2
Discord: Copiază ID
 Contact:
Medalii

Topic inchis.Mutat in Probleme rezolvate.
Imagine
Imagine
https://www.youtube.com/watch?v=GhYkCIETEto
Do everything, if you know what you're doing, else... Imagine
Ma gasesti si aici: Discord https://discord.gg/5J5GnyZVSR
Afișează semnătura
Închis
Răspunsuri
13
Vizualizări
1918
Răspunsuri
2
Vizualizări
267
Răspunsuri
3
Vizualizări
322
Răspunsuri
1
Vizualizări
63

Înapoi la “Probleme rezolvate”

  • Informaţie
  • Cine este conectat

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