What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Looting request

doomnezau

Member
Joined
Sep 29, 2013
Messages
73
Reaction score
0
I've noticed something suspicious. bot loots EVERYTHING on loot setup. is there any chance to put custom variables for example if a wisdom is droped there is a 50% chance for bot to loot it or not. And this can be customizable to portals or whatsoever. this would make it even MORE random and this should apply to small boxes chest debris barrels stones etc.
 
I prefer to loot everything personally, but in answer to your question...there is a post that discusses picking up a certain number of an item for chance orb purposes. You might search for that and then adapt it to fit your needs.
 
I prefer to loot everything personally, but in answer to your question...there is a post that discusses picking up a certain number of an item for chance orb purposes. You might search for that and then adapt it to fit your needs.


where can i find this.... xD
 
Last edited:
judge, i've searched arround forums but couldn't find.. can you be more specific please?\
 
Doom,

Sadly, I have just spent the better part of an hour searching for it on your behalf, with no luck. The thread I am referencing discusses someone who wants to loot a maximum of 5 siege axes for chancing purposes and someone further on in the thread supplies the code. My thought is that you could use something similar for the scrolls. Basically, if you had less than x, it would grab one. If you had >=x, it would not. Hopefully, someone in the community who recalls the thread I am referencing can provide a helpful link or a snippet of potential code. Sorry.
 
That wouldn't help judge. It's not like, limit the wisdoms/augs/portals etc from loot. is more like a portal just dropped. 70% chance to loot and 30% chance to ignore. this is what i mean. When you play without a bot you will skip some stuff.
 
Ah, but it should indeed help skip by keeping a constant number of id scrolls in your inventory. Let's say you set it to 20, then as long as there are 20, it would not loot them, but if you id items in town and get down to 10, it would loot again until it has 20, thereby alternating between looting and not looting and approximating the randomness you are striving to attain. In terms of the exact request 70%/30%, I have not seen a similar request or a comment related to that in the various bot without getting banned threads; therefore, I was hoping to provide you with a possible solution based on the threads and comments I have seen.
 
Dynamic filters solve all of these issues, but you lose the current Item Editor GUI and have to code in the logic you want. The current static filter system is just that; static, so it doesn't process any type of logic, because it literally can't. All it does is match json based settings to a limited set of actual item properties.

I can post an example CustomItemFilter plugin again if you guys want something to work from, but once again, you have to code/use the API to do what you want, because there's no real alternative. At best, and this is something I'd like to do eventually, Python can be used to dynamically change filters at runtime (which support logic alongside the filters), but that still requires you understand the API to configure them, since the only way to get the logic you want, is to code it in.

So for example, in the attached code, if you look at MyItemEvaluator.cs, you'll see a skeleton implementation of dynamic filters. In the ItemEvaluator.EvaluationType.PickUp section, your custom logic to only pickup a Scroll of Wisdom if you had a certain quantity would be something like this:
Code:
if (type == ItemEvaluator.EvaluationType.PickUp)
            {
                if (cachedItemName == "Scroll of Wisdom")
                {
                    // If we have less than 20 SoW in the inventory, pick it up.
                    if (LokiPoe.InGameState.InventoryPanel.MainInventory.GetTotalItemQuantityByName(cachedItemName) < 20)
                    {
                        return true;
                    }

                    // Otherwise, skip it.
                    return false;
                }
            }

If you wanted a chance to not loot it, the code would be something like this:
Code:
if (cachedItemName == "Scroll of Wisdom")
                {
                    // 20% chance to not pick it up.
                    var roll = Utility.Random.Next(1, 101);

                    Log.InfoFormat("[Match] {0} rolled {1} / {2}.", cachedItemName, roll, 100);

                    if (roll < 20)
                    {
                        return false;
                    }

                    // Loot it
                    return true;
                }

Likewise, as mention in the other threads about stash stuff, if you made your own logic to cache the contents of stash, then your plugin would just check your cached data to know if something should or shouldn't be looted.

I'll include this plugin in the next Beta build as well, so people won't have to keep requesting it. There was a reason why I didn't include it before, but I forgot what it was.
 

Attachments

Back
Top