• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [Plugin] RelicManager

    Discussion in 'Buddy Wing Plugins' started by Neo93, May 10, 2012.

    1. Neo93

      Neo93 Member

      Joined:
      Aug 30, 2011
      Messages:
      342
      Likes Received:
      4
      Trophy Points:
      18
      [Plugin] RelicManager (Relic/Stim/Medpac)

      RelicManager


      You'll always find the latest Version here.
      (Take a look here, if you don't know how to use SVN)



      What is RelicManager?
      RelicManager uses automatically Relicts, Adrenals, Medipacks and Stims.
      Currently only lvl 50 reusable stims, adrenals, medpacs and offensive Relicts are supported.



      How can you help to improve RelicManager?

      Write post which includes improvement you'd like to have and which issues you found
      .

       

      Attached Files:

      Last edited: Jul 22, 2012
    2. Neo93

      Neo93 Member

      Joined:
      Aug 30, 2011
      Messages:
      342
      Likes Received:
      4
      Trophy Points:
      18
      #Changed name due to many ppl didn't know how good this plugin is, especially at lvl 50.
       
    3. Xanathos

      Xanathos Active Member

      Joined:
      Jul 25, 2010
      Messages:
      1,030
      Likes Received:
      6
      Trophy Points:
      38
      This will actually do exactly what I wanted. I just need to edit the medpac and stim names, but otherwise this rocks.
       
    4. Xanathos

      Xanathos Active Member

      Joined:
      Jul 25, 2010
      Messages:
      1,030
      Likes Received:
      6
      Trophy Points:
      38
      So it is working great to use my relics and keep my stim up... But for some reason it's not popping the MedPac. I upped the MedPac health to be 45% and made sure to change the medpac to be the same name as what I have. No dice.

      I'm messing around with a few things to see if I can figure out why.
       
    5. Xanathos

      Xanathos Active Member

      Joined:
      Jul 25, 2010
      Messages:
      1,030
      Likes Received:
      6
      Trophy Points:
      38
      For whatever reason something didn't like the Medpacs to be defined in the "foreach" as a straight up item.Name("blah bleh")... I changed it to item.Name.Contains("blah") && item.Name.Contains("bleh") and it started working.
       
    6. Xanathos

      Xanathos Active Member

      Joined:
      Jul 25, 2010
      Messages:
      1,030
      Likes Received:
      6
      Trophy Points:
      38
      So it looks like since it doesn't have any concept of cooldown on the Relics that it tries to spam the relics all the time during combat. This causes a significant amount of "Not Ready Yet" spam on screen.
       
    7. Xanathos

      Xanathos Active Member

      Joined:
      Jul 25, 2010
      Messages:
      1,030
      Likes Received:
      6
      Trophy Points:
      38
      Is there any way to add a check to the UsableCombat section to check if the items are on cooldown or not?

      If the check could be added, then it would stop the "not ready yet" spam during combat and pretty much make this plugin perfect.
       
    8. Neo93

      Neo93 Member

      Joined:
      Aug 30, 2011
      Messages:
      342
      Likes Received:
      4
      Trophy Points:
      18
      idk. but you could blacklist it for like 120 seconds.
       
    9. Xanathos

      Xanathos Active Member

      Joined:
      Jul 25, 2010
      Messages:
      1,030
      Likes Received:
      6
      Trophy Points:
      38
      How would I set it up so it could be blacklisted?
       
    10. chinajade

      chinajade Well-Known Member Moderator Buddy Core Dev

      Joined:
      Jul 20, 2010
      Messages:
      17,540
      Likes Received:
      172
      Trophy Points:
      63
      Hi, Xanathos,


      That is weird, and probably deserves looking at harder. I know certain abilities appear to the SW:TOR GUI as "Blah", but you look up the actual internal name and it will be "Blah (Tech)" or "Blah (Force)" or somesuch.



      Sadly, it looks like the BW API for a TorItem (which is what a Relic is), doesn't contain 'cooldown' information. Due to lack of documentation, its unknown whether TorItem.IsUsable takes the cooldown into effect or its just a general item property. If it were me, my "Plan A" would be making this determination, and if the results are favorable, go with IsUsable as the test before attempting relic use. This keeps things simple and easy.

      As far as a "Plan B":
      You could steal the CooldownTracker class out of Wingit/Routines/Mirrors/Mirror.cs to accomplish this. You'd have to tweak it from using Abilities to using TorItemsinstead.

      Before you'd try to use the relic in RelicManager, you'd check it for 'ready':
      if (CooldownTracker.IsOnCooldown(relic))

      Whenever the relic was used, you'd just drop a line in RelicManager right after its use as:
      CooldownTracker.RelicUsed(relic, cooldownDuration); /* was CooldownTracker.AbilityUsed((TorAbility)mirrorAbility);*/

      It would take a little work to bend CooldownTracker to your needs. Its a small and simple class, and shouldn't be too difficult, however.

      The problem with this approach, however, is that you'll have to hardcode the relic cooldown duration. Or, if relics have different cooldown values, you'll have to create a table that maps the relic name to its cooldown duration.


      Hope this helps you get further down the road.


      cheers,
      chinajade
       
    11. Xanathos

      Xanathos Active Member

      Joined:
      Jul 25, 2010
      Messages:
      1,030
      Likes Received:
      6
      Trophy Points:
      38
      Awesome for the pointers, CJ. That helps a TON.

      I don't have a problem in hard coding the relics for their cooldowns. With Relics there are two cooldowns anyway. The "Global Use" cooldown (like how often you can use a Relic like trying to use different Potions in WoW) and then the "Specific Use" cooldown (how often you use that specific Relic).

      I would set it up so that it would start with the assumption that each cooldown is on cooldown and do a 120 minute specific use loop and go from there (for example).
       
    12. 15outland

      15outland New Member

      Joined:
      Mar 27, 2011
      Messages:
      1,056
      Likes Received:
      0
      Trophy Points:
      0
      Does this still work, BW won't detect it.
       
    13. adude

      adude New Member

      Joined:
      Feb 2, 2013
      Messages:
      259
      Likes Received:
      1
      Trophy Points:
      0
      I have a simple solution to this plugin... i am going to add it to my Joe's Fights 2.0 and only call the class when my BuddyTor.Me.HealthPercent <= 30

      For those of you don't understand code that's when your toon's health is less than or equal to 30%
       
    14. adude

      adude New Member

      Joined:
      Feb 2, 2013
      Messages:
      259
      Likes Received:
      1
      Trophy Points:
      0
      Never mind i am lazy i will just add

      PHP:
      System.Threading.Thread.Sleep(120000);
      at the end of the OnPulse() class ............. or maybe i should just move the whole thing?
       

    Share This Page