Problema QUEST

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Închis
Avatar utilizator
RЗD x.
Utilizator interzis !

Utilizator interzis !
Mesaje: 149
Membru din: 04 Apr 2017, 14:52
Regat: Jinno
Aprecieri: 10  
Mulţumiri: 6  
Medalii

Salut.

Am o problema cu un quest... Imi da status.quest:25:expecting 'when' or 'function'

Aici este quest-ul.

Cod: Selectaţi tot

quest status begin
   state start begin
      when 40003.use begin
         say_title("Status Permanent:")
         say_verde("Salut ".. pc.get_name() ..", doresti sa ai status permanent?")
         say("")
         say("Odata ce ai activat statusul permanent")
         say("nu o sa mai poti sa il resetezi!")
         say("")
         say_reward("Esti sigur ca vrei sa iti activezi statusul permanent?")
         say("")
         local main_set = select ("Da","Nu")
         if main_set == 2 then
            return
         end
         if main_set == 1 then
                      affect.remove_collect()
                      affect.add_collect(apply.MAX_HP,99000,439200)
                      affect.add_collect(apply.MAX_SP,99000,439200)
                      affect.add_collect(apply.INT,99000,439200)
                      affect.add_collect(apply.STR,99000,439200)
                      affect.add_collect(apply.DEX,99000,439200)
               end
            end
            pc.removeitem(40003, 1)
         end
      end
   end
end
Avatar utilizator
Ionuț Daniel
Nivel 8

Nivel 8
Mesaje: 1724
Membru din: 19 Noi 2016, 14:52
Aprecieri: 156  
Mulţumiri: 135  
 Contact:
Medalii

Shadeee scrie:Salut.Am
Ce ai ? Modifică mesajul să te putem ajuta.
Avatar utilizator
RЗD x.
Utilizator interzis !

Utilizator interzis !
Mesaje: 149
Membru din: 04 Apr 2017, 14:52
Regat: Jinno
Aprecieri: 10  
Mulţumiri: 6  
Medalii

Comex [Hate] scrie:
Shadeee scrie:Salut.Am
Ce ai ? Modifică mesajul să te putem ajuta.
Am dat din greseala trimite fara sa pun continuarea de la 'Am' :)). Acum este tot mesajul.
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

Shadeee scrie:Salut.

Am o problema cu un quest... Imi da status.quest:25:expecting 'when' or 'function'

Aici este quest-ul.

Cod: Selectaţi tot

quest status begin
   state start begin
      when 40003.use begin
         say_title("Status Permanent:")
         say_verde("Salut ".. pc.get_name() ..", doresti sa ai status permanent?")
         say("")
         say("Odata ce ai activat statusul permanent")
         say("nu o sa mai poti sa il resetezi!")
         say("")
         say_reward("Esti sigur ca vrei sa iti activezi statusul permanent?")
         say("")
         local main_set = select ("Da","Nu")
         if main_set == 2 then
            return
         end
         if main_set == 1 then
                      affect.remove_collect()
                      affect.add_collect(apply.MAX_HP,99000,439200)
                      affect.add_collect(apply.MAX_SP,99000,439200)
                      affect.add_collect(apply.INT,99000,439200)
                      affect.add_collect(apply.STR,99000,439200)
                      affect.add_collect(apply.DEX,99000,439200)
               end
            end
            pc.removeitem(40003, 1)
         end
      end
   end
end
Poftim:

Cod: Selectaţi tot

quest status begin
   state start begin
      when 40003.use begin
         say_title("Status Permanent:")
         say_verde("Salut ".. pc.get_name() ..", doresti sa ai status permanent?")
         say("")
         say("Odata ce ai activat statusul permanent")
         say("nu o sa mai poti sa il resetezi!")
         say("")
         say_reward("Esti sigur ca vrei sa iti activezi statusul permanent?")
         say("")
         local main_set = select ("Da","Nu")
         if main_set == 2 then
            return
         end
         if main_set == 1 then
                      affect.remove_collect()
                      affect.add_collect(apply.MAX_HP,99000,439200)
                      affect.add_collect(apply.MAX_SP,99000,439200)
                      affect.add_collect(apply.INT,99000,439200)
                      affect.add_collect(apply.STR,99000,439200)
                      affect.add_collect(apply.DEX,99000,439200)
				pc.removeitem(40003, 1)
         end
      end
   end
end
Pentru acest mesaj, [RaffaeL] for the post:
RЗD x.
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
Avatar utilizator
VegaS
Membru Club

Membru Club
Mesaje: 233
Membru din: 30 Oct 2015, 17:31
Aprecieri: 68  
Mulţumiri: 298  
 Contact:
Medalii

Cod: Selectaţi tot

quest status begin
	state start begin
		function add_collect()
			local dict = {
				[1] = { apply.MAX_HP, 99000, 439200 },
				[2] = { apply.MAX_SP, 99000, 439200 },
				[3] = { apply.INT, 99000, 439200 },
				[4] = { apply.STR, 99000, 439200 },
				[5] = { apply.DEX, 99000, 439200 }
			}
			affect.remove_collect()
			for i = 1, table.getn(dict) do
				affect.add_collect(dict[i][1], dict[i][2], dict[i][3])
			end
		end
	
		when 40003.use begin
			say_title("Permanently status")
			say(string.format("Hello %s, you want to receive permanently status?", pc.get_name()))
			say("")
			local selected = select("Yes", "No")
			if (selected == 1) then
				status.add_collect()
				pc.removeitem(40003, 1)
			else
				return
			end
		end
	end
end

Pastebin:
Avatar utilizator
Vincent Griffith
Ţepar / Untrusted User

Ţepar / Untrusted User
Mesaje: 1807
Membru din: 09 Mai 2016, 17:45
Aprecieri: 194  
Mulţumiri: 1331  
Medalii

Subiect marcat ca rezolvat. Mutat în probleme rezolvate.
Închis
Răspunsuri
6
Vizualizări
400
Răspunsuri
4
Vizualizări
220
Răspunsuri
4
Vizualizări
409
Răspunsuri
3
Vizualizări
735

Înapoi la “Probleme rezolvate”

  • Informaţie