Titan Rs Posted May 14, 2020 Share Posted May 14, 2020 public static Position pos = new Position(3018, 5013, 0); public void grabWine() { if ((System.currentTimeMillis() - wineTimer) > 3000) { if (getMagic().isSpellSelected()) { GroundItem wine = getGroundItems().closest("Wine of zamorak"); if (wine != null && wine.isVisible()) { winePosition = wine.getPosition(); if (wine.interact("Cast")) { wineTimer = System.currentTimeMillis(); amountOfWines++; } } else if (winePosition.isVisible(getBot())) { Rectangle rect = pos.getPolygon(getBot()).getBounds(); getMouse().move(rect.x + (rect.width / 2), rect.y); } else { log("Moving camera to wine"); getCamera().toEntity(wine); } } else { log("Spell not selected, Select telegrab"); getMagic().castSpell(Spells.NormalSpells.TELEKINETIC_GRAB); } } else { if (getMagic().isSpellSelected()) { GroundItem wine = getGroundItems().closest("Wine of zamorak"); if (wine != null && wine.isVisible()) { winePosition = wine.getPosition(); log("Wine is visible and spell selected"); } else if (winePosition.isVisible(getBot())) { Rectangle rect = pos.getPolygon(getBot()).getBounds(); getMouse().move(rect.x + (rect.width / 2), rect.y); } else { log("Moving camera to wine"); getCamera().toEntity(wine); } } else if (!getMagic().isSpellSelected()) { log("Spell not selected, Select telegrab"); getMagic().castSpell(Spells.NormalSpells.TELEKINETIC_GRAB); } } } Hi guys, Trying to hover over a table item. However, with the code above hovers on the tile below the table as the wine is considered a ground item. Any way around this? Thanks for any help Quote Link to comment Share on other sites More sharing options...
Camaro Posted May 14, 2020 Share Posted May 14, 2020 I actually hover over the position above it in mine 1 Quote Link to comment Share on other sites More sharing options...
TheMcPker Posted May 14, 2020 Share Posted May 14, 2020 after you interact with the wine (cast) you could probaly get your mouse position and save that (this is a realllllly bad way of doing things though so only use that option if nothing else works for you) 1 Quote Link to comment Share on other sites More sharing options...
Titan Rs Posted May 14, 2020 Author Share Posted May 14, 2020 27 minutes ago, Camaro said: I actually hover over the position above it in mine How do you go about doing that lol 21 minutes ago, TheMcPker said: after you interact with the wine (cast) you could probaly get your mouse position and save that (this is a realllllly bad way of doing things though so only use that option if nothing else works for you) Interesting idea, may try that if cant think of anything else, Thanks! Quote Link to comment Share on other sites More sharing options...
TheMcPker Posted May 14, 2020 Share Posted May 14, 2020 21 minutes ago, Titan Rs said: How do you go about doing that lol you could probaly get the position of the mouse as Point (this would be inacurate if the screen rotates since it takes the exact mouse position ) 1 Quote Link to comment Share on other sites More sharing options...
Camaro Posted May 14, 2020 Share Posted May 14, 2020 (edited) 1 hour ago, Titan Rs said: How do you go about doing that lol say the wine is on position(x, y, z) hover over position(x, y + 1, z) and why did you post this in the market section lol Edited May 14, 2020 by Camaro Quote Link to comment Share on other sites More sharing options...
Titan Rs Posted May 14, 2020 Author Share Posted May 14, 2020 10 hours ago, TheMcPker said: you could probaly get the position of the mouse as Point (this would be inacurate if the screen rotates since it takes the exact mouse position ) I did this in the end and works well, Thanks! Quote Link to comment Share on other sites More sharing options...