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

[Lua] Find Creatures And "Despawn"

avalock

New Member
Joined
Feb 5, 2013
Messages
16
Reaction score
3
Location
Great Britain
Hey! I have run into a problem with my script that is I'm not sure if this is even possible but does anyone know if it is possible for a script to search from a position {x = 1, y = 1, z = 1} to position {x = 100, y = 100, z = 7} for any and all creatures and either remove them, or kill and then delete corpses?

I hope i explained what it is i need help with properly and hope someone is able to help! Any help would be gratefully appreciated!

Thanks in advance!
 
Code:
local area1 = {x=1000,y=1000,z=7}
local area2 = {x=1500,y=1500,z=7}
for x = area1.x, area2.x do
         for y = area1.y, area2.y do
                 for z = area1.z, area2.z do
                          if isMonster(getTopCreature({x = x, y = y, z = z}).uid) then
                                  doRemoveCreature(getTopCreature({x = x, y = y, z = z}).uid)
                          end
                 end
         end
end
 
Last edited:
Back
Top