Pelli 1 Posted September 17, 2018 public void marksPicker() { GroundItem mark = getGroundItems().closest("Mark of grace"); if ( mark != null) { if (getLocalPlayer().distance(mark) < 7) { mark.interact("Take"); sleepUntil(()-> getGroundItems().closest("Mark of grace")==null,3789); } else { log("No marks here/ marks are to far!"); } } } The script just keeps running past the mark of grace, it does know that the item is nearby (because there's no log message). The script doesnt pause at all to pick it up, so i'm guessing that: ()-> getGroundItems().closest("Mark of grace")==null somehow returns true even though the mark of grace is still there. Are there any known issues with getGroundItems( )? Cheers
Nuclear Nezz 2094 Posted September 17, 2018 Some suggestions to make possible debugging easier. 1. make your method a boolean, and return true if the mark is picked up (!mark.exists, or inventory.count("Mark of grace") is higher than before attempt) 2. use an if statement on the if(mark.take) before your sleep until, you don't want to be stuck sleeping for 3.7 seconds if it fails to interact. Otherwise, there's no known issues with ground items that I'm aware of. If you're doing marksPicker(); walk next obstacle; without actually checking or re-trying to pick it up, then yeah you'll likely not get many of them.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.