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

My Plugin Idea - Need help developing it, I've never developed anything on C Sharp

tozededao

Community Developer
Joined
Jan 15, 2010
Messages
1,225
Reaction score
5
I've always had the curiosity to fully develop a EB Plugin but since I've never developed anything using CSharp I'm kinda lost on how to start it. My idea is to develop a plugin that vendors one full set of unidentified 60+ Itemlevel for 2 Chaos. If any developer like this idea and actually wants to use it I have no problem at all with it.


If items don't have a unique ID.


  • Basically I would have an integer variable for each slot, Helm, Chest, Ring, 2-Handed Weapon(Including bows, leaving 1handed weapons out of this), and this would be the count of how many items of that type we have.
  • At the beginning of your botting session it would retrieve Stash and Inventory for all the items, and if they were Rare and 60+ Itemlevel it would increment our counters based on what item slot it was.
  • During the bot session each item that dropped would be verified aswell in terms of itemlevel and rarity and if it match our needs, Rare and Itemlevel 60+, we would increment the counters aswell.
  • Each time we were on town it would verify if we had at least 2 rings and 1 of each remaining type, it would retrieve them from stash into inventory and vendor them all at once for 2 chaos.

If items have a unique ID.


  • Basically having an arraylist of unique ID's for each slot, excluding 1handed weapons.
  • At the beginning of your botting session it would retrieve Stash and Inventory for all the items, and if they were Rare and 60+ Itemlevel it would add the Unique ID to the related type.
  • During the bot session each item that dropped would be verified aswell in terms of itemlevel and rarity and if it match our needs, Rare and Itemlevel 60+, we would add the unique ID to the related type
  • Each time we were on town it would see the size of the arraylists. If the ring's arraylist had a size of at least 2 and the remaining a size of one, it would pop 2 Unique ID's from the ring's array list and 1 of the remaining. Retrieve those ID's from the Stash into inventory and vendor them all at once.



I've taken a look on flexus ItemLog in order to retrieve info on the items that drop but how can I do a stash verification?
How can I make it so it retrieves items from Stash into Inventory, Open the Sell window and put them there?
 
I think for now, you'd not make this a plugin, but rather a bot that you just run instead of grindbot.

Plugins have no way to override the bot right now, and since the bot now uses coroutines, the interaction between Treesharp and Coroutines is done via a small wrapper that doesn't have the hooks for taking over the bot like the old version had.

Items don't have a unique id, so you have to go through the stash each time to find what you need. In order to do that though, you have to actually obtain all stash tab's contents first (or up to the point where you find what you are looking for). It's much easier just loading all the stash tabs first before processing though.

Other than that, the idea is sound and it's possible, but it's quite a bit of code. You'll find most of the work is the logic of actually doing each part of the task. For example, going to stash, opening it, finding items you need, talking to the vendor, etc... The API is all there for it, but it still requires a bunch of utility code due to things like desync and error checking to make sure you're not going to do things you don't want. There are random things that happen when working with the inventory, so you want to make sure everything is as it should be rather than just assuming things are correct.

I wrote a ChanceOrb bot for the old version as I was learning Treesharp and testing out different aspects of the API. I think a lot of the logic would be simpler and less code using coroutines now, but there's no time to play with that stuff right now or update it. So Api wise, it's there, but you'll have to work out how to use it until we get guides and stuff done, which isn't a big priority atm with the other issues to fix.

My advice for you would be to break down the task into small parts, and start working on the code to get each step done. The API has everything you need, but it's going to take some time to learn it and work out what you need to do for various tasks. Ideally, you'd be reusing exposed utility functions from the bot, which right now are in Registry, but, EB isn't in the position to really provide reusable logic to developers yet. For that to work, it needs to be written with code sharing in mind, which not all of the current code we have was. In the future though, with next rewrite, it will be.
 
Basically I had in mind a couple of features that should be present on such bot specially for stash handling and that's where the Chaos Plugin would fit my other ideas are basically just vendor recipies with stuff we have on stash:



  • Whenever we have a combination of quality from flasks that is 40+, we take them and vendor for a Glassblower Bauble
  • Whenever we have a certain quantity of Alterations(User Defined), we trade them at vendor for Jeweler's Orbs
  • Whenever we have a certain quantity of Jeweler's Orbs(User Defined), we trade them at vendor for Orbs of Fusing
  • Whenever we have 3 of the same Map(with User Defined restrictions to levels) we vendor them for a +1 Map.

I think these are really good long-term ideas for the bot and extremely needed for botting sessions for people with 4 stash tabs.
 
Back
Top