• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [PLUGIN] Pokebuddy - Gotto kill em all!

    Discussion in 'Uncataloged' started by maybe, Oct 26, 2012.

    1. Lothz

      Lothz New Member

      Joined:
      Jan 4, 2015
      Messages:
      1
      Likes Received:
      0
      Trophy Points:
      0
      Hey guys, my bot gets stuck whenever a softshell snappling (valley of the four winds) uses a stun on my pet. The bot keeps trying to use an ability but does not pass the turn. I have already tried blacklisting it but it is sometimes in the team with other critters. Any suggestions? Thanks.
       
    2. Lopina

      Lopina New Member

      Joined:
      Aug 3, 2014
      Messages:
      33
      Likes Received:
      0
      Trophy Points:
      0
      Add a behaviour line in default logic to pass turn if pet is stunned.
       
    3. Lopina

      Lopina New Member

      Joined:
      Aug 3, 2014
      Messages:
      33
      Likes Received:
      0
      Trophy Points:
      0
      After some testing, I have concluded that indeed the change I made caused WoW to memory leak. How and why, I do not know, but I can only speculate. My best guess is that the variables being created and populated by lua calls aren't being GCed.

      Any tips are welcome, since my knowledge on how WoW and HB call and process lua code is quite limited.

      In the meantime, I made changes to cache the pet and its type and if debugging is to be trusted, it is really being cached properly. However, the memory usage keeps growing whenever Pokebuddy plugin is enables, so I'm guessing there's a leak somewhere else.

      Update1:
      With a clean checkout of Pokebuddy, the memory leak is still present, at a rate of ~40MB / min. The only thing (I think) I know about lua and caching is that if i use string concatenation, it will cache the string.

      Anyways, I decided to manually call a few GC cycles, to see the memory actually being cleaned up, and yes, it's around ~4MB per 5-6 seconds, steadily.

      Update 2:
      I did a quick search and found out I'm not the only one experiencing the memory leaks by Pokebuddy.



      Is there any chance the dev might look this up?

      Update 3:
      After making sure every lua call in PokeBuddy.cs uses local variables, the WoW memory usage is keeping steady at 1.7GB after 5 hours. It has peaks, but it reverts to this state every time.
       
      Last edited: Jan 5, 2015
    4. thedon19

      thedon19 Member

      Joined:
      Mar 4, 2010
      Messages:
      193
      Likes Received:
      0
      Trophy Points:
      16
      So is it fair to say this plugin cant be used at the moment without modifications?
       
    5. Lopina

      Lopina New Member

      Joined:
      Aug 3, 2014
      Messages:
      33
      Likes Received:
      0
      Trophy Points:
      0
      It can be used, but it will not work in an optimal way.

      If you want advanced combat ratings that will use pets that are strong against enemies', it won't quite work.
      If you want to keep it running for hours (5+), it won't quite work.

      But for some basic stuff, I don't think you should have any problems.
       
    6. Pavao

      Pavao New Member

      Joined:
      Feb 5, 2012
      Messages:
      48
      Likes Received:
      0
      Trophy Points:
      0
      I was gettting memory error, and my wow was freezing every time. My simple soulution was to "Quiet" the log. Doing so, the error stopped and now its working fine.
       
    7. lotrodude

      lotrodude Member

      Joined:
      Jul 2, 2012
      Messages:
      537
      Likes Received:
      6
      Trophy Points:
      18
      Yep, it's worthless. You should just forget about pets and quit playing WoW! :) ...or find a friend that knows just a little about coding. (maybe you could buy him a pizza and some Mountain Dew to help you fix it)
       
    8. S4G4

      S4G4 New Member

      Joined:
      Jan 2, 2015
      Messages:
      1
      Likes Received:
      0
      Trophy Points:
      0
      Hi, for a couple of days I was using this without a problem, but today I was getting an error that annoys me. I went to a zone to level some pets, but now my character started to target different pets in the area but he not engage a battle. I've tried to change from Gatherbuddy to Combat with no luck.
      Anyone can help me with this?
       
    9. Pavao

      Pavao New Member

      Joined:
      Feb 5, 2012
      Messages:
      48
      Likes Received:
      0
      Trophy Points:
      0
      ?

      "My simple soulution was to "Quiet" the log. Doing so, the error stopped and NOW ITS WORKING FINE"

      Whats wrong with you?
       
    10. Darkangel12

      Darkangel12 New Member

      Joined:
      Dec 17, 2014
      Messages:
      43
      Likes Received:
      0
      Trophy Points:
      0
      Can enyone please explaine how i get it work? an easy way please. caus i have no time to read 170 pages :)
       
    11. Opply

      Opply Community Developer

      Joined:
      Feb 28, 2013
      Messages:
      328
      Likes Received:
      29
      Trophy Points:
      0
      managed to help out a bit on the freezing, even though it is a very crude hack,

      inside

      PHP:
      while (WildBattleTarget().Distance 10 && !Styx.StyxWoW.Me.Combat && escapetimer.ElapsedMilliseconds 10000)
      change the if sentence

      PHP:
      if (movetimer.ElapsedMilliseconds 500)
      to

      PHP:
      if (movetimer.ElapsedMilliseconds 500)
      {
          
      movetimer.Stop();
          
      movetimer.Reset();
          
      movetimer.Start();

          
      //if (Styx.StyxWoW.Me.IsFlying) Flightor.MoveTo(new WoWPoint(WildBattleTarget().Location.X, WildBattleTarget().Location.Y, WildBattleTarget().Location.Z + 3));
          
      if (Styx.StyxWoW.Me.IsFlying)
          {                                    
              
      Styx.WoWInternals.WoWMovement.ClickToMove(WildBattleTarget().Location.XWildBattleTarget().Location.YWildBattleTarget().Location.3);
              
      Thread.Sleep200 );
              return;
          }
          if (!
      Styx.StyxWoW.Me.IsFlying
          {
              
      Navigator.MoveTo(WildBattleTarget().Location);
              
      Thread.Sleep200 );
              return;
          }
      }
      and if needed up the 1000 in

      PHP:
      if (stucktimer.ElapsedMilliseconds 1000 && oldloc.Distance(Styx.StyxWoW.Me.Location) < 0.5)
      to 2000 or something.. seems to be able to move around a bit now at least without locking up completly..
       
    12. feskins

      feskins Member

      Joined:
      Jul 24, 2013
      Messages:
      179
      Likes Received:
      0
      Trophy Points:
      16
      Hi I get a lot of constant red text [PB] Pulsing BPS. What is that about? It runs on and on.
       
    13. toliman

      toliman Member

      Joined:
      Jun 20, 2012
      Messages:
      625
      Likes Received:
      10
      Trophy Points:
      18
      It's a debug statement, that was left in the code so that someone could see if they had the plugin enabled. You can comment it out in pokehbuddy.
       
    14. toliman

      toliman Member

      Joined:
      Jun 20, 2012
      Messages:
      625
      Likes Received:
      10
      Trophy Points:
      18
      The reason that you're freezing up is that thread.sleep just murders the game UI instead of what it used to do, murder HB and any bot commands. This change is also why object gatherer had to be changed to a bot, and why a ton of useful plugins are now integrated into bots instead. Eg. WoD timber gathering.

      If you have framelock enabled, sleep causes all of the regular processes to stop working, including responding to the framelock, which causes the game UI to freeze up. Its not restricted to framelock though, because the bots are now operating in the same thread as plugins and combat routines.

      Prior to the change, plugins used to operate in a separate space to the bot and subsystems for HB to operate. This is still the case, but it prevented plugins from being able to access framelock events as well, eg for quest behaviors. By using the same thread as the bots and routines, it means that all plugins now have to play nice with each other and not steal time or try to override each others actions.

      What you have to do is stop pokeh from always retrying, because when the framelock is active, each pulse loop runs for 50ms (20fps) , or up to 32ms (~30fps) to access the game. If a command takes too long to execute, it doesn't just delay honorbuddy, it delays the game as well now. And the plugins have to share the same thread as combat routines, movement, navigation, bots, quest behaviors, etc.

      This also means that the old strategy of using thread.sleep to override bot movement won't work. We would need a way to tell the bot to pause, and there are no HB API's or functions to achieve that. Hooks could be used, but there's another series of problems with using hooks. Although it could be made to work, it's not supported or documented, and it's not a realistic answer because the bot author also has to support using them, which has not happened.

      Anyway

      You can hack this by changing the sleep lines to wait timers, or timer functions, (one is built in, one comes from the system timer) and putting the new timer into the if statements, then resetting/starting the timer when you reach a point where you need to wait.

      If this is too confusing, just have a look at examples from the quest behaviors, or other plugins that require movement.

      It won't work to replace the old behavior, but it won't lock up the game anymore. Using smaller time increments will be more difficult, especially because plugin triggered movement is now at war with the bot triggered navigation and movement in the same process thread, with no ability to share or set hierarchy or queue commands, etc.

      In short, the plugin is fantastic, but it is being outmoded because of the lack of working hooks in the builtin bots like GB2 to override movement for a few minutes. Until the hook works, or GB2 is modified to allow pokeh to trigger, it's difficult to imagine a workaround.
       
    15. msiman23

      msiman23 New Member

      Joined:
      Oct 5, 2014
      Messages:
      9
      Likes Received:
      0
      Trophy Points:
      0
      Works pretty good for me but for some reason if my pet is stunned for a turn it will get stuck if no other option then pass is presented.
       
    16. KopyHB

      KopyHB New Member

      Joined:
      Oct 24, 2014
      Messages:
      6
      Likes Received:
      0
      Trophy Points:
      0
      I have a problem, when my first pet dead, the bot is afk and no change for the second pet ... :( and in the info bot is was swapping pets.. all the time. i installed pokebudy for the svn .any idea because i have this problem? thx
       
      Last edited: Jan 18, 2015
    17. Smio

      Smio New Member

      Joined:
      Apr 4, 2012
      Messages:
      5
      Likes Received:
      0
      Trophy Points:
      0
      And how do you QUIET the log?
       
    18. Pavao

      Pavao New Member

      Joined:
      Feb 5, 2012
      Messages:
      48
      Likes Received:
      0
      Trophy Points:
      0
      Settings & Tools -> Log Level (Under General) -> Quiet

      Default should be "Normal"
       
    19. toliman

      toliman Member

      Joined:
      Jun 20, 2012
      Messages:
      625
      Likes Received:
      10
      Trophy Points:
      18
      This is some advice from a few pages back, https://www.thebuddyforum.com/honor...dy-gotto-kill-em-post1760325.html#post1760325

      open up the Default Logics.xml file in notepad, copy and paste the block below into the file, overwriting the old with the new changes, hit save. it's done. Also add in the new WoD numbers, which i had forgotten about.

      PHP:
      <?xml version="1.0" encoding="utf-8"?> 
      <PetBattleSettings> 
        <Logic>SWAPOUT Health(THISPET) ISLESSTHAN 30@SWAPOUT EnemyPetLevel ISGREATERTHAN MyPetLevel + 4 $ Health(THISPET) ISLESSTHAN 90 $ MyPetsAlive ISGREATERTHAN 1@PASSTURN HASBUFF(1348) EQUALS true@PASSTURN HASBUFF(1030) EQUALS true@PASSTURN HASBUFF(927) EQUALS true@PASSTURN HASBUFF(926) EQUALS true@PASSTURN HASBUFF(822) EQUALS true@PASSTURN HASBUFF(734) EQUALS true@PASSTURN HASBUFF(498) EQUALS true@PASSTURN HASBUFF(174) EQUALS true</Logic> 
        <SpellLayout>ASSIGNABILITY1(0)@ASSIGNABILITY2(0)@ASSIGNABILITY3(0)</SpellLayout> 
      </PetBattleSettings>
      This covers the stun effects of the following abilities (against you). though, 1030 and 1348 are usually exceptions for PvP battles(newer WOD pets), it's easier to check in one place so you don't have to add it to every logic.

      822, "Polymorph"
      498, 926, 1348, "Asleep"
      1030, 927, 174 "Stunned"
      734, "Crystal Prison"

      good luck.

      I'd also recommend installing the Prostak bot, Presto Pets if you haven't seen it yet, as it's steadily improving and now has 95% of the pets without needing to build a custom logic.

      I still use Pokeh, even as-it-is, but i'm slowly adapting to the new bot, even though it's missing a lot of features from Pokeh. I'm hesitating to adapt the ~350 odd hand-made logics to the other bot, mainly because there's not a lot of fundamental crossover between the 2 approaches, although there's more scope for a bot like Prostak's to run dailies and exploit specific tactics to boost pets or complete menagerie dailies, it's still something that has to use levelling for the meanwhile.


      If you want to run PvP, Pokeh still works well and when it doesn't need to move between battles, then it works well.
      Due to last year's undocumented changes, I can't see Pokehbuddy ever working like it used to, but it still works with some tweaks here and there while questing or grinding. or possibly in conjunction with some 3rd party/store bots ... (doubtful)
       
    20. Oika

      Oika New Member

      Joined:
      Jan 27, 2015
      Messages:
      4
      Likes Received:
      0
      Trophy Points:
      0
      My WOW crashed when I use Pokebuddy.

      It happens only to Pokebuddy, other all works in the normal mode, that is farm reputations or something else.

      If to someone it isn't difficult, I will accept rar archive, with a full configuration of the client working more than 10 hours.
      Thanks in advance.
       

    Share This Page