zze 1 Posted September 23, 2018 Share Posted September 23, 2018 I am trying to get the bots logic to loop through a little better in the sense of checking itself after each fight, I would like to have it stop itself after each fight for check of (do I have a pet, is my hp/mp above X %) that kinda thing so far I've tried something like internal void Rotation() { while (_running) { try { if (!ObjectManager.Me.IsDeadMe) { if (!ObjectManager.Pet.IsAlive) { PSpawn(); //Pet spawner return; } Buff(); if (Fight.InFight && ObjectManager.Me.Target > 0) { Pull(); CombatRotation(); } ..................... which seems to help but not quite full proof, so just wondering is there a better way to basically have it reinitialize, or just have a section of code it executes after it exits combat each time ? Link to comment https://wrobot.eu/forums/topic/10157-having-trouble-getting-to-the-bot-to-loop-in-the-way-i-want/ Share on other sites More sharing options...
zze 1 Posted September 23, 2018 Author Share Posted September 23, 2018 internal void Rotation() { while (_running) { try { if (!ObjectManager.Me.IsDeadMe) { if (!ObjectManager.Pet.IsValid && !ObjectManager.Me.IsMounted) { // Thread.Sleep(300); Fight.StopFight(); MovementManager.StopMove(); PSpawn(); // pet spawner } Buff(); if (Fight.InFight && ObjectManager.Me.Target > 0) { Pull(); CombatRotation(); } ..................... its not after the fight but seems to have fixed it just carrying out to the next target without resummoning ? Link to comment https://wrobot.eu/forums/topic/10157-having-trouble-getting-to-the-bot-to-loop-in-the-way-i-want/#findComment-47870 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now