• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

areaSpawn

bomba

Member
Joined
Feb 26, 2008
Messages
635
Reaction score
7
Location
Brazil
How I can make an area respaw? ex:
Code:
 local monster = "Banshee"
 local monsters = 10
 local areaResp =
{
   fromPos = {x=000, y=000, z=000},
   toPos = {x=100, y=100, z=100}
}
	   doSummonMultipleCreature("monster", monsters, areaResp.fromPos, areaResp.toPos)

The function don't exist, but is possible make?
 
function;
Code:
function doSummonMultipleCreature(monstername, pos)

local monster = tostring(monstername)

if type(pos) == "table" then
	for i = 1, #pos do
	   doSummonCreature(monster, pos[i])
	end
end

return TRUE
end

example:

Code:
local poss =	{

			{x=95, y=123, z=7},
			{x=95, y=124, z=7}
			   }

	 doSummonMultipleCreature(rat', poss)
 
Code:
function doSummonMultipleCreature(monster, amount, fromPos, toPos)
	for i = 1, amount do
		doSummonCreature(monster, {x = math.random(fromPos.x, toPos.x), y = math.random(fromPos.y, toPos.y), z = math.random(fromPos.z, toPos.z)})
	end
	return TRUE
end
 
Back
Top