Jump to content

Jad Prayer Swapper


GuiltyAsCharged

Recommended Posts

JAD PRAYER SWAPPER


Swaps prayers automatically so you don't have to!


 


PRO TIP:


When you activate the script, please make sure that the log is spamming "waiting for Jad to appear...", this ensures that the script is working and checking for Jad.


 


 


IMPORTANT STEPS TO KEEP IN MIND:


  1. You can activate the script at any time during the fight caves, it will only swap your prayer when Jad is in sight.
  2. To ensure that Jad is in sight, make sure to kill the off colored orange level 360 LAST. Jad will spawn where the off colored orange 360 spawned.
  3. From there, the script should take over and swap prayers as needed, so long as Jad is in sight.
  4. When the script prayer swaps for you, it may cause your camera to jerk around. This is due to me allowing user input. TIME YOUR CLICKS ACCORDINGLY TO AVOID WALKING INTO JAD (Click to drink potions/attack Jad after each prayer swap).
  5. Lastly, I have it scripted so it can protect against melee. I DO NOT ADVISE YOU GET COMFORTABLE IN MELEE RANGE. I DOUBT IT WILL CHANGE FAST ENOUGH FOR JAD's QUICK MELEE ANIMATION.

 


Download: http://uppit.com/7bk9h99h7l5x


 


FULL DISCLOSURE:


  1. I've only tested the script once to help my stupid slow reflexes fight Jad. It worked so I'm not planning on doing another run anytime soon now that I have the fire cape. If you have problems with the script, then you're either doing some wrong or I fucked up. If I did fuck up, I'll fix it if possible when I have time.
  2. As a continuation of the point of above, if you have an issue please copy and paste the logger.
  3. I'm publishing this to you guys because I searched everywhere for a prayer swapper like this and couldn't find one, so I made this. IT IS BY NO MEANS AMAZING. I just made this barebones to swap prayers, nothing more. IT WILL NOT FIGHT  JAD FOR YOU.
  4. Credits to this link for giving me the animation ids, saved me lots of work: http://osbot.org/forum/topic/61368-jad-attack-style-animation-ids/

 


Here's the stupidly simple code for you to hate:



import org.osbot.rs07.api.model.NPC;
import org.osbot.rs07.api.ui.PrayerButton;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

//TzTok-Jad
//MAGE(2656, Prayer.PROTECT_FROM_MAGIC, Color.BLUE),
//MELEE(2655, Prayer.PROTECT_FROM_MELEE, Color.RED),
//RANGE(2652, Prayer.PROTECT_FROM_MISSILES, Color.GREEN);

@ScriptManifest(author = "GuiltyAsCharged", info = "Because reflexes suck hardcore.", name = "Jad Prayer Swaper", version = 1.1, logo = "")

public class main extends Script
{
@Override
public void onStart() {
log("Let's get started!");
}

@Override
public int onLoop() throws InterruptedException
{
getBot().setHumanInputEnabled(true);
NPC jad = npcs.closest("TzTok-Jad");
if(jad != null)
{
//begin prayer swapping
//get animation
if(jad.getAnimation() == 2656)
{
//swap to mage prayer
log("Jad is maging.");
prayer.set(PrayerButton.PROTECT_FROM_MAGIC, true);
}
else if(jad.getAnimation() == 2652)
{
//swap to range prayer
log("Jad is ranging.");
prayer.set(PrayerButton.PROTECT_FROM_MISSILES, true);
}
else if(jad.getAnimation() == 2655)
{
//swap to melee prayer
log("Jad is meeleing.");
prayer.set(PrayerButton.PROTECT_FROM_MELEE, true);
}
return random(100, 110);
}
else
{
log("waiting for Jad to appear...");
return random(100, 110);
}
}

@Override
public void onExit() {
log("Hope you got the cape!");
}
}


Edited by GuiltyAsCharged
  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...

You have to pause the script or enable user imput.. until jad

 

Is this error msg normal?

[iNFO][bot #1][08/06 12:25:30 AM]: Started script : Jad Prayer Swaper

[ERROR][bot #1][08/06 12:25:30 AM]: Error in bot executor!

java.lang.NoSuchMethodError: org.osbot.rs07.Bot.setHumanInputEnabled(Z)V

    at main.onLoop(main.java:23)

    at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(vi:149)

    at java.lang.Thread.run(Thread.java:745)

 

I get it starting the script at wave 1. Just checking because i don't wanna get to jad hit play and it not work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...