function getCreaturesInRange(position, radiusx, radiusy, showMonsters, showPlayers)
local creaturesList = {}
for x = -radiusx, radiusx do
for y = -radiusy, radiusy do
if not (x == 0 and y == 0) then
creature = getTopCreature({x = position.x+x, y = position.y+y, z = position.z, stackpos = STACKPOS_TOP_CREATURE})
if (creature.type == 1 and showPlayers == 1) or (creature.type == 2 and showMonsters == 1) then
table.insert(creaturesList, creature.uid)
end
end
end
end
return creaturesList
end
Check the area by iterating through every tile to see if there's a player in there?
Function by Gesior:
Code:function getCreaturesInRange(position, radiusx, radiusy, showMonsters, showPlayers) local creaturesList = {} for x = -radiusx, radiusx do for y = -radiusy, radiusy do if not (x == 0 and y == 0) then creature = getTopCreature({x = position.x+x, y = position.y+y, z = position.z, stackpos = STACKPOS_TOP_CREATURE}) if (creature.type == 1 and showPlayers == 1) or (creature.type == 2 and showMonsters == 1) then table.insert(creaturesList, creature.uid) end end end end return creaturesList end
ok u need post the movement script that you use for teleporter :S
Know what?do you know?![]()
Know what?
Of course I do -,-"one per quest
I'm doing the quest Firewalker Boots
can only enter 1 character
Of course I do -,-"
I thought I asked you to post the script? ;S
Wrong(!), I asked you to post the script you're using for me to fix it.