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

anyone that can figure out whats wrong with this script?

Elaney

Member
Joined
Jan 1, 2009
Messages
1,561
Reaction score
12
Location
Sweden
LUA:
local t, event = {
	from = {x=779, y=805, z=5},
	to = {x=788, y=814, z=5}
}


	function onStepIn(cid, item, position, fromPosition)
	for x=t.from.x, t.to.x do
		for y=t.from.y, t.to.y do
			for z=t.from.z, t.to.z do
				local v = getTopCreature({x=x, y=y, z=z}).uid
				if isPlayer(v) then
				if getPlayerStorageValue(cid, 1501) == -1 then
					setPlayerStorageValue(cid, 1501, 1)
					doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "x")
				end
			end
		end
	end
end
end
 
i had it working before. but then it just stoped working.

i made it work having this is movement.xml

LUA:
<movevent type="StepIn" event="script" value="x.lua"/>
 
Last edited:
Code:
function onStepIn(cid, item, position, fromPosition)

local pos = {x = 154, y = 60, z = 7} -- do teleport player for pos

for pos_x = 779,788 do 
for pos_y = 805,814 do 
Check = getThingfromPos({x=pos_x, y=pos_y, z=5, stackpos=253}).uid
if isPlayer(Check) == TRUE and getPlayerStorageValue(Check, 1501) == -1 then
setPlayerStorageValue(Check, 1501, 1)
doTeleportThing(Check, pos) 
doPlayerSendTextMessage(Check, MESSAGE_STATUS_CONSOLE_BLUE, "x")
return TRUE
end
end
end
return TRUE
end
 
Code:
function onStepIn(cid, item, position, fromPosition)

for pos_x = 779,788 do 
for pos_y = 805,814 do 
Check = getThingfromPos({x=pos_x, y=pos_y, z=5, stackpos=253}).uid
if isPlayer(Check) == TRUE and getPlayerStorageValue(Check, 1501) == -1 then
setPlayerStorageValue(Check, 1501, 1)
doPlayerSendTextMessage(Check, MESSAGE_STATUS_CONSOLE_BLUE, "x")
return TRUE
end
end
end
return TRUE
end

is sending the message to the player check(inside the room)
 
LUA:
local t, event = {
	from = {x=779, y=805, z=5},
	to = {x=788, y=814, z=5}
}
 
 
	function onStepIn(cid, item, position, fromPosition)
	for x=t.from.x, t.to.x do
		for y=t.from.y, t.to.y do
			for z=t.from.z, t.to.z do
				local v = getTopCreature({x=x, y=y, z=z}).uid
				if isPlayer(v) then
				if getPlayerStorageValue(v, 1501) == -1 then
					setPlayerStorageValue(v, 1501, 1)
					doPlayerSendTextMessage(v, MESSAGE_STATUS_CONSOLE_BLUE, "x")
				end
			end
		end
	end
end
end
 
Last edited:
nothing of it works.

dosnt set storage, it dosnt send the text. nothing =P

but i guess it's not possible to do it without adding the itemid="xxxx" to movements =/
 
Last edited:
Back
Top