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

Stairs

Snow

New Member
Joined
Jan 16, 2008
Messages
381
Reaction score
0
My stairs in Yalahar are not working so I can't let players go to some quarters. If there is any way to fix it please tell me!!
IDs:
7925
7924
 
Add this to items.xml:
Code:
	<item id="7924" name="stairs">
		<attribute key="floorchange" value="south"/>
	</item>
	<item id="7925" name="stairs">
		<attribute key="floorchange" value="east"/>
	</item>

It should work after restart then. Please give me some reputation if I helped you ;)
 
Add this to items.xml:
Code:
	<item id="7924" name="stairs">
		<attribute key="floorchange" value="south"/>
	</item>
	<item id="7925" name="stairs">
		<attribute key="floorchange" value="east"/>
	</item>

It should work after restart then. Please give me some reputation if I helped you ;)

It's like that and doesn't work.
 
Example please, Idk how to do it.

Here you are! I scripted this together fast and haven't been able to test it but it should work.

In movements.xml add:
Code:
<movevent event="StepIn" fromid="7924" toid="7925" script="stairs.lua"/>

In movements scripts folder add a file called stairs.lua containing this code:
Code:
local stairs = {[7924]=2, [7925]=1}
local pos

function onStepIn(cid, item, position, fromPosition)
	if stairs[item.itemid] == 0 then
	    pos = {x=position.x, y=position.y-1, z=position.z-1}
	elseif stairs[item.itemid] == 1 then
	    pos = {x=position.x+1, y=position.y, z=position.z-1}
	elseif stairs[item.itemid] == 2 then
	    pos = {x=position.x, y=position.y+1, z=position.z-1}
 	elseif stairs[item.itemid] == 3 then
 	    pos = {x=position.x-1, y=position.y, z=position.z-1}
	else
	    return FALSE
	end
	doTeleportThing(cid, pos, FALSE)
	doMoveCreature(cid, stairs[item.itemid])
	return TRUE
end

It can easily be expanded using more stairs too :)
 
the same stairs that go up go down but they're going 1 sqm before they should do one to the left on one and north on other.
 
What IDs for stairs down? This script only covers ID 7924-7925.

When going up the stairs, everything is okay.. (the stairs (ID 7924) have attribute floorchange="south")

stairs1.png


However, when going down the stairs (by stepping on "stairs" (ID 459, floorchange="down"), you end up being trapped here:

stairs2.png
 
Back
Top