claybotter 23 Share Posted January 22, 2019 I'm having trouble with looting unrendered ground item. Any suggestions? Link to comment Share on other sites More sharing options...
Nuclear Nezz 2051 Share Posted January 22, 2019 I'm not sure what you mean by unrendered, like there's a pile of items and yours is not on top? Is your issue that it can't find it at all, or that the mouse is failing to get into the model? Does it show up in the game debugger? Link to comment Share on other sites More sharing options...
Pseudo 179 Share Posted January 22, 2019 Have you tried right clicking the tile in question then interacting via the Menu Action instead? Link to comment Share on other sites More sharing options...
claybotter 23 Author Share Posted January 22, 2019 11 hours ago, Pseudo said: Have you tried right clicking the tile in question then interacting via the Menu Action instead? How do i interact with the actual tile? is that using tilereference? Link to comment Share on other sites More sharing options...
claybotter 23 Author Share Posted January 22, 2019 18 hours ago, Nuclear Nezz said: I'm not sure what you mean by unrendered, like there's a pile of items and yours is not on top? Is your issue that it can't find it at all, or that the mouse is failing to get into the model? Does it show up in the game debugger? If there is a loot of multiple gameobjects, some of the objects won't get rendered so getGameObjects().get(x).take() doesn't work if .isOnScreen() is false. The issue is with failing to get the model i believe as i can still get all the objects in debugger. Link to comment Share on other sites More sharing options...
Pseudo 179 Share Posted January 22, 2019 16 minutes ago, claybotter said: If there is a loot of multiple gameobjects, some of the objects won't get rendered so getGameObjects().get(x).take() doesn't work if .isOnScreen() is false. The issue is with failing to get the model i believe as i can still get all the objects in debugger. Assuming the item isn't 'rendered', but the client still recognises that it does exist (just fails to interact with it). Then grab the object's tile, force-right click the top item/rendered item at said tile, then use Menu class (https://dreambot.org/javadocs/) to click the valid option for your criteria. Just mashed this together (totally untested and theoretical, but hopefully may be of some help): private boolean interactWithGroundItem(String itemName, String action) { GroundItem gi = CONTEXT.getDreambot().getGroundItems().closest(itemName); if (gi != null) { if (!gi.getTile().getPolygon().contains(CONTEXT.getDreambot().getMouse().getPosition())) { if (CONTEXT.getDreambot().getMouse().move(gi.getTile())) { //sleepuntil mouse is at tile/stack } } else { if (!CONTEXT.getDreambot().getClient().getMenu().isMenuVisible()) { if (CONTEXT.getDreambot().getMouse().click(false)) { //sleepUntil menu is open } } else { return CONTEXT.getDreambot().getClient().getMenu().clickAction(action); } } } return false; } Link to comment Share on other sites More sharing options...
Hoodz 161 Share Posted January 22, 2019 GroundItem groundItem; if (groundItem != null && groundItem.exists()) { Tile tile = groundItem.getTile(); if (tile != null && script.getMap().canReach(tile) && script.getMap().isTileOnScreen(tile) && tile.distance() < 6) { if (script.getMouse().move(tile)) { if (script.getClient().getMenu().contains("Take", groundItem)) { if (script.getClient().getMenu().open()) { return script.getClient().getMenu().clickAction("Take", groundItem.getName()); } } } } } //removed constructor (should just be GroundItem param) //removed else statements (should walk/move camera to it) here a little example that will work fine edit: dont look at the spacing, the code tags fucked it up somehow Link to comment Share on other sites More sharing options...
claybotter 23 Author Share Posted January 22, 2019 3 hours ago, Hoodz said: GroundItem groundItem; if (groundItem != null && groundItem.exists()) { Tile tile = groundItem.getTile(); if (tile != null && script.getMap().canReach(tile) && script.getMap().isTileOnScreen(tile) && tile.distance() < 6) { if (script.getMouse().move(tile)) { if (script.getClient().getMenu().contains("Take", groundItem)) { if (script.getClient().getMenu().open()) { return script.getClient().getMenu().clickAction("Take", groundItem.getName()); } } } } } //removed constructor (should just be GroundItem param) //removed else statements (should walk/move camera to it) here a little example that will work fine edit: dont look at the spacing, the code tags fucked it up somehow u Link to comment Share on other sites More sharing options...
Nuclear Nezz 2051 Share Posted January 23, 2019 It is an odd issue though, and shouldn't happen. I've not had that happen on any of my accounts. Do you know how many items it takes to be on the pile before it doesn't work? @claybotter Link to comment Share on other sites More sharing options...
claybotter 23 Author Share Posted January 23, 2019 13 hours ago, Nuclear Nezz said: It is an odd issue though, and shouldn't happen. I've not had that happen on any of my accounts. Do you know how many items it takes to be on the pile before it doesn't work? @claybotter 10/15+ usually. what i've noticed is that if there a large loot pile and you pick most of the items, the items that weren't rendered at the start still won't be rendered even if there only a few items left (after some the rendered items were picked up). what determines how the items are rendered, i haven't been able to figure out Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.