Jump to content
Sign in to follow this  
Papa

PASTING GAME -

Recommended Posts

RaphaeL

Posted 22 April 2010 - 04:49 AM

Share this post


Link to post
Share on other sites
The Man

exe.rar.com

Share this post


Link to post
Share on other sites
Pk  Theory

import java.awt.Color;

import java.awt.Graphics;

import java.awt.Point;

import java.util.ArrayList;

import java.util.Map;

 

import org.rsbot.bot.Bot;

import org.rsbot.event.listeners.PaintListener;

import org.rsbot.script.Calculations;

import org.rsbot.script.Script;

import org.rsbot.script.ScriptManifest;

import org.rsbot.script.Skills;

import org.rsbot.script.wrappers.RSInterface;

import org.rsbot.script.wrappers.RSTile;

import org.rsbot.script.wrappers.RSObject;

 

@ScriptManifest(authors = { "Garrett" }, category = "Agility", name = "Garrett's Extended Barbarian Agility", version = 1.00, description =

"<html><head>" +

"</head><body>" +

"<center><strong><h2>Garrett's Extended Barbarian Agility</h2></strong></center>" +

"<strong>Start at the Barbarian Agility Course at the Rope Swing</strong><br />" +

"Food ID: <input name='FOODID' type='text' width='10' value='379' /><br />" +

"Eat Food Between: <input name='HEALTH1' type='text' width='3' value='15' /> - <input name='HEALTH2' type='text' width='3' value='25' /> HP" +

"</body></html>")

 

public class GarrettsExtendedBarbarianAgility extends Script implements PaintListener {

 

final ScriptManifest properties = getClass().getAnnotation(ScriptManifest.class);

 

//OTHER VARIABLES

private long scriptStartTime = 0;

private int runEnergy = random(40, 95);

private boolean setAltitude = true;

private int FOODID;

private int HEALTH1;

private int HEALTH2;

private int randomHealth = random(15, 20);

private int startXP = 0;

private int startLvl = 0;

 

private enum State { rope, log, wall, climb, spring, walk, jump, slide, error; };

 

private State getState() {

if (playerInArea(2535, 3553, 2531, 3553) && getPlane() == 3)

return State.walk;

if (playerInArea(2537, 3553, 2535, 3553) && getPlane() == 3)

return State.jump;

if (!inventoryContains(FOODID) && getHealth() < randomHealth) {

log("You do not have any food in your inventory and your health is low.");

return State.error;

}

if (playerInArea(2555, 3559, 2543, 3550))

return State.rope;

if (playerInArea(2553, 3549, 2544, 3542))

return State.log;

if (playerInArea(2541, 3547, 2536, 3542) && getPlane() == 0)

return State.wall;

if (playerInArea(2538, 3547, 2537, 3545) && getPlane() == 2)

return State.climb;

if (playerInArea(2537, 3547, 2532, 3545) && getPlane() == 3)

return State.spring;

if (playerInArea(2542, 3554, 2538, 3552) && (getPlane() == 2 || getPlane() == 1))

return State.slide;

return State.rope;

}

 

//*******************************************************//

// ON START

//*******************************************************//

public boolean onStart( Map<String,String> args ) {

FOODID = Integer.parseInt(args.get("FOODID"));

HEALTH1 = Integer.parseInt(args.get("HEALTH1"));

HEALTH2 = Integer.parseInt(args.get("HEALTH2"));

randomHealth = random(HEALTH1, HEALTH2);

scriptStartTime = System.currentTimeMillis();

return true;

}

 

//*******************************************************//

// MAIN LOOP

//*******************************************************//

public int loop() {

if (!(isLoggedIn()))

return 50;

if (startLvl == 0) {

startXP = skills.getCurrentSkillExp(Skills.getStatIndex("agility"));

startLvl = skills.getCurrentSkillLevel(Skills.getStatIndex("agility"));

return 50;

}

if (setAltitude) {

setCameraAltitude(true);

wait(random(250, 500));

setAltitude = false;

return 50;

}

if (getHealth() < randomHealth) {

leftClickInventoryItem(FOODID);

randomHealth = random(HEALTH1, HEALTH2);

wait(random(600, 800));

return 50;

}

startRunning(runEnergy);

antiBan();

switch(getState()) {

case rope:

doRope();

return 50;

case log:

doLog();

return 50;

case wall:

doWall();

return 50;

case climb:

doClimb();

return 50;

case spring:

doSpring();

return 50;

case walk:

doWalk();

return 50;

case jump:

doJump();

return 50;

case slide:

doSlide();

return 50;

case error:

return -1;

}

 

return 50;

}

 

//*******************************************************//

// OTHER METHODS

//*******************************************************//

private void doRope() {

final RSTile rope = new RSTile(2551 + random(0, 2), 3553);

final RSTile ladder = new RSTile(2547, 9951);

final RSTile walkHere = new RSTile(2551, 3554);

if (playerInArea(2555, 9955, 2546, 9948)) {

if (getCameraAngle() < 85 || getCameraAngle() > 95) {

setCameraRotation(random(85, 95));

wait(random(100, 200));

return;

}

if (onTile(ladder, "Ladder", "Climb-up", 0.5, 0.5, 40))

wait(random(750, 1000));

return;

}

if ((!playerInArea(2554, 3555, 2549, 3554)) && getPlane() == 0) {

walkTile(walkHere);

wait(random(700, 1000));

return;

}

if (onTile(rope, "Ropeswing", "Swing-on", 0.5, 0, 450))

wait(random(3300, 4700));

while(getMyPlayer().getAnimation() == 751 || getMyPlayer().isMoving())

wait(100);

return;

}

 

private void doLog() {

final RSTile log = new RSTile(2550, 3546);

if (onTile(log, "Log balance", "Walk-across", 0.5, 0.4, 0))

wait(random(500, 750));

while(getMyPlayer().isMoving() || playerInArea(2550, 3546, 2542, 3546))

wait(100);

return;

}

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this