Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

  • Feedback


Community Reputation

1 Neutral

About amillieamillie

  • Rank
    New Botter

Recent Profile Visitors

597 profile views
  1. I tried that but it only seems to detect keystrokes that are input by a function such at Keyboard.typeKeys(), and it does not detect input manually input myself The reason i need this is to keybind commands id like to send to my bots such as auto dump etc
  2. Is there a way to detect user input keyboard events?
  3. Im working on an in game world hopper, thought id post it here. Please roast my code and offer suggestions/improvements. import java.awt.Rectangle; import org.tribot.api.General; import org.tribot.api.Timing; import org.tribot.api.input.Mouse; import org.tribot.api.types.generic.Condition; import org.tribot.api2007.GameTab; import org.tribot.api2007.Interfaces; import org.tribot.api2007.NPCChat; import org.tribot.api2007.WorldHopper; import org.tribot.api2007.types.RSInterfaceChild; import org.tribot.api2007.types.RSInterfaceComponent; public class AMWorldHopper { private static Rectangle hopperBounds = new Rectangle(550, 250, 170, 170); private static int TOP_Y_WORLD_VISIBLE = 240; private static int BOTTOM_Y_WORLD_VISIBLE = 400; private static int WORLD_HOPPER_PARENT_ID = 69; private static int WORLD_HOPPER_CHILD_ID = 7; private static int WORLD_SWITCHER_BUTTON_PARENT_ID = 182; private static int WORLD_SWITCHER_BUTTON_CHILD_ID = 5; public static boolean hopWorlds(int world) { world = world > 300 ? world - 300 : world; if(WorldHopper.getWorld() == world) { return true; } if(NPCChat.getClickContinueInterface() != null) { NPCChat.clickContinue(true); General.sleep(800, 1400); } if(openWorldHopper()) { RSInterfaceComponent worldButton = findWorld(world); if(scrollToWorld(worldButton)) { if(worldButton.click()) { return waitForHop(world); } } } return false; } private static boolean waitForHop(final int world) { return Timing.waitCondition(new Condition() { @Override public boolean active() { General.sleep(100); if(NPCChat.getOptions() != null) { NPCChat.selectOption("Yes. In future, only warn about dangerous worlds.", true); } return WorldHopper.getWorld() == world; } }, 15000); } private static RSInterfaceComponent findWorld(int world) { RSInterfaceChild worldHopper = Interfaces.get(WORLD_HOPPER_PARENT_ID, WORLD_HOPPER_CHILD_ID); if(worldHopper != null) { RSInterfaceComponent[] worlds = worldHopper.getChildren(); if(worlds != null) { for(int i=2;i<worlds.length;i+=6) { if(worlds[i] != null && worlds[i].getText() != null && worlds[i].getText().equals(Integer.toString(world))) { return worlds[i-2]; } } } } return null; } private static boolean scrollToWorld(RSInterfaceComponent worldComponent) { long started = System.currentTimeMillis(); while(!isWorldVisible(worldComponent) && System.currentTimeMillis() - started < 15000) { if(!hopperBounds.contains(Mouse.getPos())) { Mouse.moveBox(hopperBounds); General.sleep(600, 1000); } Mouse.scroll(worldComponent.getAbsolutePosition().getY() < TOP_Y_WORLD_VISIBLE ? true: false, distanceFromBeingVisible(worldComponent) >= 200 ? 4 : 3); General.sleep(300, 500); } return isWorldVisible(worldComponent); } private static int distanceFromBeingVisible(RSInterfaceComponent worldComponent) { if(worldComponent.getAbsolutePosition().getY() < TOP_Y_WORLD_VISIBLE) { return (int) (TOP_Y_WORLD_VISIBLE - worldComponent.getAbsolutePosition().getY()); } else { return (int) (worldComponent.getAbsolutePosition().getY() - BOTTOM_Y_WORLD_VISIBLE); } } private static boolean isWorldVisible(RSInterfaceComponent worldComponent) { return worldComponent.getAbsolutePosition().getY() <= BOTTOM_Y_WORLD_VISIBLE && worldComponent.getAbsolutePosition().getY() >= TOP_Y_WORLD_VISIBLE; } private static boolean openWorldHopper() { if(GameTab.getOpen() != GameTab.TABS.LOGOUT) { if(GameTab.open(GameTab.TABS.LOGOUT)) { General.sleep(800, 1200); } } if(GameTab.getOpen() == GameTab.TABS.LOGOUT && !Interfaces.isInterfaceValid(69)) { RSInterfaceChild worldSwitcherButton = Interfaces.get(WORLD_SWITCHER_BUTTON_PARENT_ID, WORLD_SWITCHER_BUTTON_CHILD_ID); if(worldSwitcherButton != null) { if(worldSwitcherButton.click() && Timing.waitCondition(new Condition() { @Override public boolean active() { return Interfaces.isInterfaceValid(WORLD_HOPPER_PARENT_ID); } }, 5000)) { General.sleep(600, 800); } } } return GameTab.getOpen() == GameTab.TABS.LOGOUT && Interfaces.isInterfaceValid(WORLD_HOPPER_PARENT_ID); } }
  4. @iFluffee actually that works thank you very much. i had tried that interface before, but the issue as it turns out is that the interface is always non-null. checking .isClickable() (edit, isClickable works not isHidden) though accurately returns whether it is on screen.
  5. guys i even wrote a script that checks all interface children for changes, still cant seem to find the corresponding interface, if anyone knows what the values are it would be much appreciated
  6. @Encoded thank you, i checked a bunch of them but ill keep looking
  7. @Encoded im not sure if im missing something, updating the interface explorer doesnt seem to change the listing whatsoever.
  8. So im writing a tutorial island script snd keep facing the problem that you get a "Click to continue" message. The message doesnt seem to have an associated interface via the interface explorer and it isnt the same message as is solvable by NPCChat.clickToContinue(). Has anyone faced this before or know how to detect it so that i may close it?
  9. That is what I am thinking. Thanks!
  10. Thank you for the reply, if it's not supported by the api/client i suppose i'll have to make do with just the account name, as they are unique anyway.
  11. I'm writing a bot manager, and part of the info it logs is the account email.
  12. I've scoured the doc api twice and can't seem to find a method that returns the currently active account's email.
  13. good luck, was woodcutting 1424760844059-clicked_interfaces.dat 1424760844059-clicked_minimap_points.dat 1424760844059-clicked_points.dat 1424760844059-drop_item_delay.dat 1424760844059-login_times.dat 1424760844059-logout_times.dat 1424760844059-minimap_point_steps.dat 1424760844059-reaction_times.dat
  14. here is my files in a zipped folder for easy download amillieamillie_xmouse_data.zip
  15. please grant me access. i support what you are doing and if you need data in the future i would be more than happy to help Xmouse_data-192752-1424747426906.dat Xmouse_data-192752-1426004635729.dat Xmouse_data-192752-1426005570395.dat Xmouse_data-192752-1426007105020.dat Xmouse_data-192752-1426009704087.dat Xmouse_data-192752-1426011848782.dat Xmouse_data-192752-1426012432081.dat Xmouse_data-192752-1426013226610.dat Xmouse_data-192752-1426013845271.dat Xmouse_data-192752-1426014729263.dat Xmouse_data-192752-1426015409093.dat Xmouse_data-192752-1426016028035.dat Xmouse_data-192752-1426016746039.dat Xmouse_data-192752-1426017891215.dat Xmouse_data-192752-1426018621164.dat Xmouse_data-192752-1426020123461.dat Xmouse_data-192752-1426020799611.dat Xmouse_data-192752-1426021499902.dat Xmouse_data-192752-1426022685415.dat Xmouse_data-192752-1426023367981.dat Xmouse_data-192752-1426024188018.dat Xmouse_data-192752-1426024692299.dat Xmouse_data-192752-1426025357935.dat
  • Create New...