Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package scripts;
- import java.awt.Color;
- import java.awt.Font;
- import java.awt.Graphics;
- import org.tribot.api2007.types.RSNPC;
- import org.tribot.api2007.NPCs;
- import org.tribot.script.Script;
- import org.tribot.script.ScriptManifest;
- import org.tribot.script.interfaces.Painting;
- @ScriptManifest(authors={"RuniteRocks"}, category="Tools", name="JadHelper", description="Shows what attack Jad is using and what prayers you need to use.", version=0.1)
- public class JadHelper extends Script
- implements Painting
- {
- private String version = "v0.1";
- private final Color color = new Color(255, 255, 255);
- private final Font font = new Font("Verdana", 0, 12);
- private String attackStyle = "";
- public void run()
- {
- println("You're currently running " + this.version + "!");
- while (loop() > 0)
- loop();
- }
- public int loop()
- {
- NPCs.getAll();
- RSNPC[] jad = NPCs.findNearest(2745);
- if (jad.length > 0) {
- for (RSNPC npc : jad) {
- if(npc.getAnimation() == 2652) {
- this.attackStyle = "Range";
- } else if(npc.getAnimation() == 2656) {
- this.attackStyle = "Mage";
- } else if(npc.getAnimation() == 2655) {
- this.attackStyle = "Melee";
- } else {
- this.attackStyle = "";
- }
- }
- }
- return 1;
- }
- public void onPaint(Graphics g)
- {
- g.setFont(this.font);
- g.setColor(this.color);
- g.drawString("Jad Is Using: "+this.attackStyle, 592, 431);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment