• 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!

create monster if no monster

xavierek

New Member
Joined
Apr 11, 2009
Messages
209
Reaction score
0
hello ;) im looking for help in make script :)


We have square 10 x 10 and script will be sumon ther monster if this monster dont exist :) i thing the best way make it in global interval 500 ms only i dont know how to check position is ther monster :)
 
PHP:
function onThink(interval, lastExecution)
        local room = {     -- room with demons
        fromX = 499,
        fromY = 439,
        fromZ = 6,
        --------------
        toX = 500,
        toY = 442,
        toZ = 6
        }
		


                for x = room.fromX, room.toX do
                        for y = room.fromY, room.toY do
                                for z = room.fromZ, room.toZ do
									local pos = {x=x, y=y, z=z, stackpos = 253}
									local thing = getThingfromPos(pos)
									if isMonster(thing.uid) == false then
doSummonCreature("The New", pos)										
									end
								end
							end
						end

return true
end

Done ... xD
 
Back
Top