Jump to content

Custom Profile + Pet Battle Fight Class


Requ

Recommended Posts

I'm working over automated custom profile that gathers spawn points from private server database and uses it to interact with NPC/Battle pets. I also have a custom pet battle fight class, that's working perfectly when using Pet Battle Product.

The problem is: some Pet Battle settings are being ignored when I'm using custom profiles. Used settings such as catching rare pets and custom lua code are working, but bot won't heal pets when only 1 is dead, and C# code "FightBattlePet.FightClass" returns only pet battle fight class directory, but won't include file in it (it's defined in pet battle settings and working fine when using this program or automation tho).

Using "FightBattlePet.StartFight(closestUnit.GetBaseAddress)" C# code to attack NPC returns "[FightPetBattle] Mob no valid" but it is a valid mob (Bandicoon), after that, when bot enters into pet battle with NPC is throws "[FightPetBattle] Cannot load pet battle fight class, use default.".

I have tried attaching "BattlePetState" into engine states in custom profile, but that does nothing. Am I missing something?

PS: I have just noticed that this should be in: https://wrobot.eu/forums/forum/40-developers-assistance/

Link to comment
Share on other sites

Hello, try that:

Pet_Battle.Bot.PetBattleSetting.Load();
wManager.Wow.Helpers.PetBattles.ReviveOne = Pet_Battle.Bot.PetBattleSetting.CurrentSetting.ReviveOne;
wManager.Wow.Helpers.FightBattlePet.CaptureAllPets = Pet_Battle.Bot.PetBattleSetting.CurrentSetting.CaptureAllPets;
wManager.Wow.Helpers.FightBattlePet.CaptureIDontHavePets = Pet_Battle.Bot.PetBattleSetting.CurrentSetting.CaptureIDontHavePets;
wManager.Wow.Helpers.FightBattlePet.CaptureRarePets = Pet_Battle.Bot.PetBattleSetting.CurrentSetting.CaptureRarePets;
wManager.Wow.Helpers.FightBattlePet.PetBattlesDontFight = Pet_Battle.Bot.PetBattleSetting.CurrentSetting.DontFight;
wManager.Wow.Helpers.FightBattlePet.AutoOrderPetByLevel = Pet_Battle.Bot.PetBattleSetting.CurrentSetting.AutoOrderPetByLevel;
wManager.Wow.Helpers.FightBattlePet.LuaCode = Pet_Battle.Bot.PetBattleSetting.CurrentSetting.LuaHook;
wManager.Wow.Helpers.FightBattlePet.AutoChooseBestPet = Pet_Battle.Bot.PetBattleSetting.CurrentSetting.AutoChooseBestPet;
wManager.Wow.Helpers.FightBattlePet.AbilitiesBlackListed = Pet_Battle.Bot.PetBattleSetting.CurrentSetting.AbilitiesBlackListed;
wManager.Wow.Helpers.FightBattlePet.FightClass = Pet_Battle.Bot.PetBattleSetting.CurrentSetting.FightClass;

(and compile custom profile dll (don't forget to add in reference "Pet battle.dll") (if you don't wont generate dll, use quester product to run your c# code, quester prelaod "pet battle.dll")

Link to comment
Share on other sites

Works great, thanks! It scared me a bit at the beginning due to "[FightPetBattle] Cannot load pet battle fight class, use default." message, but that's before your settings are being applied. With your code - all pet battle settings are being respected, and pet fight class is working! :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...