Custom Agility course release (v1)
v2 is mine and won't be released anytime soon but to give you an idea on how it was done or how you can do your own.... ima show you how to add this to your 667 or 718.
don't just copy and paste try to learn from this please.
Step One
Lets start by adding the command to your new course.
Code:
if (cmd[0].equalsIgnoreCase("btr")) {
Magic.sendNormalTeleportSpell(player, 0, 0.0D, new WorldTile(2337, 4238, 0), new int[0]);
player.getPackets().sendGameMessage("*hint* you will need a mithril cbow to finish course");
}
Step Two
Now lets spawn the needed objects (v2 didn't need any besides its advanced course)
add this into NpcSpawning.java
Code:
//btr by exiledbotter
World.spawnObject(new WorldObject(2004, 10, 1, 2343, 4240, 1), true);
World.spawnObject(new WorldObject(26293, 10, 2, 2340, 4239, 1), true);
World.spawnObject(new WorldObject(26293, 10, 2, 2342, 4239, 1), true);
//btr
Step Three
Now lets take a look in ObjectHandler.java
Make sure this next peice of code is in "private static void handleOption1"
search for
Code:
else if (id == 9356)
FightCaves.enterFightCaves(player);
put this under the fightcaves code above^ (I chose to put under this so you don't have mess with brackets)
Code:
//btr by exiledbotter================================================================================
else if (id == 42586) {
if (player.getSkills().getLevel(Skills.AGILITY) < 90) {
player.getPackets().sendGameMessage("You need an agility level of <l=FF0000>90</col> to use this obstacle.", true);
return;
}int x = player.getX() == 2337 ? 4238 : 2337;
WorldTasksManager.schedule(new WorldTask() {
int count = 0;
@Override
public void run() {
if (count++ == 1)
stop();
}
}, 0, 0);
player.useStairs(988, new WorldTile(2338, 4238, 1), 2, 3, "You climb the statue");
player.getAppearence().setRenderEmote(1463);
player.getSkills().addXp(16, 15.5);
}//jump 2
else if (id == 42594) {
player.useStairs(11230, new WorldTile(2339, 4239, 1), 2, 3, "You jump to the 2nd statue!");
player.getAppearence().setRenderEmote(1463);
player.getSkills().addXp(16, 20.3);
}
//rope 3
else if (id == 26293 && object.getX() == 2340 && object.getY() == 4239 && object.getPlane() == 1) {
player.useStairs(751, new WorldTile(2341, 4239, 1), 2, 3, "You rope swing to the 3rd statue!");
player.getSkills().addXp(16, 25.5);
}
//rope 4
else if (id == 26293 && object.getX() == 2342 && object.getY() == 4239 && object.getPlane() == 1) {
player.useStairs(751, new WorldTile(2343, 4239, 1), 2, 3, "You rope swing to the 4th statue!");
player.getAppearence().setRenderEmote(1463);
player.getSkills().addXp(16, 27.5);
}
//jumpdown 6
else if (id == 42600 && object.getX() == 2343 && object.getY() == 4241) {
player.useStairs(11230, new WorldTile(2343, 4244, 1), 2, 3, "You've jumped down to the 6th statue!");
player.getAppearence().setRenderEmote(1463);
player.getSkills().addXp(16, 30.5);
}
//jump to 7
else if (id == 42594 && object.getX() == 2343 && object.getY() == 4244) {
player.useStairs(11230, new WorldTile(2344, 4246, 1), 2, 3, "You've jumped to the 7th statue!");
player.getAppearence().setRenderEmote(1463);
player.getSkills().addXp(16, 35.5);
}
//jump to 8
else if (id == 42591 && object.getX() ==2344 && object.getY() == 4246) {
player.useStairs(11230, new WorldTile(2344, 4248, 1), 2, 3, "You've jumped to the last statue!");
player.getAppearence().setRenderEmote(1463);
player.getSkills().addXp(16, 35.5);
}
//jump to ledge 9
else if (id == 42594 && object.getX() ==2344 && object.getY() == 4248) {
player.useStairs(11230, new WorldTile(2345, 4250, 1), 2, 3, "You've jumped to the ledge now use your mithril cbow on the spear!!! ");
player.getAppearence().setRenderEmote(1463);
player.getSkills().addXp(16, 40.5);
}
//btr end=======================================================
Step Four
Now search for "HandleItemonObject"
put this any where under it. (after the run() method of course)
Code:
//bandosTR exiledbotter
if (itemId == 9181 && object.getId() == 42623) {
player.useStairs(762, new WorldTile(2350, 4242, 1), 2, 3, "You grappled the spear and swung over");
player.setNextGraphics(new Graphics(11));
player.getSkills().addXp(16, 70.5);
}
if (itemId == 9181 && object.getId() == 2004) {
player.useStairs(608, new WorldTile(2343, 4242, 1), 2, 3, "Nice! you grappled the pillar and climbed up.");
player.setNextGraphics(new Graphics(12));
player.getSkills().addXp(16, 70.5);
}//bandosTR end
Step Five
Now search for "HandleOption2"
you should see this code
Code:
else if (id == 17010)
player.getDialogueManager().startDialogue("LunarAltar");
Add this code under the above code.
Code:
else if (id == 42610) {
player.useStairs(11230, new WorldTile(2348, 4242, 0), 2, 3, "You've finished the course!");
player.getAppearence().setRenderEmote(0);
player.getSkills().addXp(16, 100.5);
}
DONE
If you need any help don't hesitate to ask and yes grapple is a little messed which why you need to fix delay, v2 already has that though. :)
enjoy guys, sorry if the code looks weird the code box messes it up, loads of things removed from it to so this will force you too learn how it was done not just copy/paste.
Credits to me
and Multak for the idea/remote/animations.