Jump to content

Iron man looting system


Recommended Posts

Posted

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.

 

Posted

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.

  • Like 2
Posted (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 by Nbacon

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...