Jump to content

investmentideas

Members
  • Posts

    52
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by investmentideas

  1. this is the log [INFO][Bot #2][03/30 06:00:50 PM]: Checking Health [INFO][Bot #2][03/30 06:00:50 PM]: Checking Health [INFO][Bot #2][03/30 06:00:51 PM]: Checking Health [INFO][Bot #2][03/30 06:00:51 PM]: Checking Health my health was 45% when the script was running, so it is not recognising my health is < 99
  2. public void eat() throws InterruptedException { log("Checking Health"); if (myPlayer().getHealthPercent() < 99){ log("Health is not 100%"); if (getInventory().contains("Shark")){ log("Eating Shark"); getInventory().interact("Eat", "Shark"); new ConditionalSleep(1000, 100) { @Override public boolean condition() throws InterruptedException { return (myPlayer().getHealthPercent() == 100); } }.sleep(); } else { if (getInventory().contains("Varrock teleport")){ log("Teleporting to Varrock"); getInventory().interact("Break", "Varrock teleport"); new ConditionalSleep(1000, 100) { @Override public boolean condition() throws InterruptedException { return (!getCombat().isFighting()); } }.sleep(); } } } }
  3. thanks will try to do an if then using the distance to use the tele manually do you know if the webwalk function has an issue with using the altar teleport?
  4. that isn't very effective if the target area is 5 tiles away, it will teleport and then run instead of just running there. I am guessing the webwalk doesnt consider the mind altar teleport? is there a way to determine : if my distance is > 20 tiles from the target area? I can try to incorporate it into the coding
  5. I have created a webwalk event however it will not use the altar teleport I have in inventory, I have set use of teleports to true, any suggestions? WebWalkEvent walkingevent = new WebWalkEvent(attackZone); PathPreferenceProfile pathPreferenceProfile = new PathPreferenceProfile(); pathPreferenceProfile.setAllowObstacles(true); pathPreferenceProfile.setAllowTeleports(true); pathPreferenceProfile.checkInventoryForItems(true); walkingevent.setEnergyThreshold(1); walkingevent.setPathPreferenceProfile(pathPreferenceProfile); execute(walkingevent); new ConditionalSleep(1000, 500) { @Override public boolean condition() throws InterruptedException { log("We are now in attack zone"); return (attackZone.contains(myPosition())); } }.sleep();
  6. thanks, so i used the config debugger and found that when you are bound, the values were as follows: CONFIG for ID = 24 : Binary = 10001110000001000111100000100000 Hexadecimal = 8e047820 Decimal = -1912309728 Can i just put 24 into the values #? or is that not possible?
  7. is there a teleblock action just like a poison action and if not, why? example: if (getCombat().isPoisoned()){ } or is there one to see if a player is tangled and cannot move?
  8. I understand there is a post on how random mouse and camera movements do not have any affect on bans, but i was wondering what the lines of code were to randomly move camera and mouse? I am looking to test something unrelated to bans
  9. that is so simple and so stupid of me, thank you!
  10. Hi all, i have written something very simple that attempts to skip a target if its not one of them listed in an array. I am trying to build the script but it does not show in the osbot client even when I refresh, is there something wrong with the coding that wont let me test it?? import org.osbot.rs07.api.filter.Filter; import org.osbot.rs07.api.model.Player; import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.script.Script; import org.osbot.rs07.utility.ConditionalSleep; import java.util.Arrays; import java.util.List; public class wildyskiptargets extends Script { private final List<String> attackerBots = Arrays.asList("", "", ""); private final List<String> attackedBots = Arrays.asList("", "", "", ""); @Override public int onLoop() throws InterruptedException { RS2Widget target = getWidgets().singleFilter(90, w -> w != null && w.isVisible() && w.getMessage().equals(attackerBots)); RS2Widget skipTarget = getWidgets().singleFilter(90, w -> w!= null & w.isVisible() && w.getInteractActions().length > 0); if (target != null && target.isVisible()){ log("Target has been assigned"); if (skipTarget.interact("Abandon target")){ log("Skipping Target"); new ConditionalSleep(5000, 1000) { @Override public boolean condition() throws InterruptedException { return getDialogues().isPendingContinuation(); } }.sleep(); } } return 2500; }
  11. I was wondering if anyone had a barebones methods template? Kind of similar to the one I have created below? I am looking at implementing methods now instead of placing everything in a single loop. import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(name = "", logo = "", version = 1.0, author ="", info ="") public class test extends Script { @Override public void onStart() throws InterruptedException { super.onStart(); } @Override public int onLoop() throws InterruptedException { return 0; } @Override public void onExit() throws InterruptedException { super.onExit(); } }
  12. thanks, yeah i wasnt sure of the command that said my player is following them. I did try looking at animation ID but it didnt give one when following, i will try this too, thanks
  13. Need 5 accounts training from level 1 to level 43 strength. Please post price.
  14. I have created a follow player code and am trying to create the conditional sleep for it now. I want it to return if my player is within 1 tile of the person its trying to follow (as I dont know any command that knows if a player is following or not), can anyone help? if (getPlayers().closest(followFilter) != null){ getPlayers().closest(followFilter).interact("Follow"); new ConditionalSleep(2000, 100) { @Override public boolean condition() throws InterruptedException { return //if the player I want to follow is within 1 tile of me; } }.sleep(); }
  15. Hi, I am trying to code this bot to attack a player if it comes within a radius of 5 tiles and the player is not one of the following names ("User1", "User2"). I have this below code but not sure where to go. any advice on how I can check based on player usernames? players.getAll().stream().anyMatch(f -> myPlayer().getArea(5).contains(f));
  16. can this complete waterfall quest with a lvl 3 10hp, or too many real world variables?
  17. I want to buy combat lvl 22 accounts. I do not care if you have done waterfall quest to get them to lvl 22. Please message with how much you sell for each.
  18. Hi, I am making something fun, a script that sells the loot that I pick up from wherever I might be (i.e. wildy). I have created two string "groups" where Item group 5 consists of higher value and Item group 6 consists of lower value. I want the script to sell the items from group 5 only to a certain number, and then want the script to sell Item group 6, the problem is the way I have written it I believe, for example I do not know how to get it to now go to sell ITEMS6. Where would I insert the code? Any help is appreciated and I understand this code might not be efficient, still trying to learn Below is the code; if (getInventory().contains(ITEMS5)){ if (getStore().contains(ITEMS5)){ if (getStore().getAmount(ITEMS5) <= 4){ getStore().sell(String.valueOf(ITEMS5), 1); new ConditionalSleep(250, 125) { @Override public boolean condition() throws InterruptedException { return (getStore().getAmount(ITEMS5) >= 5); } }.sleep(); } } else { if(!getStore().contains(ITEMS5)){ getStore().sell(String.valueOf(ITEMS5), 5); new ConditionalSleep(250, 125) { @Override public boolean condition() throws InterruptedException { return (getStore().getAmount(ITEMS5) >= 5); } }.sleep(); } } }
  19. Thank you, sorry I had not got around to adding the sleep and the return values. I was looking more at the use of the world hop function itself. I have now added both into the script so it isnt running so many thank you!
  20. that did it.. I though I had.. thank you!
  21. I have created a small test script to see how world hop function works. I have created the below script however when it is logged into world 308 and needs to swap to 316 it just picks random worlds, i.e. 504. Any advice? @Override public int onLoop() throws InterruptedException { if (worlds.getCurrentWorld() == 308){ //F2p world // complete action // after action is complete then world hop to the next world in the line worlds.hop(316); //F2p world } else { if (worlds.getCurrentWorld() == 316) { //F2p world // complete action // after action is complete then world hop to the next world in the line worlds.hop(326); //F2p world } } return 0; }
×
×
  • Create New...