Jump to content

Alakazizam

Members
  • Posts

    180
  • Joined

  • Last visited

  • Feedback

    0%

1 Follower

Profile Information

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Alakazizam's Achievements

Steel Poster

Steel Poster (4/10)

31

Reputation

  1. Started playing with making a UI and I'm looking through this tutorial I've declared the image at the top with BufferedImage background; The error comes from when I try to read the image and set the variable onStart with try{ background = ImageIO.read(AKsSlayer.class.getResourceAsStream("/resources/background.png")); } catch(IOException e){ log(e); } It stops script and gives me a 'at javax.imageio.ImageIO.read(Unknown Source)' error in the log. The directory is there and so is the image, it is named correctly. Not sure if I'm supposed to do more than just drag and drop it in the folder?
  2. Depends on the script you're running. I've found the processor to always be the bottleneck. You don't really need much gpu power at all. Expect bans until you find out what you can and can't get away with.
  3. How would I go about using actions from a secondary interaction menu? Like the combat bracelet that has Rub > Monastery
  4. I have a 50$ steam card I'd like to trade for some GP if anyone is interested. You trade GP first unless trusted on site, in which case I'd provide code first.
  5. I thought I got it sorted out with the typeContinualKey function but cant figure out how to get it holding the key while doing my loop
  6. I must not be understanding something then. Should it not be spamming '1' in the chat (without entering) if the script is holding down the 1 key? I'm pretty much just trying to tick cook karambwans by holding down 1 for when the cook option comes up and then clicking the raw karambwan onto the fire repeatedly until the inventory is cooked and then release 1.
  7. Pretty much just trying to hold down 'Num1' on the keyboard while I run a for loop and release after. keyboard.pressKey(97); if(tabs.isOpen(Tab.INVENTORY)) { int myNum = (int) inventory.getAmount(Item); for (int i = 0; i < myNum; i++) { mouse.click(random(690, 720), random(430, 460), false); objects.closest(Object).interact(); } keyboard.releaseKey(97); } else { tabs.open(Tab.INVENTORY); } I use this in another script to drop items with shift and it works keyboard.pressKey(16); for (int i = 0; i < myPattern.length; i++) { getMouse().click(getInventory().getMouseDestination(myPattern[i])); } keyboard.releaseKey(16);
  8. So I've tested keyboard.pressKey(16) (shift key) and it works fine but if I try keyboard.pressKey(97) (Num 1) or any other character for that matter, it does not seem to go through.
  9. Thanks. Yeah I got it figured out how to activate it, but I played with changing up a lot of the variables and hardly noticed any sort of difference in the speed of the mouse and nothing that really helped my actions per hour.
  10. So I think I understand how to create different profiles, but I'm not seeing how to set those profiles to be used. Honestly not even sure I'm looking at the right thing for what I'm trying to do. I'm wanting to speed up mouse movements (by roughly 3 times default speed) while doing the inventory processing part of the script and then slow it back down while doing the banking part of the script.
  11. I'm sure I'm just not doing something right. Pretty much just trying to drag a knife to the last inventory slot. public int onLoop() throws InterruptedException { if(inventory.contains("Knife")){ if(inventory.getSlot("Knife") == inventory.getSlot(27)){ log("We're good."); } else { MoveKnife(); } } return 602; } void MoveKnife() { boolean isInPosition = false; mouse.continualClick(inventory.getMouseDestination(inventory.getSlot("Knife")), new Condition() { @Override public boolean evaluate() { return isInPosition == true; } }); mouse.move(inventory.getMouseDestination(27)); isInPosition = true; } I get a compile error 'local variables referenced from an inner class must be final or effectively final' when building because I'm trying to change isInPosition after moving the mouse. But even if I remove that, all that is happening is the mouse is going click down on the knife and is not moving at all after that. Any help would be appreciated.
  12. So I have a couple things I did on my scripts that seemed to do well for me. I'm on a bit of a hiatus, just kind of lurking the forums. I had one function I'd run after every action to check if it should be taking a break or not and if it's a quick break (5-35 sec) or a long break (45 sec - 5 min). It takes an input and the higher the int the less likely the break will trigger. So use lower numbers for tasks that click less like fishing, and higher numbers for click intensive stuff like thieving. public int breakRoll(int BreakChance){ int restChance = random(1, BreakChance); int longRestChance = random(1,BreakChance / 2); int longRest = random(45_000, 300_000); int shortRest = random(5_000, 30_000); if(restChance == BreakChance){ if(longRestChance == BreakChance / 2){ log("Long resting for " + longRest); return longRest; } else { log("Short resting for " + shortRest); return shortRest; } } else { return 1_500; } } Also, if I'm dropping an inventory of stuff I try not to use the drop functions out of the API, I use a function that drops in random patterns. This one will drop a whole inventory, but you can remove inventory slots from the dropPattern arrays and those inventory slots will not be dropped, but I've only ever used this for dropping stuff from thieving stalls and cleaning herbs (requires removing a couple lines of code) void dropInventory() throws InterruptedException { if(tabs.getOpen().equals(Tab.INVENTORY)) { int[] dropPattern1 = {0, 1, 2, 3, 7, 6, 5, 4, 8, 9, 10, 11, 15, 14, 13, 12, 16, 17, 18, 19, 23, 22, 21, 20, 24, 25, 26, 27}; int[] dropPattern2 = {0, 4, 8, 12, 16, 20, 24, 25, 21, 17, 13, 9, 5, 1, 2, 6, 10, 14, 18, 22, 26, 27, 23, 19, 15, 11, 7, 3}; int[] dropPattern3 = {0, 4, 8, 12, 16, 20, 24, 25, 26, 27, 23, 19, 15, 11, 7, 3, 2, 1, 5, 9, 13, 17, 21, 22, 18, 14, 10, 6}; int[] dropPattern4 = {0, 1, 2, 3, 7, 11, 15, 19, 23, 27, 26, 25, 24, 20, 16, 12, 8, 4, 5, 6, 10, 14, 18, 22, 21, 17, 13, 9}; int[] myPattern = {0}; switch (random(1, 4)) { case 1: log("pattern 1"); myPattern = dropPattern1; break; case 2: log("pattern 2"); myPattern = dropPattern2; break; case 3: log("pattern 3"); myPattern = dropPattern3; break; case 4: log("pattern 4"); myPattern = dropPattern4; break; } if (myPattern.length > 1) { keyboard.pressKey(16); for (int i = 0; i < myPattern.length; i++) { getMouse().click(getInventory().getMouseDestination(myPattern[i])); } keyboard.releaseKey(16); sleep(1_000); } else { log("Unable to set pattern"); } } else { tabs.open(Tab.INVENTORY); } } To change it up from dropping items to clicking items for things like cleaning herbs, remove the 2 lines that say keyboard.pressKey(16); keyboard.releaseKey(16); Key(16) is shift.
×
×
  • Create New...