Jump to content
noanshadow

Chaos Argent Function

Recommended Posts

Hello everyone, I am trying to use a function provided by the user @Angelix , but I am unable to enter the first conditional related to time, I implemented a print to check if it entered, but I cannot find a way.
 

function map_copy_run_garner2(MapCopy)
	ChaosArgent.Alive = GetMapActivePlayer(MapCopy)
	if ChaosArgent.Alive > 0 then
		ChaosArgentCheater(MapCopy)
	end
	local Second = tonumber(os.date("%S"))
	local Minute = tonumber(os.date("%M"))
	if (Minute - math.floor(Minute / 5) * 5) == 0 and Second == 0 then --Problem Here
		Notice("<"..ChaosArgent.Config.General.MapName..">: There are still "..ChaosArgent.Alive.." players alive.")
		ChaosArgent.SpawnNum = Minute/5
		if ChaosArgent.Config.Monsters[ChaosArgent.SpawnNum] ~= nil then
			if ChaosArgent.Alive >= 1 then
				for i = 1, table.getn(ChaosArgent.Config.Monsters[ChaosArgent.SpawnNum]), 1 do
					local ID = ChaosArgent.Config.Monsters[ChaosArgent.SpawnNum][i].ID
					local X = ChaosArgent.Config.Monsters[ChaosArgent.SpawnNum][i].X * 100
					local Y = ChaosArgent.Config.Monsters[ChaosArgent.SpawnNum][i].Y * 100
					local Monster = CreateChaEx(ID, X, Y, 145, 60, MapCopy)
					SetChaLifeTime(Monster, 299000)
				end
			end
		end
	end
end

 

Edited by noanshadow

Share this post


Link to post
Share on other sites

Nobody can help you if you do not post all the scripts here. It seems you're using some sort of my written code, but do you have all of it? Just by look at this piece of code we can guess it just throws errors due to some variables not being defined. So either get the full scripts (because full scripts of my custom CA do work properly) or take the basics and re-write it to your liking for it to be more understandable for you.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...