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

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

    1. ciscokid525

      ciscokid525 New Member

      Joined:
      Dec 20, 2011
      Messages:
      2
      Likes Received:
      0
      Trophy Points:
      0
      Confused

      View attachment 5680 2014-12-27 12.48.txt

      Not sure what's going on. It finds a pet, then flies to it and away from it like an excited puppy running between a piece of bacon and another piece of bacon not knowing which to eat first....forever. I do get an error when i click settings. Let me know if you can help any please!!
       
    2. shuraiya

      shuraiya New Member

      Joined:
      Dec 20, 2014
      Messages:
      3
      Likes Received:
      0
      Trophy Points:
      0
      I got 2 issues with PB. First after a fight my character doesnt mount and second each time PB locates a animal wow freezes (actually its not complete frozen but its like 0 fps) and HB starts a blacklist counter and then the animal ist blacklisted and the bot flies away.

      View attachment 6760 2014-12-28 00.30.txt
       
    3. tomcruz

      tomcruz New Member

      Joined:
      Apr 9, 2014
      Messages:
      13
      Likes Received:
      0
      Trophy Points:
      0
      Hi just wondering. does the pokebuddy do pvp battles? thanks.
       
    4. Lopina

      Lopina New Member

      Joined:
      Aug 3, 2014
      Messages:
      33
      Likes Received:
      0
      Trophy Points:
      0
      There is a bug in current version of plugin:

      Pokehbuddy.cs:
      The function "Pokehbuddy#CanSummon(petID)" being called in during pet rating calculations on line 2275:
      Code:
                  if (!CanSummon(petID)) rating = -100000000;
      
      always returns false.
      For that reason, each pet rating is set to -100000000 and swap logic is not working as intended.

      Code:
      public bool CanSummon(string petID)
              {
                  List<string> cnt = Lua.GetReturnValues("return C_PetJournal.PetIsSummonable(" + petID + ");");
      
                  if (cnt != null) { if (cnt[0] == "1") return true; }
                  return false;
              }
      
      Commenting that line seems to do the trick, but that is not a proper fix, it's more of a hack.




      Context:

      I was trying to level my lvl 10 Clockwork Gnome with lvl 25 Eternal Strider and lvl 25 Scourged Whelpling.
      I created custom logic for all of them, where I'd swap the gnome after turn 1, switch to Eternal Strider as Pet 2, Use Cleansing Rain, swap to Scourged Whelpling and use Dreadful Breadth a few times to kill entire enemy team.

      Without commenting that line, the following would happen:
      Pet1 would need to be swapped
      (all ratings would be -100000000)
      Pet2 would be dragged out
      Pet2 would need to be swapped
      (all ratings would be -100000000)
      Pet1 would be dragged out instead of Pet3
       
      Last edited: Dec 28, 2014
    5. ck1234

      ck1234 New Member

      Joined:
      Aug 17, 2014
      Messages:
      13
      Likes Received:
      0
      Trophy Points:
      0
      I'm getting the issue where things lock up or freeze ingame whenever it spots a potential battle and then decides to skip or blacklist the fight since it got "stuck"

      Anyone know how to fix?
       
    6. Vevio

      Vevio Member

      Joined:
      Dec 3, 2012
      Messages:
      91
      Likes Received:
      0
      Trophy Points:
      6
      hi i cant get pet area to show in the hb plugin menu
      please help...
       
    7. babblez

      babblez New Member

      Joined:
      May 1, 2013
      Messages:
      14
      Likes Received:
      0
      Trophy Points:
      0
      I added only a single pet to my Whitelist, it still targets and starts combat with all other pets. Any idea? I assume the Whitelist makes it explicit to whats on it, no?
       
    8. Lopina

      Lopina New Member

      Joined:
      Aug 3, 2014
      Messages:
      33
      Likes Received:
      0
      Trophy Points:
      0
      You need to select the checkbox "Whitelist" on one of the options tabs as well.
       
    9. babblez

      babblez New Member

      Joined:
      May 1, 2013
      Messages:
      14
      Likes Received:
      0
      Trophy Points:
      0
      Yeah thanks, I realized this after posting this message. Sorry about that, I need to l2r.
       
    10. icedragon

      icedragon New Member

      Joined:
      Aug 17, 2014
      Messages:
      147
      Likes Received:
      0
      Trophy Points:
      0
      Better yet is there a way to allow this to capture poor quality pets. On some really rare pets that's all I seem to be able to find, but pokehbuddy just misses them (i see it in log) tear...
       
    11. toliman

      toliman Member

      Joined:
      Jun 20, 2012
      Messages:
      625
      Likes Received:
      10
      Trophy Points:
      18
      Yes, it does. There's an option to queue up on the second tab.
       
    12. toliman

      toliman Member

      Joined:
      Jun 20, 2012
      Messages:
      625
      Likes Received:
      10
      Trophy Points:
      18
      The lockup is because the bot is trying to disengage the framelock and this causes a lockup in the game UI and LUA of the game as the framelock isn't really being disabled, but left open without being closed afterwards to let the game UI do its thing.

      This has the roll on effect of the game waiting for the command to finish the frame before updating, and never getting to update, causing a telltale stutter and then a brief hang.

      We're sort of lucky enough that the game LUA can handle the framelock disengage without locking up the game entirely, which is a possibility if it weren't LUA.

      Without disabling the bot, or using a hooking method (for which the documentation is sparse) there's not a practical way to get pokehbuddy to work with framelock or gatherbuddy nicely.

      Until a hack or a fix comes along, Pokehbuddy just doesn't work with gathering anymore.

      Using framelock, means that the bot gets to re-navigate 15,20 to 30 times a second, based on the current position of the character. If the position deviates, it takes 100-400ms to recognise the problem (i.e a few frames) and under 50ms to re-navigate.

      This is what causes the yoyo effect in pokehbuddy that works with the framelock, because I also extended the number of attempts to compensate. However, without a method to break or pause gatherbuddy, they will fight each other every few frames for control of the navigation system.

      The same problem exists with objectgatherer, from MoP. The new navigation/anti-stuck system in gatherbuddy does not have the ability to be locked out or disabled, so that the plugin can take over navigation and targeting.

      Consider it an argument for efficiency (that has disabled a fair number of plugins along the way).
       
    13. toliman

      toliman Member

      Joined:
      Jun 20, 2012
      Messages:
      625
      Likes Received:
      10
      Trophy Points:
      18
      It's due to the new type parsing of LUA variables, i think that it requires a few custom functions to test what comes out of the game is an integer or a string.
      Which is called type matching in programming, ie a string holds characters, integer holds whole numbers, etc. When a string holds numbers, that works, but you can't add that number, it has to be converted to an integer or float depending on what you want to store, operate or perform in the function.

      Every time HB uses GetReturnValues, the list of values has to be type matched to the results. No idea why, because not doing so, causes the function to return null values? (assumed, not tested).

      Before the changes, that step was done outside of the GetReturnValues stage, but it seems that the list has to be set with the right types before GetReturnValues will store that data.

      So, tldr, HB is being quite precise (anal), and we're just not. Causing the problem.
       
    14. Lopina

      Lopina New Member

      Joined:
      Aug 3, 2014
      Messages:
      33
      Likes Received:
      0
      Trophy Points:
      0
      There is another bug in Pokebuddy, in a way Lua is executed:

      When calculating advantage and disadvantages, getting the type of the pet breaks:

      This is the function that returns the information needed, as stated here: docs/api/C PetJournal.GetPetInfoByPetID - World of Warcraft Programming: A Guide and Reference for Creating WoW Addons

      Code:
      Dump: value=C_PetJournal.GetPetInfoByPetID
      [1]=<function>
      
      New Battle Pet GUIDs look like this: "BattlePet-0-<12 hex numbers>";

      For example:
      Code:
      Dump: value=C_PetJournal.GetSummonedPetGUID()
      [1]="BattlePet-0-000004E52665"
      
      So, let's try simply plugging that value in above mentioned function:
      Code:
      Dump: value=C_PetJournal.GetPetInfoByPetID("BattlePet-0-000004E52665")
      [1]=1601,
      [3]=10,
      [4]=441,
      [5]=760,
      [6]=61016,
      [7]=true,
      [8]="Servant of Demidos",
      [9]="Interface\\ICONS\\Spell_Shadow_SummonVoidWalker.blp",
      [10]=6,
      [11]=88692,
      [12]="|cFFFFD200Drop:|r Demidos|n|cFFFFD200Zone:|r Shadowmoon Valley",
      [13]="Demidos created a great many servants when he was hosting parties for other void lords.",
      [14]=false,
      [15]=true,
      [16]=true,
      [17]=false,
      [18]=true
      
      So, let's start up PokeBuddy and see what does it say, shall we?

      Code:
      [00:48:52.272 D] Lua failed! Status: ErrRun
      [00:48:52.641 D] Lua failed! Status: ErrSyntax
      
      Or more detailed:
      Code:
      [PB] Pet ID : BattlePet-0-000004E2C06E
      Lua failed! Status: ErrSyntax
      [PB] Pet Type : -1
      
      So, pet type returned is -1. How is that possible? Well, it seems that something has changed and calling Lua like that no longer works:

      Here's the workaround:

      Code:
      public static int GetTypeByID(string thepetID) {
      		Lua.DoString("C_PetJournal.SetFlagFilter(LE_PET_JOURNAL_FLAG_FAVORITES, false) C_PetJournal.SetFlagFilter(LE_PET_JOURNAL_FLAG_COLLECTED, true) C_PetJournal.SetFlagFilter(LE_PET_JOURNAL_FLAG_NOT_COLLECTED, true) ");
      		Lua.DoString("C_PetJournal.ClearSearchFilter() C_PetJournal.AddAllPetSourcesFilter() C_PetJournal.AddAllPetTypesFilter() ");
      		
      		string lua = "local RetInfo = {}; local b = {};b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9],b[10] = C_PetJournal.GetPetInfoByPetID(\"" + thepetID + "\");" +
      					"for j_=0,10 do table.insert(RetInfo,tostring(b[j_]));end; " +
      					"return unpack(RetInfo)";
      
      		List<String> stats = Lua.GetReturnValues(lua);
      		
      		return stats[9].ToInt32();
      }
      
       
    15. toliman

      toliman Member

      Joined:
      Jun 20, 2012
      Messages:
      625
      Likes Received:
      10
      Trophy Points:
      18
      Basically this is one of the few teething issues with pokehbuddy since WoD.

      Getpetinfo and getpetinfobypetid return similar values, (and are used in similar loops during combat, with values parsed to different functions as a list )

      but instead of the parsing you have used here, you can also define the list and then fill the dictionary list from the values that LUA dumps out, avoiding the string parsing work which can be expensive (in cpu time)

      Of course, it's handy as long as they don't change the petinfoID format (which happened once before)

      If it helps, there's some working examples from the battle pet swapper LUA functions. And from memory, some code from a few google searches for GetReturnValues , will also help pad out the type definitions for each listing.

      (There are a few intriguing semi abandoned github projects... Eg http://petzilla.googlecode.com/svn/trunk/Pet/PetApi/PetApiJournal.cs which I will obfuscate if needed to avoid google searching, it seems promising)

      there's also a ton of debug hooks just to try and pull data out via LUA, left in pokehbuddy from early testing.
       
      Last edited: Jan 1, 2015
    16. Lopina

      Lopina New Member

      Joined:
      Aug 3, 2014
      Messages:
      33
      Likes Received:
      0
      Trophy Points:
      0
      Awesome, I hope the author sees this and pushes a new build :D
       
    17. toliman

      toliman Member

      Joined:
      Jun 20, 2012
      Messages:
      625
      Likes Received:
      10
      Trophy Points:
      18
      It might be a while.

      Maybe has been on and off with HB and the forums with personal issues. If you do later mod the existing Pokehbuddy, just attach it here. All very laissez-faire.There's a handful of people in the thread who would add it to their own versions.

      I'm not at home, (yay, holidays) but I'll try to add it to the version I've been tinkering with.

      I've been tinkering with custom code to swap pets by zone for the auto level settings, which requires some exploration and testing in game, and I really haven't been playing in 4+ months except to get to 100 with 120% rested XP (sic)

      Also thought I'd finally try to get the pet database sync functions pencilled in, but it's still WIP, and not coming soon. The goal is to create a cloud storage for pet logic, that people can upload and download from, and could generate a universal db for all pets, that could be used with the old and new versions.

      The forum upload never really took off, but it would be similar, just bypassing the forum submit and sending data via JSON via an anonymous url service (nfi)

      (all technically easy to implement, hard to get the right level numbers & db sync requires an explicit ruling from the admins to allow analytics or anonymous data exchange / sync services. The current rules are not clear & different devs have used different methods to poll users/obtain upload data. )

      it would go with the custom mods that work with framelock that I modified back in November-ish.
       
    18. Lopina

      Lopina New Member

      Joined:
      Aug 3, 2014
      Messages:
      33
      Likes Received:
      0
      Trophy Points:
      0
      I need to do some testing before, but a strange issue has started happening after that change. WoW crashed 2 times due to not enough memory, and I don't know if that's related to my changes.
       
    19. bwmorgan1

      bwmorgan1 New Member

      Joined:
      Sep 15, 2014
      Messages:
      8
      Likes Received:
      0
      Trophy Points:
      0
      \Plugins\Pokebuddy\Pokehbuddy.cs:line 1243
      [PB] STUCK : Blacklist counter :2
      [PB] STUCK : Blacklist counter :3
      [PB] STUCK : Blacklist counter :4
      [Singular] Behaviors disabled in Pet Fight
      Mounting: Hearthsteed
      [PB] Going to load species Arcane Eye
      Mounting: Hearthsteed
      [PB] Going to load species Arcane Eye
      Mounting: Hearthsteed
      [PB] Going to load species Arcane Eye
      [PB] Going to load species Arcane Eye
      [PB] Going to load species Arcane Eye
      [PB] Going to load species Arcane Eye
      [PB] Going to load species Arcane Eye

      this keeps happening not sure what to do
       
    20. klepp0906

      klepp0906 Banned

      Joined:
      Apr 25, 2013
      Messages:
      1,352
      Likes Received:
      8
      Trophy Points:
      38
      Did you just try to emphasize and explain ethics to not only a wow player, but a wow botter? An analogy exists for this sort of thing :p
       

    Share This Page