Jump to content

gilaga

Members
  • Posts

    54
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by gilaga

  1. I am really new to making scripts and I really dont think I would be able to make a UI. I am willing to make more food options available though, Currently the bot prioritizes certain foods over others, it will take out salmon first, then lobster, and then trout. I haven't tested this feature yet but I believe it works, confirmed with salmon though. If you would like to make a suggestion on a food to add I would be open to it.
  2. Thanks, where can I go for a good virus scan?
  3. Start in Draynor, in bank Eats trout, lobster, and salmon. Pathing is horrible but will fix soon. -Fixed a banking problem. -Virus Scans: https://www.virustotal.com/en/file/5fecff4cb660abf4dab1f09a67392e956996836c142a519291986d2da604c1ce/analysis/1406772744/ http://virusscan.jotti.org/en/scanresult/b655cbdd477c44aa067a3534e16e6b321d7d305a http://www.mediafire.com/download/953o742324jj616/BasicPickpocket.jar import org.osbot.legacy.script.mouse.MinimapTileDestination; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.utility.Area; import org.osbot.rs07.input.mouse.MiniMapTileDestination; import java.awt.*; @ScriptManifest(author = "Gilaga", info = "First Script Iv'e ever made.", name = "Basic PickPocket", version = 0, logo = "") public class BasicPickpocket extends Script{ private static final Area BANK_AREA = new Area(3092,3240,3095,3246); private Position PICKPOCKET_POSITION = new Position(3081,3250,0); private Position BANK_POSITION = new Position(3092,3243,0); private Position RUN_POSITION = new Position(3095,3250,0); private enum State{ EAT, BANK, WALK_TO_BANK, WALK_TO_PICKPOCKET, PICKPOCKET, RUN }; private State getState(){ if(myPlayer().isUnderAttack() && myPlayer().getInteracting().getId() == 5515){ return State.RUN; } else if(skills.getDynamic(Skill.HITPOINTS) < 10){ if(inventory.contains("Salmon", "Lobster", "Trout")){ return State.EAT; } else if(BANK_AREA.contains(myPlayer())){ return State.BANK; } else{ return State.WALK_TO_BANK; } } else if(BANK_AREA.contains(myPlayer())){ return State.WALK_TO_PICKPOCKET; } return State.PICKPOCKET; } public int onLoop() throws InterruptedException{ switch(getState()){ case EAT: inventory.interact("Eat", "Salmon", "Lobster", "Trout"); break; case PICKPOCKET: getNpcs().closestThatContains("Master Farmer").interact("Pickpocket"); break; case BANK: RS2Object bankBooth = objects.closest("Bank booth"); if (bankBooth != null) { if (bankBooth.interact("Bank")) { while (!bank.isOpen()) sleep(250); if(bank.contains("Salmon")){ bank.depositAll(); bank.withdraw("Salmon", 10); bank.close(); } else if(bank.contains("Lobster")){ bank.depositAll(); bank.withdraw("Lobster", 10); bank.close(); } else if(bank.contains("Trout")){ bank.depositAll(); bank.withdraw("Trout", 15); bank.close(); } else{ stop(); } } } break; case WALK_TO_PICKPOCKET: walkTile(PICKPOCKET_POSITION); break; case WALK_TO_BANK: walkTile(PICKPOCKET_POSITION); walkTile(BANK_POSITION); break; case RUN: walkTile(PICKPOCKET_POSITION); walkTile(RUN_POSITION); break; } return random(200,300); } private boolean walkTile(Position p) throws InterruptedException { mouse.move(new MiniMapTileDestination(bot, p), false); sleep(random(150, 250)); mouse.click(false); int failsafe = 0; while (failsafe < 10 && myPlayer().getPosition().distance(p) > 2) { sleep(200); failsafe++; if (myPlayer().isMoving()) failsafe = 0; } if (failsafe == 10) return false; return true; } public void onPaint(Graphics2D g) { } }
×
×
  • Create New...