Compiler Error: d:\Library\Bots\HonorBuddy\Bots\PokehBuddy\PokehBuddy.cs(416,50) : error CS1501: No overload for method 'Dismount' takes 0 arguments
if (Styx.StyxWoW.Me.Mounted) CommonCoroutines.LandAndDismount();
if (Styx.StyxWoW.Me.Mounted) Styx.CommonCoroutines.LandAndDismount();
\PokehBuddy\PokehBuddy.cs(418,71) : error CS1955: Non-invocable member 'Styx.CommonBot.Mount.ActionLandAndDismount' cannot be used like a method.
if (Styx.StyxWoW.Me.Mounted) Styx.CommonBot.Mount.ActionLandAndDismount();
if (Styx.StyxWoW.Me.Mounted) Styx.CommonBot.Coroutines.CommonCoroutines.LandAndDismount();
Keep swapping a pets for me 2. Nothing else![]()
System.FormatException: Additional non-parsable characters are at the end of the string.
at System.ParseNumbers.StringToLong(String s, Int32 radix, Int32 flags, Int32* currPos)
at System.Convert.ToUInt64(String value, Int32 fromBase)
at PokehBuddy.MyPets.updateMyPets() in c:\Bots\HonorBuddy\Bots\PokehBuddy\MyPets.cs:line 59
at PokehBuddy.PokehBuddy.Start() in c:\Bots\HonorBuddy\Bots\PokehBuddy\PokehBuddy.cs:line 125
at Styx.CommonBot.TreeRoot.()
and it works well with 3 level 1 pets.
That may be true, but I've run into the problem even with Ringerx2 when opponents are high enough to low one of my 25's below 30. Then incessant swapping begins until one of my dear pets dies. I've looked at the code. There seems to be a design problem. Indeed:
1. The team task is defined in PBS plugin: Relative Level, Ringer, Ringerx2, Catch. Pet team is formed accordingly.
2. When to do a swap - this is a team task level decision. Ringer should just expose a carrie, while catch team members are all expected to contribute. (The decision when to expose the carrie may depend on a battle situation: we may wish to avoid exposing the carrie to spiders with nets e.g. But spiders can be avoided by other means, so let's forget about them but not about the proper level to decide re swapout).
3. Actual swapouts are currently written in individual pet logic files (I may be missing something here as I am a newb with this addon).
4. When bot receives the SWAPOUT directive it calls an internal very fuzzy, very complicated logic, see WantSwapping routine, and worse: it is absolutely not related neither to the team task as set in PBS addon nor to the individual pet logic which just asked for a swap. Hence swapping at wrong times.
I doubt that this fuzzy logic can be fixed. As I said, the swapout is a team level decision: blind opponents - swap to a pet taking advantage of blidness, etc.
But we do not need to go to team level logic immediately. Instead, we may want to implement first a set of simple swapout logic choices in WantSwapping, corresponding to PBS choices:
- Ringer: just expose carrie at the proper moment, fight with 25s until they are dead or low in health;
- Relative and Catch: fight to a pre-set health level.
We can probably even distinguish the situation based on a team composition as set by PBS.
I am going to try this since I am a bit mad at a current swapping. But again, I am a newb here and may be missing something.
As for your question re error. I did not get any errors. I did as follows: Got an original addon v.24 and on top of that unpacked the zip file from this thread, v.24 modified. Works nicely except these swapouts.
Regarding this bot --- I thought I had it sorted, but it's not loading profiles . Perhaps someone can give some insight on how to fix :
Code:System.FormatException: Additional non-parsable characters are at the end of the string. at System.ParseNumbers.StringToLong(String s, Int32 radix, Int32 flags, Int32* currPos) at System.Convert.ToUInt64(String value, Int32 fromBase) at PokehBuddy.MyPets.updateMyPets() in c:\Bots\HonorBuddy\Bots\PokehBuddy\MyPets.cs:line 59 at PokehBuddy.PokehBuddy.Start() in c:\Bots\HonorBuddy\Bots\PokehBuddy\PokehBuddy.cs:line 125 at Styx.CommonBot.TreeRoot.()
Please note, there is an odd char at that last line, however I can not find any reference to Styx.CommonBot.TreeRoot anywhere.
I did not do the conversion from plugin to botbase, Sychotix did. I just fixed a few issues related to the update (and added a few other things). The plugin version still exists in the plugin section of the forum.The old version used to be a plugin - looks like Treek modified it to be used as a bot base. Have'nt tried it yet - will do now.
This is probably due to your default logic. The defaults I supplied are designed to be used with Ringerx2 settings from BattlePetSwapper, basically one low level pet and 2 25's. Using my settings with any other setup will likely result in very strange behavior like you describe.Not working too well, is it? It just keeps swapping the pets, until every pet is dead... lol.
Code:Swapping to second pet. He needs some experience too! Swapping Pets Swapping Pets Swapping Pets Swapping Pets Swapping Pets Swapping Pets Swapping Pets Swapping Pets Swapping Pets Swapping Pets Swapping Pets Swapping Pets Swapping Pets Stopping the bot!
happens for me as well once pet 2 (one of the boosters) died.
Seems taht he does not know which pet to swap in
That may be true, but I've run into the problem even with Ringerx2 when opponents are high enough to low one of my 25's below 30. Then incessant swapping begins until one of my dear pets dies. I've looked at the code. There seems to be a design problem. Indeed:
1. The team task is defined in PBS plugin: Relative Level, Ringer, Ringerx2, Catch. Pet team is formed accordingly.
2. When to do a swap - this is a team task level decision. Ringer should just expose a carrie, while catch team members are all expected to contribute. (The decision when to expose the carrie may depend on a battle situation: we may wish to avoid exposing the carrie to spiders with nets e.g. But spiders can be avoided by other means, so let's forget about them but not about the proper level to decide re swapout).
3. Actual swapouts are currently written in individual pet logic files (I may be missing something here as I am a newb with this addon).
4. When bot receives the SWAPOUT directive it calls an internal very fuzzy, very complicated logic, see WantSwapping routine, and worse: it is absolutely not related neither to the team task as set in PBS addon nor to the individual pet logic which just asked for a swap. Hence swapping at wrong times.
I doubt that this fuzzy logic can be fixed. As I said, the swapout is a team level decision: blind opponents - swap to a pet taking advantage of blidness, etc.
But we do not need to go to team level logic immediately. Instead, we may want to implement first a set of simple swapout logic choices in WantSwapping, corresponding to PBS choices:
- Ringer: just expose carrie at the proper moment, fight with 25s until they are dead or low in health;
- Relative and Catch: fight to a pre-set health level.
We can probably even distinguish the situation based on a team composition as set by PBS.
I am going to try this since I am a bit mad at a current swapping. But again, I am a newb here and may be missing something.
As for your question re error. I did not get any errors. I did as follows: Got an original addon v.24 and on top of that unpacked the zip file from this thread, v.24 modified. Works nicely except these swapouts.
I wonder if this is referencing stuff in the .svn folder. It really shouldn't be. I will try your method, and repack if it fixes the issue. Not sure about the pet logic. Perhaps adding a pet-health check before swap routine might not be bad -- or ... and/or a condition if pet type is blah and opponent is blah blah then no match -- check if has pet in bars that matches, if not -- continue (do battle with existing noswap ).
I would need to review the code in depth as to where that logic is based, as well as some help with how to do those checks. The logic itself isn't a problem -- just the commands are quite extensive.
I have gone so far as to make default logics for specific teams when I did a lot of PVP - you can make very complex decisions
I think you will spend way too much of your time fighting the design. Probably better off gutting it and starting something from scratch.
elseif petName == "Silithid Hatchling" then
beast_abilities =
{
{"Hiss", (MyPetBattle.currentPetSpeed(LE_BATTLE_PET_ALLY) < MyPetBattle.currentPetSpeed(LE_BATTLE_PET_ENEMY)) and not MyPetBattle.debuff("Speed Reduction") }, -- Slot 2
{"Devour", MyPetBattle.enemyHp()<0.4 }, -- Slot 1
{"Scratch", }, -- Slot 1
{"Survival", }, -- Slot 2
{"Swarm", }, -- Slot 3
{"Sandstorm", }, -- Slot 3
}
So you did not specify a logic for each pet in a team but placed everything in different default logics, one per team? I would like to see the sample to understand current possibilities better
This is very true. Probably the only way forward if this was a paid, commercial project. But the time I can spend on it is limited, especially given the expansion almost at our doorsteps
Still, it is always nice to formulate idealistic design goals. My previous experience like 2 years ago was based on a different bot + protected Lua addon "MyPetBattle". Bot is sued out of existence by Blizzard but the addon is probably still alive (it needs just a protected Lua hack to work). The combination worked as follows:
1. The bot was taking care of visiting hotspots and clicking on a proper objects (wild pets in this case). Strangely, this functionality (custom object list to interact with) is missing from Gatherbuddy.
2. Desired function before clicking is to setup a proper / best team for the pet about to be engaged - an attempt to do this was present but was working strangely.
3. Protected Lua was taking care of the battle using individual pet strategies.
4. After the battle the new team was set up. There was also a button to refresh a team deliberately between battles.
There were very few parameters. Team level, individual level shifts for positions, health to swap - that's basically it. I've levelled about 200 pets using this tool (fixing individual logic on the way: the default was "button 1" as expected). Logic was separated by individual pets, but condition "when to press this button" was in Lua, so no limitation. Sample:
Note "names, not numbers" approach.
Endgame (fighting high-level pets and teams) was worse at the time. Probably need to check how are they doing now. Anyway, what is needed:
2. (already mentioned above as desirable, but needed here) Team composition based on the current target and goal (defeat or level).
5. Team logic. I was actually thinking about full game tree traversal at the time![]()
I do not believe this requires "going commercial" in order to make this work.
I did not mean "make this addon commercial". I was meaning just that having a lot of time to work on a project and not having as much time as desired - can lead to different decisions.
BTW I've checked the protected Lua addon I mentioned. It is here: https://github.com/tropicdome/MyPetBattle . It was not updated for a year, but loads fine and works... until protected Lua is triggered. I guess HB does not act as a Lua unlocker.