Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.rsbot.client.RSItem;
- import org.rsbot.script.Script;
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.methods.Game;
- import org.rsbot.script.methods.Magic;
- import org.rsbot.script.methods.Skills;
- import org.rsbot.script.wrappers.RSArea;
- import org.rsbot.script.wrappers.RSGroundItem;
- import org.rsbot.script.wrappers.RSNPC;
- import org.rsbot.script.wrappers.RSTile;
- @ScriptManifest(authors = "Thondar", description = "Trains Pures", keywords = "Pure, Str, Def, Att", name = "TTPure", version = 0.01)
- public class TTPure extends Script {
- int defCheck;
- int strCheck;
- int attCheck;
- String status;
- int lvlCheck;
- int[] LUshopkeeper = {520, 521};
- int bones = 526;
- int featherID = 314;
- int[] chickenID = {41, 1017};
- int[] weaponID = {1205, 1206, 1321, 1322, 1277, 1278, 1291, 1292, 1279, 1280, 1293, 1294, 1323, 1324, 1207, 1208, 1281, 1282, 1295, 1296, 1217, 1218, 1283, 1284, 1297, 1298, 1327, 1328, 1209, 1210, 1285, 1286, 1299, 1300, 1329, 1330, 1211, 1212, 1287, 1288, 1301, 1302, 1331, 1332, 1213, 1214, 1289, 1290, 1303, 1304, 1333, 1334};
- RSTile LUshoppath = new RSTile(3214,3242);
- RSTile chickenpath = new RSTile(3238,3295);
- public final RSArea LUArea = new RSArea(new RSTile[] {
- new RSTile(3200, 3202), new RSTile(3201, 3238),
- new RSTile(3219, 3238), new RSTile(3216, 3303),
- new RSTile(3265, 3298), new RSTile(3264, 3203)
- });
- @Override
- public boolean onStart() {
- walking.setRun(true);
- mouse.setSpeed(random(4, 6));
- log("Welcome to TTPure");
- return true;
- }
- public void getStarterKnife(){
- RSNPC startervendor = npcs.getNearest(LUshopkeeper);
- if(store.isOpen()){
- mouse.click(186,74,false);
- sleep(300);
- mouse.click(191,119,true);
- store.close();
- }else{
- if (startervendor != null) {
- if(startervendor.isOnScreen());
- startervendor.interact("Trade");
- sleep(150, 250);
- }
- }
- }
- public void lumbridgeTeleport(){
- final int lumbridge = Magic.SPELL_HOME_TELEPORT;
- if (players.getMyPlayer().getAnimation() == -1)
- magic.castSpell(lumbridge);
- sleep(13250, 14750);
- status = ("Teleporting...");
- }
- public void lootFeather(){
- RSGroundItem feather = groundItems.getNearest(featherID);
- if(feather != null);
- if(feather.isOnScreen());
- feather.interact("Take Feather");
- sleep(150, 250);
- while(getMyPlayer().isMoving())
- sleep(100,150);
- }
- public boolean isIdle() {
- if (players.getMyPlayer().getAnimation() == -1){
- return true;
- }else{
- return false;
- }
- }
- public void attackChicken() {
- RSNPC chicken = npcs.getNearest(chickenID);
- chicken.interact("attack");
- }
- public void equipWeapon() {
- if(inventory.containsOneOf(weaponID));
- inventory.getItem(weaponID).interact("wield");
- }
- public void killChicken() {
- RSNPC chicken = npcs.getNearest(chickenID);
- if(chicken.isOnScreen());
- if(!combat.isAttacking(chicken))
- if(!chicken.isInteractingWithLocalPlayer())
- attackChicken();
- }
- public boolean atChickens() {
- RSArea ChickArea = new RSArea(new RSTile(3225, 3287), new RSTile(3238,
- 3302));
- return ChickArea.contains(getMyPlayer().getLocation());
- }
- public void lvlCheck1() {
- if(attCheck <= 9 && strCheck <= 9 && defCheck <= 9);
- lvlCheck = 1;
- }{
- if(attCheck >= 10 || strCheck >= 10 || defCheck >= 10 && attCheck <= 30 && strCheck <= 30 && defCheck <= 30 );
- lvlCheck = 2;
- }
- public boolean atLumbridge(){
- return LUArea.contains(getMyPlayer().getLocation());
- }
- public boolean atLuShop(){
- RSArea LuShopArea = new RSArea(new RSTile(3210, 3238),
- new RSTile(3219, 3248));
- return LuShopArea.contains(getMyPlayer().getLocation());
- }
- public int loop() {
- if(atLumbridge()) {
- attCheck = skills.getCurrentLevel(Skills.ATTACK);
- defCheck = skills.getCurrentLevel(Skills.DEFENSE);
- strCheck = skills.getCurrentLevel(Skills.STRENGTH);
- }
- if(atLumbridge() && !equipment.containsOneOf(weaponID)) {
- walking.getPath(LUshoppath).traverse();
- log("Walking to Shop");
- }
- if(atLuShop()) {
- getStarterKnife();
- sleep(250, 300);
- if(inventory.containsOneOf(weaponID));
- equipWeapon();
- log("Getting Bronze Dagger");
- }
- if(equipment.containsOneOf(weaponID) && !atChickens()) {
- walking.getPath(chickenpath).traverse();
- log("Waling to Chickens");
- }
- if(atChickens()) {
- killChicken();
- log("Killing Chickens");
- }
- if(atChickens() && isIdle() == true) {
- lootFeather();
- log("Looting Feathers");
- }
- return random(500, 1500);
- }
- public void onFinish() {
- log("Thanks for using TTPure");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment