Ruinit 11 Posted November 25, 2017 Share Posted November 25, 2017 I found this code on forum what is wrong here? It just keeps attacking with everything I have and kills the mob before it uses item. Thread t = new Thread(() => { uint itemId = 60206; int questId = 26720; while (robotManager.Products.Products.IsStarted) { if (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause) { if (!Quest.HasQuest(questId)) break; if (ObjectManager.Target.IsValid && ObjectManager.Target.IsAlive && ObjectManager.Target.HealthPercent <= 25) { ItemsManager.UseItem(itemId); } } Thread.Sleep(500); } }); t.Start(); Link to comment https://wrobot.eu/forums/topic/7816-whats-wrong-with-this-code-kills-mob-instead-of-using-item/ Share on other sites More sharing options...
thakane 7 Posted December 2, 2017 Share Posted December 2, 2017 need it too, but i dont know how to get it worked. my bot kills the mobs too Link to comment https://wrobot.eu/forums/topic/7816-whats-wrong-with-this-code-kills-mob-instead-of-using-item/#findComment-36066 Share on other sites More sharing options...
Matenia 628 Posted December 2, 2017 Share Posted December 2, 2017 Try: Fight.StopFight();ItemsManager.UseItem(itemId); instead of just ItemsManager.UseItem(itemId); thakane 1 Link to comment https://wrobot.eu/forums/topic/7816-whats-wrong-with-this-code-kills-mob-instead-of-using-item/#findComment-36068 Share on other sites More sharing options...
thakane 7 Posted December 2, 2017 Share Posted December 2, 2017 It works, thanks a lot :) Link to comment https://wrobot.eu/forums/topic/7816-whats-wrong-with-this-code-kills-mob-instead-of-using-item/#findComment-36070 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