Nbacon Posted August 13, 2020 Share Posted August 13, 2020 All ideas welcomed. How to make an Ironman friendly combat/looting bot? My current approach is to make an array of all objects on the ground before a monster dies [ update it durring the fight] and then waiting upwards of 2 secounds for spawned dropes and try all new Items then add to Ignore list. But If someone has a better Idea Ill try it. Quote Link to comment Share on other sites More sharing options...
Camaro Posted August 13, 2020 Share Posted August 13, 2020 Just loot grounditems that are the same position as the monster (despawned entity objects keep their position, will be the same as the loot position). If you get the message that you cant pick it up, add that specific grounditem to a list. When looking for items to loot, filter out all items that are contained in the list. Periodically remove all items from the list that no longer exist to keep it from getting too large. Ive never botted an ironman, but this would be my first approach. 2 Quote Link to comment Share on other sites More sharing options...
Nbacon Posted August 14, 2020 Author Share Posted August 14, 2020 (edited) Thanks, Your approach works alot better then mine. Your idea has a lot more missed loots 1 in 20 ish but fuck ton less of false positives (close to 0) for thing that could be the iron's. 3 hours ago, Camaro said: despawned entity objects keep their position, will be the same as the loot position Thank for say this because I was afraid for large npc it would not be the case. if (myPlayer().isInteracting(myPlayer().interacting)&& myPlayer().interacting is NPC&& currentNPC != myPlayer().interacting as NPC? ) { currentNPC = myPlayer().interacting as NPC? } if (currentNPC != null && currentNPC!!.exists()) { badItems = getGroundItems().get(currentNPC!!.x, currentNPC!!.y).toHashSet() }else if (currentNPC != null && !currentNPC!!.exists()) { val c = FilterItem(*listOFLOOT) val f = getGroundItems().get(currentNPC!!.x, currentNPC!!.y).filter { s -> !badItems.contains(s) && c.check(s) } if (f.isNotEmpty()) { execute(object : Event() { var stack = Stack<GroundItem>() @Throws(InterruptedException::class) override fun onStart() { stack.addAll(f) if (!getMap().canReach(stack.peek().position)) { setFinished() } } @Throws(InterruptedException::class) override fun execute(): Int { if (stack.isEmpty()) { setFinished() } else { stack.pop().interact("Take") } return MethodProvider.random(1200, 3000) } @Throws(InterruptedException::class) override fun onEnd() { currentNPC = null badItems = HashSet<GroundItem>() } }) } } Edited August 14, 2020 by Nbacon Quote Link to comment Share on other sites More sharing options...