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

one per quest ?

xitos

New Member
Joined
Oct 14, 2008
Messages
213
Reaction score
1
Im setting the quest firewalker boots

I wish that while you have someone in the room no one can enter

how can I do this ??

Thanks !! :thumbup:
 
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
 
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

This is in movements ??

an example of equal Svargrond Arena or demon oak, which can only go one at a time

if any of you try this msg:

"Wait until " .. getCreatureName(pid) .. " finish the quest.")
 
Of course I do -,-"
I thought I asked you to post the script? ;S

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

is this script?

places in actions or movements?

how to put on actions.xml or movements.xml?

example:

<movement type="StepIn" actionid="42370" event="script" value="arenagoblet.lua"/>

Thanks :D
 
Back
Top