Jump to content

Derogan

Members
  • Posts

    12
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Derogan

  1. I got flagged too quite fast, created a script for buying and alching Bracelet of ethereum, probably quite popular money maker because of the low requirement (55 magic). Anyway, botted for 4 hours on sunday, on monday morning could log in, did some pking on that account for fun, but after some time tried to log in again and couldn't because the account got disabled. I used and tested my own written scripts on that account, could it be because of that?
  2. @Leetkiss thank you for your effort! I am planning to implement the cooking method, will share results
  3. For one thing I can see that the targetTile doesn't update if the chicken or any other monster moves, that's one thing. But still maybe a static sleep method is needed because I one shot the chickens? On that millisecond doesn't match the loop condition, but on the other millisecond matches the killchicken method, how do I solve this? Because if I set the return value in the onLoop higher than 500 ms, talking about 5 - 10 seconds, the onLoop cycle goes trough all functions and kills loots accordingly
  4. Sorry for the last response, here are those areas: private Area[] chickenSpot() { return new Area[]{ new Area(3236, 3231, 3231, 3301), new Area(3231, 3295, 3225, 3301), }; } private Area farmSpot(){ return new Area(3231, 3297, 3236, 3290); } I make those because I want to be sure I kill them in that area to be sure not to be in the building or outside the farm hehe
  5. @Hybris well it is still the same. Sometime it loots, sometime it skips and attacks chicken. Tried modyfing both logics
  6. Maybe the inventory tab is not open when this happens?
  7. @Hybris Thank you, didin't see that semi-colon. I will look in to it. And try to make changes in the if statement. Also I understand the conditional sleep with a return and a time out. As I understand this conditional sleep is executed untill a return matches the condition or timeout passes. But what wuold the interval mean. For example in the post you shared: public static boolean sleepUntil(final BooleanSupplier condition, final int timeout, final int interval) { return new Sleep(condition, timeout, interval).sleep(); }
  8. Hey guys, I'm on a road creating third script, first combat (bit complex kills chickens pick ups raw chicken and then cooks it and goes to goblins, but haven't implemented much, because stuck at killing/looting). After few days managed to kill and loot filtered loot on the position npc was found. But the thing is sometimes after the chicken is dies bot attacks another chicken without going into loot function? I have no idea why. public class Main extends Script { AntiBanThread antiBanThread = new AntiBanThread(); String statusString; private Predicate<GroundItem> itemsToPick = g -> (g.getName().contains("Bones") || g.getName().contains("Feather") || g.getName().contains("Raw chicken")); NPC target; Position targetTile; private List<GroundItem> groundItemsToScan; @Override public int onLoop() throws InterruptedException { //Bury bones. if (inventory.contains("Bones")){ log("Bury bones"); Item bones = getInventory().getItem("Bones"); bones.interact("Bury"); } //Creates a tile where target was attacked and loots there if grounditems exists. if (!myPlayer().isUnderAttack() && myPlayer().getInteracting() == null && targetTile != null) { log("Will Loot"); lootStuff(); } //When out of food goes to kill chickens. if (!inventory.contains("Cooked Chicken") && myPlayer().getHealthPercent() > 60){ chickenKiller(); } return 4_000; } public void chickenKiller() { //I created two areas to where I am able to kill chicken because don't want to enter farm house or outside farmspot and the gate would fuck up everything if (chickenSpot()[0].contains(myPlayer()) || chickenSpot()[1].contains(myPlayer())){ log("Checking Area"); for (Area area : chickenSpot()) { if (area.contains(myPlayer())) { log("Is in farmingSpot will do the following"); if (inventory.contains("Raw chicken") && inventory.getAmount("Raw Chicken") >= random(10,15)) { log("Will cook chicken"); // cooking method } else { log("will kill chicken"); statusString = "Killing Chicken"; killMonster("Chicken"); } } }} else { log("Going to FarmSpot"); statusString = "Going to FarmSpot"; walking.webWalk(farmSpot()); } } private void killMonster(String monsterName) { //find target marks the spot target = getNpcs().closest(monsterName); targetTile = new Position(target.getX(), target.getY(), 0); if (!myPlayer().isUnderAttack() && target != null && !target.isUnderAttack() && !target.isAnimating()) { if (target.interact("Attack")) ; { new ConditionalSleep(3_500) { @Override public boolean condition() throws InterruptedException { return target.getHealthPercent() == 0; } }.sleep(); } } } private void lootStuff() { log("Entering loot stuff"); groundItemsToScan = getGroundItems().get(targetTile.getX(), target.getY()).stream().filter(itemsToPick).collect(Collectors.toList()); for (int i = 0; i < groundItemsToScan.size(); i++) { //static sleep to pick stuff before killing anything. if (groundItemsToScan.get(i).interact("Take")) { try{ sleep(1_000); } catch (InterruptedException e){ System.out.println(e); } } } }
  9. Hello guys, I was wondering if you had personal experience with this. On saturday I tried to remember accounts that I had, and recovered an old account, had to rest my password. Logged in, wrote my account details in notebook and logged out. On monday tried to log in and got the notification that account was locked, recovered it again (password restet) and when I logged in, I appeared in castle wars (was in Edge bank when logging out on Saturday). No items were stolen... Was my account actually stolen and the hacker just went to CW saw the bank worth of 50k and logged out without touching anything or just the password reset triggered Jagex System and they teleported me to CW?
  10. Thank you qmqz, hope this helps for other people learning to code. I actually fixed my code, works well now. For other people here is the code for the fishing method: 1. The fishing method will execute when all conditions fail. 2. When player is in fishing area and is not animating will interact with fishing spot. 3. Will enter conditional sleep cycle, will quit sleep cycle untill returns true (bot is animating) or time outs after 5 seconds. @Override public int onLoop() throws InterruptedException { if(lumbyCastle().contains(myPlayer())){ log("Should execute when dead"); getWalking().webWalk(Banks.LUMBRIDGE_UPPER); } if (lumbyBank().contains(myPlayer()) && !essiantalItems()){ log("Is in lumby bank and needs to bank"); reBank(); } if (lumbyBank().contains(myPlayer()) && getBank().isOpen()){ reBank();} if (lumbyBank().contains(myPlayer()) && essiantalItems()){ log("Going to alkharid bank, have all items"); getWalking().webWalk(Banks.AL_KHARID);} if (shouldBank() || myPlayer().isUnderAttack()) { bank(); } else { fishing(); } return random(2_000, 4_000); } //Fishing method private void fishing() { Walker walker = new Walker(); //creates walker object. I'm using this class for List<Position> creation. if (!fishingArea().contains(myPlayer())) { getWalking().walkPath(walker.getToFishingSpot()); } else { NPC fishingSpot = getNpcs().closest("Fishing spot"); if (!myPlayer().isAnimating() && fishingSpot != null) { if (fishingSpot.interact("Small Net")) ; { new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return myPlayer().isAnimating(); } }.sleep(); } } } }
  11. Well on the first go, when it is not animating it will enter the fish() method, but then later it quits, and just is moving and fishing and looping. Maybe my lack of logic testing is at fault in my code. What I am trying to achieve is "go to fishing spot" -> "fishing till full" -> "go to bank and back everything" Repeat. I have implemented the walking from bank to fishing spot, but stuck at this fishing activity. @Override public int onLoop() throws InterruptedException { Walker walker = new Walker(); log("Looping again"); log("Walking to fishing spot"); getWalking().walkPath(walker.getToFishingSpot()); 3. Starts Walking and Repeats itself... log("Fishing shrimps"); if (!myPlayer().isAnimating()) { //1. First it is not animating so it matches the condition. fishing(); } log("Exiting"); return 2_000; } public void fishing (){ //2. Enters the Method but quits instatly. NPC fishingSpot = getNpcs().closest("Fishing spot"); if (fishingSpot != null) { fishingSpot.interact("Small Net"); Sleep.sleepUntil(()-> myPlayer().isAnimating(), 16_000); log("Exiting fishing() method."); } }
  12. Hello guys, Trying to script for the first time, and I have encountered a problem. What I mean is bot spam clicks on the onLoop() return time, untill it finally understands that it is in action. @Override public int onLoop() throws InterruptedException { log("Fishing shrimps"); fishing(); return 1_000; // Always acts on on this return when the fishing spot is pressed, presses few times more (even tho the player starts his actions } public void fishing (){ NPC fishingSpot = getNpcs().closest("Fishing spot"); if (fishingSpot != null && fishingSpot.interact("Small Net")) { Sleep.sleepUntil(()-> !myPlayer().isAnimating(), 8_000); //If I understand correctly, the onLoop is suspended for untill the condition is met, or 8 seconds has passed? } } How should I implement such idea: Bot interacts with fishing spot (doesn't click more than one time), is fishing untill it is not animating and Idles. Does it mean I should increase the return integer for like 5 seconds and timeout for 20? How should I implement my idea more logically. And could you please answer my comment that I left in code snippet?
×
×
  • Create New...