-
Posts
8355 -
Joined
-
Last visited
-
Days Won
14 -
Feedback
100%
Everything posted by Chris
-
Please do not cry for poor scripting ;) I can get it to walk -> from cows -> 1st floor -> second -> how do I make it start banking? make an if statement like below? if (BANK_AREA.contains(myPlayer().getposition){ return CKiller.State.BANK; } Here is what I have....(lol states I know) import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import java.awt.*; @ScriptManifest(author = "Sinatra", info = "Basic Cow Killer & Banker!", name = "CKiller", version = 0.1, logo = "") public class CKiller extends Script { private final Area MONSTER_AREA = new Area(3242,3255,3265,3296); private final Area BANK_AREA = new Area(3207,3216,3210,3220); private final Position[] PATH_TO_BANK = { new Position(3250,3266,0), new Position(3250,3258,0), new Position(3253,3249,0), new Position(3258,3243,0), new Position(3259,3234,0), new Position(3259,3227,0), new Position(3249,3225,0), new Position(3243,3225,0), new Position(3235,3225,0), new Position(3230,3218,0), new Position(3222,3218,0), new Position(3215,3218,0), new Position(3212,3209,0), new Position(3206,3208,0) }; private final Position[] PATH_TO_STORAGE ={ new Position(3208,3220,2) }; private final Position[] PATH_TO_MONSTER1 = { new Position(3206,3215,2), new Position(3206,3209,2) }; private final Position[] PATH_TO_MONSTER2 ={ new Position(3206,3208,0), new Position(3212,3209,0), new Position(3215,3218,0), new Position(3222,3218,0), new Position(3230,3218,0), new Position(3235,3225,0), new Position(3243,3225,0), new Position(3249,3225,0), new Position(3259,3227,0), new Position(3259,3234,0), new Position(3258,3243,0), new Position(3253,3249,0), new Position(3250,3258,0), new Position(3250,3266,0) }; private enum State{ WALK_TO_BANK, WALK_TO_MONSTER, COMBAT, BANK } private State getState(){ if(inventory.isFull() && inventory.contains(new String("Cowhide"))) { return State.WALK_TO_BANK; } return State.COMBAT; } @Override public void onStart() { log("The start of maxed combat & bank !"); } @Override public int onLoop() throws InterruptedException { switch (getState()){ case COMBAT: final NPC Cow = this.npcs.closest("Cow", "Cow calf"); if(!this.myPlayer().isUnderAttack() && !Cow.isUnderAttack() && !this.myPlayer().isAnimating()){ Cow.interact("Attack"); sleep(random(300,600)); } else sleep(random(300,600)); break; case BANK: RS2Object bankBooth = (RS2Object)this.objects.closest(new String[] {"Bank booth"}); if (bankBooth != null){ if (bankBooth.interact("Bank")) { new ConditionalSleep(10000) { @Override public boolean condition() throws InterruptedException { return getBank().isOpen(); } }.sleep(); if (this.getBank().isOpen()){ this.getBank().depositAll(); sleep(random(377,544)); } } this.bank.close(); this.log("State: BANKING"); } break; case WALK_TO_BANK: localWalker.walkPath(PATH_TO_BANK); //path to bank from cows to first floor sleep(random(300, 600)); objects.closest("Staircase").interact("Climb-up"); //up 1 floor sleep(random(300, 600)); objects.closest("Staircase").interact("Climb-up"); // up again sleep(random(300, 600)); localWalker.walkPath(PATH_TO_STORAGE); //top lumby bank floor sleep(random(300, 700)); break; case WALK_TO_MONSTER: localWalker.walkPath(PATH_TO_MONSTER1); //path from bank to staircase objects.closest("Staircase").interact("Climb-down"); //down 1 floor sleep(random(300,600)); objects.closest("Staircase").interact("Climb-down"); //down again sleep(random(300,600)); localWalker.walkPath(PATH_TO_MONSTER2); //path to cows break; } return (random(200,300)); } @Override public void onExit() { log("Thanks for using my cow killer and Banker!"); log("Please leave script feedback on my post!"); } @Override public void onPaint(Graphics2D g) { } }
-
cya m(7+1) nice acc
-
osbotsinatra1
-
6m 07
-
[HIRING] [TRUSTED] [AIO] .:*・°☆ TRITON SERVICES ☆°・*:.
Chris replied to ILoveJames's topic in Worker Applications
I'm Barack Obama and I approve this thread! -
So something like this if(!this.myPlayer().isUnderAttack() && !Cow.isUnderAttack() && this.myPlayer().getInteracting() == null && Cow != null && Cow.isVisible()) { Cow.interact("Attack");
-
thanks for the helpful information!
-
import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import javax.swing.text.Position; import java.awt.*; @ScriptManifest(author = "Sinatra", info = "", name = "Kil", version = 0.1, logo = "") public class Skeleton extends Script { @Override public void onStart() { /*code that will run*/ log("Welcome -- Starting the mothafukin script!"); } @Override public int onLoop() throws InterruptedException { final NPC Cow = this.npcs.closest("Cow", "Cow calf"); if(!this.myPlayer().isUnderAttack() && this.myPlayer().getInteracting() == null && Cow != null && Cow.isVisible()) { Cow.interact("Attack "); sleep(random(300, 600)); } else { camera.toEntity(Cow); sleep(random(300, 600)); } return (random(100,300)); } @Override public void onExit() { log("Thank you for testing my script!"); log("Let me know if you run in to problems!"); } @Override public void onPaint(Graphics2D g) { } The script runs! But how do I make it not attack other peoples cows? It keeps spam clicking! sorry I am new
-
Do you also do like public tutorials through google hangouts?
-
teach me how to script 500$/hr
-
Wyverns Maxed main available thx the community will salute u
-
skype : OsbotSinatra1
-
Account Status Login: Stats Quests: Payment I will be accepting: RSGP AutoWin: 10m Starting: 1m No Email registered Created and quested by me.
-
Price check on x10 (73 hunter only accounts) and x1 20-61-1 w/44 range
Chris replied to Chris's topic in Price Check
thanks for the feedback! -
fukt u
-
been botting f2p starter pures 20/60/1 with 40 range accs being rdy for mith gloves. hope they dont get banned 24/7
-
Currently have a 40m trade pending but if he cant deal tonight I will do the deal with you tomorrow!