Jump to content

problem mounts time


Recommended Posts

Well dev, actually i have the next problem:

 

I need to put a maximum time on a mount, when i add time to the seal, with the food of the mounts.

 

Btw i dont know how to do.

 

This is my quest:

			local comida_monturas = { {38100, 7}, {38101, 15}, {38102, 30}}

			if item.get_socket(0) == 1412419200 then
				say("Lo siento, tienes el maximo de tiempo en la montura, espera a que descienda")
			else

			say_title("SuperComidas:")
			---say(" "..item.get_socket(0))
			say("")
			say("Con esta comida, podras ampliar el tiempo de Vida de tu montura ")

				local prueba = select("SuperComida 7 Dias", "SuperComida 15 Dias", "SuperComida 30 dias", "Salir")

				if prueba != 4 then

						local a = comida_monturas[prueba][2]
						local c = comida_monturas[prueba][1]

				local b = 60*60*24
				local d = item.get_socket(0)

					if pc.count_item(c) >= 1 then

						if item.get_socket(0) + (comida_monturas[prueba][2]*(60*60*24)) <= 1412419200 then

							say("Con esta comida, tu montura ")
							say("")
							say("aumentara su vida por "..a.." Días")
							say("")
							say("¿Quieres continuar?")

								local e = select("Si", "No")
									if e == 1 then

									item.set_socket(0, d + a*
									pc.remove_item(c, 1)
									say("Completado!")
									say("Tu montura , tiene "..a.." Días más de Vida.")

									elseif e == 2 then
										return
									end	
						else

							say("Lo siento, el tiempo actual con el de el objeto supera el limite")
						end
					else
						say("Lo siento, requieres de comida para continuar")				
					end
				end
			end
		end

Any idea?

 

PD: this don't work, so help me

:D

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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