Jump to content

lisabe96

Members
  • Posts

    821
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by lisabe96

  1. Thanks, will use. Better avoid possible problems
  2. It's used on anything not just an xbox, it just originates from xbox360.
  3. Got it working It doesn't look good when the camera is tilted as it draws the screen and not the game world obviously. But it works. private List<Position> tiles = new ArrayList<>(); @Override public void mouseDragged(MouseEvent e) { handle(e); } @Override public void mouseClicked(MouseEvent e) { handle(e); } private void handle(MouseEvent e) { log(e.getX() + ", " + e.getY()); Position pos = getPosition(e.getPoint()); if (exists(pos)) { tiles.remove(pos); return; } tiles.add(pos); } @Override public void onPaint(Graphics2D graphics) { Graphics2D g = (Graphics2D) graphics; g.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF)); g.setColor(Color.GREEN); if (!tiles.isEmpty()) { for (Position t : tiles) { if (t.isVisible(getBot())) { g.draw(t.getPolygon(getBot()).getBounds()); } } } } private Position getPosition(Point mousePosition) { for(int x = 0; x < 104; x++) { for(int y = 0; y < 104; y++) { Position pos = new Position(getMap().getBaseX()+x, getMap().getBaseY()+y, getMap().getPlane()); if(pos.isVisible(getBot()) && pos.getPolygon(getBot()).contains(mousePosition)) { return pos; } } } return null; } private boolean exists(Position pos) { if (!tiles.isEmpty()) { for (Position tile : tiles) { if (tile.equals(pos)) { return true; } } } return false; }
  4. Thanks! This should be enough information to get it working
  5. I hope to find something more efficient, but I'll give it a try if I can't figure out anything else This would return java.awt.geom.Area
  6. That's exactly what I need but I need it in code. Maybe this example will be more clear: void mouseMoved(MouseEvent e) { Tile tile = new Tile(mouseX, mouseY); log(tile.getPosition()); } This obvious doesn't work, I'm after how I would get this working within osbot
  7. I personally find the first example a lot cleaner and easier on the eyes.
  8. How can I with the API determine what Position I'm hovering at. The same as when you use the entity debug option that shows which tile coordinates your hovering on. It's probably something simple but I haven't found anything useful in the API.
  9. for (Item item : script.getInventory().getItems()) { if (item != null && item.getName().startsWith("Amulet of glory")) { return item; } } I win for readable oldschool code
  10. Since yesterday the "notifications dropdown" doesn't seem to work anymore for me. This is what I see ^ The number displaying the amount of notifications will be gone after clicking but I wasn't actually able to see them because it just displays this small gray border. OS: Windows 7 x64 Browser: Opera 35.0 EDIT: Excuse me, I just saw there is already a topic running on this issue. http://osbot.org/forum/topic/92959-notifications-bug/
  11. Thanks for noticing. However as it isn't on the SDN it's not urgent. I am in the process of reworking most of my scripts currently, so eventually this one and all my other ones will be updated. Just give me a little
  12. At least she isn't showing off her boobs like most girl streamers
  13. As mentioned before, it's a webwalking issue. Hope it will be fixed with the next API update.
  14. Even though my gfx skills are below zero, I ain't
  15. Plot twist, in the end you'll die after all. Seriously, I did an account giveaway like a week ago without troubles? I wouldn't know why this aint allowed in the first place
×
×
  • Create New...