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

MoveEvent Yalahar Stairs (south and east)

QuaS

Cykotitan Pwned =/
Joined
Sep 11, 2008
Messages
838
Reaction score
28
Location
Poland/ Wroclaw
Hello all. I would like to relase you a script to Yalahar Stairs (Ids: 7924, 7925).


So let go.

Make file yalaharstairs.lua in movements/scripts/

PHP:
local STAIRS_NORTH = 7924
local STAIRS_EAST = 7925

function onStepIn(cid, item, position, fromPosition)

	if(item.itemid == STAIRS_EAST) then
		local position1 = {x = position.x + 2, y = position.y, z = position.z - 1, stackpos = 235}
		doTeleportThing(cid, position1)
		doCreatureSetLookDir(cid, EAST)

	elseif item.actionid == STAIRS_EAST then
		local position4 = {x = position.x - 2, y = position.y, z = position.z + 1, stackpos = 235}
		doTeleportThing(cid, position4)
		doCreatureSetLookDir(cid, WEST)


	elseif(item.itemid == STAIRS_NORTH) then
		local position2 = {x = position.x, y = position.y + 2, z = position.z - 1, stackpos = 235}
		doTeleportThing(cid, position2)
		doCreatureSetLookDir(cid, SOUTH)

	elseif(item.actionid == STAIRS_NORTH) then
		local position2 = {x = position.x, y = position.y - 2, z = position.z + 1, stackpos = 235}
		doTeleportThing(cid, position2)
		doCreatureSetLookDir(cid, NORTH)
end
end


add in Movements.xml

PHP:
	<movevent type="StepIn" itemid="7924" event="script" value="yalaharstairs.lua"/>
	<movevent type="StepIn" itemid="7925" event="script" value="yalaharstairs.lua"/>
	<movevent type="StepIn" actionid="7925" event="script" value="yalaharstairs.lua"/>
	<movevent type="StepIn" actionid="7924" event="script" value="yalaharstairs.lua"/>


How it Works?

Normally put this stairs at map editor:

24lpglf.jpg


but to make climbing down, you have to do a litte trick.

Make stairs tile(ID: 459) 1 floor above stairs and give it Action ID of Stairs Below:

2irfcz.jpg
.


It should look like it:

124itye.jpg


Same for East Stairs.


Rep Me If You Like It.

Yours QuaS~
 
There are already yalahar stairs in TFS 0.3.5. And they are automatic. But gratz for done script :p
 
I tried to do something very similar but have had no luck with it at all

Code:
<movement event="StepIn" itemid="7925" script="stairs.lua" />
<movement event="StepIn" itemid="7924" script="stairs.lua" />

Code:
function onStepIn(cid, item, position, fromPosition)

	if(item.itemid == 7925) then
		local position1 = {x = position.x + 2, y = position.y, z = position.z - 1, stackpos = 235}
		doTeleportThing(cid, position1)
		doCreatureSetLookDir(cid, EAST)
	end



end

Just trying to get the east stairs to go up! Any idea where I am going wrong?
 
Both this and the 0.3.5 method of solving this sucks, a better solution will be available in The Forgotten Server v0.2.5 :).
 
Both this and the 0.3.5 method of solving this sucks, a better solution will be available in The Forgotten Server v0.2.5 :).

So your saying 0.2.5 will be better than 0.3.5?
:eek:
(In the matter of stairs working?)
 
If they will keep the method they are using in 0.3.5, yes. But I guess they will apply my patch to 0.3.5 once I've commited it to the SVN.
 
If they will keep the method they are using in 0.3.5, yes. But I guess they will apply my patch to 0.3.5 once I've commited it to the SVN.

Of course, its a must hehe ;D

As I wrote in commit:
Code:
* Sad way for yalahar stairs (But it works same as in global tibia)
 
Back
Top