Jump to content

Iron man looting system


Nbacon

Recommended Posts

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.

 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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