Request for "z" adjustment script.

Need help with your JScripts? Got questions concerning the DFNs? Come forward, step inside :)
Post Reply
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Request for "z" adjustment script.

Post by stranf »

What I'm going to do is attach a script to a rope that sets the "z" coordinate value to -20, and then a different script to set it back to 0.

What are the functions nessecary for this? (I'm sure it's so easy, someone could code it in this message.)

Anyway, I don't have a lot of free time today, so if someone could whip it out, that'd be cool.

The tunnels under the jails in Yew, and the caverns under bucs den are all at a z value around -20, and begin at 0, if you could attach the "z adjustment" script to a rope or object, these areas would now be accesible to pcs. Thanks!
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

To change a players position use the teleport function: https://www.uox3.org/jsdocs/common.html#SE_Teleport
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

Thanks. This script requires the x, and y, corrdinates. is that set off by currentx? IE, for a "down" script it would be:

Code: Select all

mChar.Teleport( mChar.currentx, mChar.currenty, -20 );
If that's valid syntax I'm good to go! Thanks a ton!
[/code]
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

stranf wrote:Thanks. This script requires the x, and y, corrdinates. is that set off by currentx? IE, for a "down" script it would be:

Code: Select all

mChar.Teleport( mChar.currentx, mChar.currenty, -20 );
If that's valid syntax I'm good to go! Thanks a ton!
The propertys are ".x" and ".y", you should really use the JS documentation at: https://www.uox3.org/jsdocs/index.html
Post Reply