MoveEvent Yalahar Stairs (south and east)

QuaS

Cykotitan Pwned =/
Joined
Sep 11, 2008
Messages
833
Best answers
0
Reaction score
26
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:



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:

.


It should look like it:



Same for East Stairs.


Rep Me If You Like It.

Yours QuaS~
 

slawkens

Developer
Premium User
Joined
Aug 27, 2007
Messages
2,873
Best answers
60
Reaction score
389
Location
Germany
There are already yalahar stairs in TFS 0.3.5. And they are automatic. But gratz for done script :p
 

MG Zeke

New Member
Joined
Jul 5, 2009
Messages
154
Best answers
0
Reaction score
1
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?
 

OldXar

Member
Joined
Feb 17, 2009
Messages
215
Best answers
0
Reaction score
6
Thanks, since I was allready planning to change all those stairs !
 

Mark

Administrator
Staff member
Administrator
Joined
May 27, 2007
Messages
6,389
Best answers
21
Reaction score
1,388
Location
Sweden
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 :).
 

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Best answers
2
Reaction score
109
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?)
 

Mark

Administrator
Staff member
Administrator
Joined
May 27, 2007
Messages
6,389
Best answers
21
Reaction score
1,388
Location
Sweden
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.
 

slawkens

Developer
Premium User
Joined
Aug 27, 2007
Messages
2,873
Best answers
60
Reaction score
389
Location
Germany
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)
 

klekSu

Stroke my ego.
Joined
Nov 4, 2008
Messages
1,285
Best answers
0
Reaction score
18
Awesome! Thanks quas, rep.
__________________

You are welcome on kleksoria.com!
Please visit new open tibia forum with it's own ots list. otservers.net!
 
Last edited:

Pietia

Active Member
Joined
Jan 13, 2008
Messages
2,142
Best answers
0
Reaction score
40
Location
Poland
;]]]]]]]]]]]]]]
 
Last edited:
Top