Jump to content
Sign in to follow this  

[PI] Ladders/Stairs

Recommended Posts

This i no where near the most efficient way to do ladders in PI, but I just wrote this up quickly as I don't intend to have the full trapdoors/ladders or anything, for me personally this will do and is easy to implement.

First of all you need the modified cycle event manager, if you don't want to use it you're just going to have to fiddle about with the ticks from 2 to 1800 I think.

public void Climb(int x, int y, int h, String animation) {
if (animation == "up") {
} else if (animation == "down") {
c.canWalk = false;
CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
public void execute(CycleEventContainer container) {
public void stop() {
c.getPA().movePlayer(x, y, h);
c.canWalk = true;
}, 2);

And that's it, if you want to use this you should know where to add the object clicking and there's two snippets below how it was used, but if you can't figure it out, i'm slightly worried.

Example of climbing up ladders/stairs:
//falador mine stairs
case 1734:
if (obX == 3059) {
c.getPA().Climb(3061, 3377, 0, "up");

and if you want the climb down animation obviously you change the "up" to "down"

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this