thirkle
July 27th, 2010, 18:54
While I know this is very easy, I have not yet seen it on these forums and it has been requested by a few of the people on my msn, haters, I didn't write this for you.
The concept of automatic teleporting is simple, if your player walks onto a certain square with the given coordinates, they would be automatically teleported to a given location.
I tested and wrote this using final devo 2.7, but it would be simple to convert the code.
First off, open up client.java, we need to find the process method, which is called twice every second.
Quote
public boolean playerProcess() {
this method is named playerProcess(), but in other sources i'm pretty sure it's just "public boolean process()", and this is the method where timers etc go.
So just under that line, place this code:
Quote
if (absX == 2660 && absY == 3306) {
teleportToX = 2690;
teleportToY = 3306;
heightLevel = 0;
CAM().sendMessage("You have been automatically teleported.");
}
Now, this code will be called twice every second, and you can change the coordinates to your liking, change the line:
if (absX == 2660 && absY == 3306) {
To change the coordinates which teleport you.
And change the lines:
teleportToX = 2690;
teleportToY = 3306;
to change the coordinates which you get teleported to.
Remember, flame all you want, I won't be wasting my time replying.
The concept of automatic teleporting is simple, if your player walks onto a certain square with the given coordinates, they would be automatically teleported to a given location.
I tested and wrote this using final devo 2.7, but it would be simple to convert the code.
First off, open up client.java, we need to find the process method, which is called twice every second.
Quote
public boolean playerProcess() {
this method is named playerProcess(), but in other sources i'm pretty sure it's just "public boolean process()", and this is the method where timers etc go.
So just under that line, place this code:
Quote
if (absX == 2660 && absY == 3306) {
teleportToX = 2690;
teleportToY = 3306;
heightLevel = 0;
CAM().sendMessage("You have been automatically teleported.");
}
Now, this code will be called twice every second, and you can change the coordinates to your liking, change the line:
if (absX == 2660 && absY == 3306) {
To change the coordinates which teleport you.
And change the lines:
teleportToX = 2690;
teleportToY = 3306;
to change the coordinates which you get teleported to.
Remember, flame all you want, I won't be wasting my time replying.