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

Ctrl + V

Status
Not open for further replies.
13/07/2008 21:26:16] Warning: [NpcScript::NpcScript] Can not load script. data/npc/scripts/Gregor.lua
[13/07/2008 21:26:16] data/npc/scripts/Gregor.lua:38: ')' expected near 'then'
 
RoflmaololomgfuckyouRoflmaololomgfuckyouRoflmaololomgfuckyouRoflmaololomgfuckyouRoflmaololomgfuckyouRoflmaololomgfuckyouRoflmaololomgfuckyouv XDXDXDXD
 
This is not a bug this happens because who you not have [yourmapname]-house.xml open with simone mapeditor and save it and later open with rme and will work fine
 
global.lua
Code:

function mapArea(fromPos, toPos, stack)
-- Area iterator by Colandus @ ******.net
local pos = {x=fromPos.x, y=fromPos.y-1, z=fromPos.z}
return function()
if (pos.y < toPos.y) then
pos.y = pos.y+1
elseif (pos.x <= toPos.x) then
pos.y = fromPos.y
pos.x = pos.x+1
else
pos.x = fromPos.x
pos.y = fromPos.y
pos.z = pos.z+1
end
if (pos.x <= toPos.x and pos.y <= toPos.y or pos.z < toPos.z) then
if (stack == nil) then
return pos
else
pos.stackpos = stack
return pos, getThingfromPos(pos)
end
end
end
end

If you want to make it teleport all players in the area, then you should need onAdvance, else, just an example of onUse:
Code:

function onUse(cid, item, position)
fromPos = {x = 10, y = 15, z = 5}
toPos = {x = 20, y = 30, z = 7}
newPos = {x = 50, y = 30, z = 10}
for pos, uid in mapArea(fromPos, toPos, 253) do
if isPlayer(thing) == TRUE then
doTeleportThing(thing, newPos, 0)
end
end
end
 
Status
Not open for further replies.
Back
Top