Buy EpicCarFactory
  • Visit Rebornbuddy
  • Visit Exilebuddy
  • Visit Demonbuddy
  • Visit Buddystore

EquipMe (Auto-equipping plugin)

Discussion in 'Buddy Wing Plugins' started by BobDole, Jan 28, 2015.

  1. BobDole

    BobDole Community Developer

    Joined:
    Jan 9, 2011
    Messages:
    53
    Likes Received:
    2
    Trophy Points:
    8
    EquipMe
    ​An auto-equipping plugin for BuddyWing


    I finally finished a working prototype of my version of an auto-equipping plugin. This is very much a BETA test, as I have not been able to test it for leveling purposes. Please keep an eye on your bot to make sure it's equipping things correctly. I'm not responsible for the bot un-equipping your favorite items and it somehow getting sold to vendors. This plugin should hopefully work wonderfully for leveling characters on the lower end.

    There is a bug in the bot, in which I cannot detect the stats of Prototype(Orange) items, so this plugin will equip any inferior, matching items over them. Without Prototype items, it should work as intended. If you feel brave, you can try turning on Orange item comparisons by editing the incEnhancements variable.

    Things it will do:
    • Equip every item slot when it finds a suitable item in inventory.
    • Compare weights of equipped item vs item in inventory and equip if inventory is better.
    • Configuration Interface to toggle auto-equip, use rep items, and open lockboxes as well as set your own stat weights.

    Things it will not do:
    • Get correct stats of Orange items (BuddyWing issue)
    • Equip companion (Not built into BuddyWing yet, as far as I know)
    • Accept quest rewards based on item comparisons (Maybe in the future?)


    Installation:
    Extract zipped contents into Plugins folder. Should look like {BuddyWing folder}\Plugins\EquipMe\EquipMe.cs

    Feedback is welcome!

    Updates:

    • v0.2
      • Tweaked some settings for when bot can't detect slot for some reason
    • v0.3
      • Added wrists slot to equip list. (Was missing.)
      • Added Smuggler off-hand and Assassin/Shadow focus to equip list.
      • Added Force Power and Tech Power
      • No longer checks inventory when it is decreasing (eg. selling, putting items in cargo hold)
      • Skips any equipped Prototype(orange) items. This can be changed by altering the "skipOrange" variable to false.
    • v0.4
      • Fixed inventory counter
    • v0.5
      • Automatically opens lockboxes as you loot them.
        • This can be disabled by setting openLockboxes to false
      • Automatically uses reputation trophies
        • This can be disabled by setting useRepTrophies to false.
      • I highly recommend removing the default lockbox plugin as this update should completely replace it and opens more lockbox types.
      • If you find any lockboxes/rep items not working. Please post the item name in this thread. Thanks!
    • v0.6
      • Added boolean to disable the auto-equipping part (For opening lockboxes and rep items only). Set autoEquip to false.
      • Tweaked slot type comparisons to see if it's more reliable in comparing equipment.
      • Tweaked equipping items that have two possible slots to compare.
    • v0.7
      • Fixed looting lockboxes that contained items other than credits.
    • v0.8
      • Added relics/ear/implants to equip regardless if BuddyWing thinks it's a Custom(Orange) item.
      • Reduced armor rating weight from 5 to 1. (High armor caused plugin to equip items with wrong stats).
    • v0.9
      • Should now open multiple stacks of reputation tokens.
      • Should now properly compare/equip off-hand weapons.
      • Trying new method of detect reputation items (Non-name based).
    • v0.10
      • Reverted rep item use back to original name-based way.
      • Changed method of using stacks of reputation items.
    • v0.11
      • EquipMe now has a Configuration GUI!
        • Set stat weights on a per-character basis.
        • Toggle auto-equip, use rep items, and open lockboxes
        • Settings are saved upon closing config window, and changes should take effect right away, even when bot is running.
      • Added fix for "Could not get slot type" error. Hopefully it grabs them 100% now.
    • v0.12
      • Tweaked implant/ear/relic code for prototype ignore.
      • Added "Massassi Pendant", "Mark of Cooperation" to rep item list.
      • Increased the sleep timer between rep item use.
    • v0.13
      • Should now equip any item that isn't custom or is fully moddable
      • Now ignores old gear that has already been compared to make it run faster. Should only compare new equipment that gets added to inventory.
    • v0.14
      • Should now no longer check main-hand weapon if the current item is off-hand only.
      • Added "Revanite Dagger" to rep item list.

    SVN: bobdole-buddywing: /trunk/EquipMe



    If you like my work, consider a donation to help keep me motivated: Paypal Donation
     

    Attached Files:

    Last edited: Feb 22, 2015
  2. Cryogenesis

    Cryogenesis Moderator Moderator

    Joined:
    Jul 13, 2010
    Messages:
    2,128
    Likes Received:
    13
    Trophy Points:
    38
    Super! not yet tested thow.
    Anyways, does it handle the window where you have to select if you want it bound, or does the bot click it?
    Also Orange items, are the items which you fill manually with mods. I think the problem lies there, while it has no value in it itself.
    What you can do, and its safe to presume if we are running orange gear, the user is handling the gearing itself (atleast thats my point of view).
    Accept quest rewards may be hard thow, as you need to compare also to companions, equippable mods etc.
    BUT this would be so handy, as profile creators can ditch the choose reward / completequest line.

    For stats weight, i presume 10 is max and 0 is min?
    If so i would build in an option for if you want to build tank / healer gear (not really best way to level thow and healing does not run correctly now, but maybe as a feature request).
     
  3. BobDole

    BobDole Community Developer

    Joined:
    Jan 9, 2011
    Messages:
    53
    Likes Received:
    2
    Trophy Points:
    8
    It does automatically handle the Confirmation window. BuddyWing has a built-in EquipNoConfirm method which automatically accepts that screen.

    Yeah, the orange items usually only have one base stat, which is what I can grab at the moment. You're supposed to be able to do item.GetItemStats(includeEnhancements = true) to grab all of the stats inside the orange item, but the function either grabs the wrong number for stats or quits out with no results. I need to get a GUI going so it would make it easy to select if they want to keep orange items or not. As far as I know, the bot shouldn't sell orange items, so they'll stay in the inventory for now.

    StatWeights are 0 to 10 and are floats, so they can have decimal places if needed. Eventually, I want to try creating a GUI, so users can set their stats on the fly on a character-by-character basis.
     
  4. ExodusPKER

    ExodusPKER New Member

    Joined:
    Oct 25, 2011
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    0
    Thank you so much! This is gold worth!
     
  5. ExodusPKER

    ExodusPKER New Member

    Joined:
    Oct 25, 2011
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    0
    I found something that I think is a bug, When opening a vendor, the plugin starts changing ur equip. I don't know if this is what it is supposed to do, or if it's a bug. But there you have it :)

    Tell me if you need a log (I guess you dont need though)
     
  6. BobDole

    BobDole Community Developer

    Joined:
    Jan 9, 2011
    Messages:
    53
    Likes Received:
    2
    Trophy Points:
    8
    Are you talking about when the bot goes to sell items? What do you mean by starts changing equipment? Is it equipping things that it shouldn't or is it just outputting to the logs that it's comparing stuff?

    I'm guessing that whenever the bot sells items, it's triggering the InventorySlotsChanged event, which causes my plugin to start scanning the inventory. I can probably add a check to see if inventory is decreasing, so then it won't scan for new items.

    Edit: Just uploaded a newer version.
     
    Last edited: Jan 28, 2015
  7. ExodusPKER

    ExodusPKER New Member

    Joined:
    Oct 25, 2011
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    0
    Yes it started changing items just randomly when I talked to a vendor. Thanks for the update!

    Also is it possible to add an "Ignore" function? Cuz as you said it replaces orange items, but maybe if you forced it on a few times (lets say like 3 times) it ignored that gear piece? Atleast until you have fixed the orange gear stuff.

    Thank you so much btw! Great plugin, does the job perfectly!
     
  8. BobDole

    BobDole Community Developer

    Joined:
    Jan 9, 2011
    Messages:
    53
    Likes Received:
    2
    Trophy Points:
    8
    I just went ahead and and made it to ignore prototype (orange) items by default. It's a quick and easy fix for now. It should no longer spam inventory checking when you're at a vendor any more as well. I also realized while leveling my character that I had forgotten to add wrists in my equipment list, so it's added now.
     
  9. ExodusPKER

    ExodusPKER New Member

    Joined:
    Oct 25, 2011
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    0
    For some reason the plugin does nothing for me now with the new update, or is it just updating slower?
     
  10. BobDole

    BobDole Community Developer

    Joined:
    Jan 9, 2011
    Messages:
    53
    Likes Received:
    2
    Trophy Points:
    8
    I tried it just now and it seems to be working for me. It should only check inventory if it has gained an item. If you start up BuddyWing and hit start, you should see the plugin has initialized and an initial inventory check. If those don't show up, then the plugin is not starting for some reason. One time, when both DefaultCombat and my plugin were messing up, I had to restart both SWTOR and BuddyWing (rather than just BuddyWing) before they started working again. Not sure why.

    Edit: Nevermind! I did find a problem with it. I wasn't refreshing the inventory counter, so if you had 40 items in inventory and then sold all of them, the plugin would wait until you had 40 items again before checking. New update posted above.
     
    Last edited: Jan 31, 2015
  11. tdubs96

    tdubs96 Member

    Joined:
    Aug 10, 2013
    Messages:
    87
    Likes Received:
    3
    Trophy Points:
    8
    The main problems ive had with this plugin is that it is making the game lag and also buddywing crash. If these issues are fixed this plugin will be a must use for everyone leveling.
     
  12. MasterLeon79

    MasterLeon79 New Member

    Joined:
    Dec 31, 2014
    Messages:
    213
    Likes Received:
    0
    Trophy Points:
    0
    Heya, can you tell me what version of BW you are using? I'm currently using both (switching from one to the other as soon as I come across a bug).
     
  13. MasterLeon79

    MasterLeon79 New Member

    Joined:
    Dec 31, 2014
    Messages:
    213
    Likes Received:
    0
    Trophy Points:
    0
    I'm so going to test the sh*** out of this :)

    Thanks, hopefully this can replace the older plugin.
     
  14. MasterLeon79

    MasterLeon79 New Member

    Joined:
    Dec 31, 2014
    Messages:
    213
    Likes Received:
    0
    Trophy Points:
    0
    Ok so far I have tested it with kicks profile in balmorra and switching between joes combat and default.
    Its working pretty well actually.

    I had to remove all other plugins though in order to keep the bot up and not crashing.

    But all in all this plugin rockz :)
     
  15. BobDole

    BobDole Community Developer

    Joined:
    Jan 9, 2011
    Messages:
    53
    Likes Received:
    2
    Trophy Points:
    8
    My plugin shouldn't be causing any lag. The code itself only runs once inventory has changed. I haven't experienced any lag aside from the usual lag that I get running the bot without any plugins. Do you happen to use Slicing as your crew ability and loot lockboxes? I'm wondering if that plugin causes some clashing with mine. I should really just incorporate lockbox opening into my plugin. The one that comes shipped with BuddyWing scans inventory every 10 seconds, while mine just scans when an item was received, so it's quite a bit more efficient.

    Thank you both for your feedback!
     
  16. MasterLeon79

    MasterLeon79 New Member

    Joined:
    Dec 31, 2014
    Messages:
    213
    Likes Received:
    0
    Trophy Points:
    0
    I don't use crewabilities and lockboxes well.. sometimes. Did not test it with your plugin though.

    Btw: YES your plugin is more efficient that way.
     
  17. MasterLeon79

    MasterLeon79 New Member

    Joined:
    Dec 31, 2014
    Messages:
    213
    Likes Received:
    0
    Trophy Points:
    0
    A question:

    How did you manage the stats? Did you actually look into the priority stats and caps of the specific class (for each level cap) or does your plugin "only" get the mainstats (no deff, accuracy etc.) and select them when they are higher than the stats that are currently equiped?
     
  18. BobDole

    BobDole Community Developer

    Joined:
    Jan 9, 2011
    Messages:
    53
    Likes Received:
    2
    Trophy Points:
    8
    It's fairly basic at the moment and the weights I use can definitely use some calculations because I just threw some rough numbers in there.

    Weights:

    [TABLE="class: grid, width: 500, align: center"]
    [TR]
    [TD]Stats[/TD]
    [TD]Bounty Hunter
    Trooper[/TD]
    [TD]Agent
    Smuggler[/TD]
    [TD]Inquisitor
    Consular[/TD]
    [TD]Warrior
    Knights[/TD]
    [/TR]
    [TR]
    [TD]Main Stat
    (Aim, Cunning,
    Willpower, Strength)[/TD]
    [TD]10[/TD]
    [TD]10[/TD]
    [TD]10[/TD]
    [TD]10[/TD]
    [/TR]
    [TR]
    [TD]Endurance[/TD]
    [TD]8[/TD]
    [TD]8[/TD]
    [TD]8[/TD]
    [TD]8[/TD]
    [/TR]
    [TR]
    [TD]Force Power, Tech Power[/TD]
    [TD]3[/TD]
    [TD]3[/TD]
    [TD]3[/TD]
    [TD]3[/TD]
    [/TR]
    [TR]
    [TD]DamageMin[/TD]
    [TD]5[/TD]
    [TD]5[/TD]
    [TD]5[/TD]
    [TD]5[/TD]
    [/TR]
    [TR]
    [TD]Armor Rating[/TD]
    [TD]5[/TD]
    [TD]5[/TD]
    [TD]5[/TD]
    [TD]5[/TD]
    [/TR]
    [TR]
    [TD]Critical Chance[/TD]
    [TD]3[/TD]
    [TD]3[/TD]
    [TD]3[/TD]
    [TD]3[/TD]
    [/TR]
    [TR]
    [TD]Critical Damage (Surge)[/TD]
    [TD]3[/TD]
    [TD]3[/TD]
    [TD]3[/TD]
    [TD]3[/TD]
    [/TR]
    [TR]
    [TD]Attack Power (Power)[/TD]
    [TD]3[/TD]
    [TD]3[/TD]
    [TD]3[/TD]
    [TD]3[/TD]
    [/TR]
    [TR]
    [TD]Accuracy[/TD]
    [TD]3[/TD]
    [TD]3[/TD]
    [TD]3[/TD]
    [TD]3[/TD]
    [/TR]
    [/TABLE]


    Everything else is set to 0. It can easily be modified in the code to set defense up, if you want to gear up a tank and whatnot. I eventually want to make a GUI so you can set stats on the fly.
     
  19. MasterLeon79

    MasterLeon79 New Member

    Joined:
    Dec 31, 2014
    Messages:
    213
    Likes Received:
    0
    Trophy Points:
    0
    wow great info. thanks man.

    I will look into the code and make some adjustments.
     
    Last edited: Feb 9, 2015
  20. Cryogenesis

    Cryogenesis Moderator Moderator

    Joined:
    Jul 13, 2010
    Messages:
    2,128
    Likes Received:
    13
    Trophy Points:
    38
    Really looking forward to lockbox and rep tokens implementation.
    I would also make a gui to set it all :)
     

Share This Page