Everything posted by Chris
- Probably quitting rs again
-
Jug of Water getter
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 = "Grabs J.O.W", name = "S_JWGrabber", version = 1.0, logo = "") public class S_JWGrabber extends Script { private static final Position[] PATH_TO_BANK = { new Position(3293,3165,0), new Position(3295,3172,0), new Position(3293,3178,0), new Position(3286,3179,0), new Position(3277,3173,0), new Position(3271,3167,0) }; private static final Position[] PATH_TO_NPC = { new Position(3271,3167,0), new Position(3277,3173,0), new Position(3286,3179,0), new Position(3293,3178,0), new Position(3295,3172,0), new Position(3293,3165,0), new Position(3302,3165,0) }; private static final Area NPC_AREA = new Area(3289,3160,3303,3165); @Override public void onStart() { log("Time to grab some Jugs of Water ;)"); if (!getClient().isLoggedIn()){ log("Please login before using!"); } } @Override public int onLoop() throws InterruptedException { if (inventory.isFull() && getInventory().contains("Jug of water")){ getLocalWalker().walkPath(PATH_TO_BANK); //BankChecks RS2Object bankBooth = objects.closest("Bank Booth"); if (bankBooth != null && !bank.isOpen()) { if (bankBooth.interact("Bank")) { new ConditionalSleep(10000) { //returns if true (i hope) @Override public boolean condition() throws InterruptedException { return getBank().isOpen(); } }.sleep(); } } if (bank.isOpen()) { //do banking getBank().depositAll(); } else { bank.open(); sleep(random(400, 700)); } }else{ if (getInventory().isEmpty() && (!NPC_AREA.contains(myPlayer().getPosition()))){ getLocalWalker().walkPath(PATH_TO_NPC); sleep(random(300,700)); } NPC npc = npcs.closest("Hassan"); if (!dialogues.inDialogue()){ if (npc != null){ if (npc.isVisible()){ npc.interact("Talk-to"); sleep(random(300,600)); } } }else{ //handle dialogue if (getDialogues().isPendingContinuation()){ getDialogues().clickContinue(); } if (getDialogues().isPendingOption()){ getDialogues().selectOption(2); sleep(random(300,500)); getDialogues().clickContinue(); sleep(random(300,500)); getDialogues().clickContinue(); sleep(random(300,500)); getDialogues().clickContinue(); } } } return (random(300,600)); } @Override public void onExit() { log("Thanks for trying it out!"); } @Override public void onPaint(Graphics2D g) { } } This is a rough draft. I am new to scripting but this should get the job done. There is no paint and it is as simple as it gets im sure the other scripters can fix the issue Testing in f2p W394 EDIT: Known bug = when returning to "Hassan" it will bank check twice. CBA to fix XD im busy now Check the OSBOT API for better structure EDIT: this is it in action interacting(GIF): http://gyazo.com/9d84ee932dc49bfa3e9d849e8411d875 If inventory is full(GIF): http://gyazo.com/db19c2e3f13cdbc745a54da7920deb75 Banking issue (GIF): http://gyazo.com/1f2cc6de6d75dce9a25367b7f674fdd7
- I need 93-99 range NMZ blowpipe!
-
Any Ideas?
I ended up using the getskill method and it works ;) Thanks for the extra info
- Any Ideas?
- Any Ideas?
-
Any Ideas?
if (!myPlayer().isAnimating() && !myPlayer().isMoving()) { if (!myPlayer().isUnderAttack() && Guard.isVisible()) { Guard.interact("Attack"); sleep(random(500, 1000)); } else { camera.toEntity(Guard); } } } if (myPlayer().getHealth() <=30 && getInventory().contains("Lobster")) { inventory.getItem("Lobster").interact("Eat"); sleep(random(600, 1200)); } I get this issue when running http://gyazo.com/32407f7a8337725e1ea21a0d621e325d It would return to attack then eat a lobster when it is already full health
-
Trouble loading scripts into OSBot Client
How do I make a .jar in IntelliJ? my skype is: osbotsinatra1
- Open for request..
- Open for request..
-
Script help needed! [What not to do & how I can do it better]
Meh I tried states but I gave up on them
-
Script help needed! [What not to do & how I can do it better]
Thanks for the response!
-
Script help needed! [What not to do & how I can do it better]
@Override public int onLoop() throws InterruptedException { if (!inventory.contains("Lobster")&&MONSTER_AREA.contains(myPlayer())){ if (!BANK_AREA.contains(myPlayer())){ getLocalWalker().walkPath(PATH_TO_BANK); //walk to bank }else{ RS2Object bankBooth = (RS2Object)this.objects.closest(new String[] {"Bank booth"}); if (bankBooth != null){ if (bankBooth.interact("Bank")) { //checks if it will return true new ConditionalSleep(10000) { @Override public boolean condition() throws InterruptedException { return getBank().isOpen(); } }.sleep(); if (getBank().isOpen()){ getBank().withdrawAll("Lobster"); sleep(random(377, 544)); } } bank.close(); log("STATE:. BANKED"); } } } if (!MONSTER_AREA.contains(myPlayer())){ getLocalWalker().walkPath(PATH_TO_MONSTER); log("STATE: WALKING BACK"); } This is the code I am dealing with. I want it to go from Varrock Palace to Varrock west bank and use the booth. Then head back to the guards. What am I doing wrong here and how can I improve my code?
-
Need Tree gnome village/Grand tree and just a part from monkey madness!
Recommend him OP. Take his offer
-
Haunted Mine
I can do this 1m: skype: osbotsinatra1
-
Price check
20 att 61 str 1 def 1 pray 44 range 71 mage 47 cmb No registered email
-
me when i login to my PC
- Dispute against Sinatra
36m has been Paid. Sorry for the understanding here. image removed as it contained rsn's- whats up with these emoticons
/shitmeme- Microsoft Windows 10 Countdown
Windows 10 is coming 00 :10 :40 :25 DAYS HOURS MINUTES SECONDS- LoL is a shit game
because your MMR is balancing itself out- Buying 20M 1.25$~1.4$/M
- Best way to find out of my ip has been flagged?
bot f2p nd check back in 2 hours- Dispute against Sinatra
please add it then so a mod can review it. @Dex Please let me know. I will be giving ridnem another 20m when he comes back online to complete the 36m gold for the account transaction.- Dispute against Sinatra
I am waiting for Ridnem to reply. I will only have 16m available until I can buy more gold. I have school till 3pm EST/EDT and i will be available afterwards 16m/36m Given for account transaction. - Dispute against Sinatra