whynot 1 Posted July 31, 2017 Share Posted July 31, 2017 Hello, how can i force the bot to check if i have something to eat and if not using bandage. Is this possible? Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/ Share on other sites More sharing options...
whynot 1 Posted August 7, 2017 Author Share Posted August 7, 2017 is it not possible? can nobody help ? Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-30457 Share on other sites More sharing options...
Hatmud 7 Posted December 2, 2017 Share Posted December 2, 2017 Greetings. Any way I use bandages to heal the character? Thank you. Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36059 Share on other sites More sharing options...
Hatmud 7 Posted December 2, 2017 Share Posted December 2, 2017 I know that by modifying something this code, you could make a plot to use the bandages. This code works with the scrolls Could someone make the modification? THANK YOU. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ComponentModel; using System.Diagnostics; using System.Threading; using robotManager.Helpful; using robotManager.Products; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; public class Main : wManager.Plugin.IPlugin { private bool isRunning; private BackgroundWorker pulseThread; private static WoWLocalPlayer Me = ObjectManager.Me; public void Start() { pulseThread = new BackgroundWorker(); pulseThread.DoWork += Pulse; pulseThread.RunWorkerAsync(); } public void Pulse(object sender, DoWorkEventArgs args) { try { while (isRunning) { if (!Products.InPause && Products.IsStarted) { if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(3012) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(3012); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(1477) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(1477); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(4425) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(4425); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(10309) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(10309); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(27498) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(27498); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(33457) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(33457); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(43463) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(43463); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(43464) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(43464); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(955) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(955); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(2290) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(2290); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(4419) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(4419); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(10308) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(10308); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(27499) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(27499); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(33458) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(33458); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(37091) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(37091); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(37092) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(37092); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(3013) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(3013); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(1478) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(1478); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(4421) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(4421); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(10305) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(10305); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(27500) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(27500); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(33459) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(33459); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(43467) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(43467); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(1181) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(1181); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(1712) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(1712); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(4424) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(4424); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(10306) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(10306); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(27501) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(27501); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(33460) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(33460); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(37097) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(37097); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(37098) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(37098); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(1180) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(1180); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(1711) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(1711); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(4422) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(4422); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(10307) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(10307); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(27502) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(27502); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(33461) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(33461); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(37093) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(37093); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(37094) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(37094); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(954) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(954); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(2289) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(2289); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(4426) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(4426); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(10310) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(10310); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(27503) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(27503); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(33462) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(33462); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(43465) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(43465); Logging.WriteDebug("Using consumable Scroll"); Thread.Sleep(Usefuls.Latency + 1000); } } Thread.Sleep(20000); } } catch (Exception ex) { } } public void Dispose() { try { isRunning = false; } catch (Exception e) { } } public void Initialize() { isRunning = true; Start(); } public void Settings() { } } Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36061 Share on other sites More sharing options...
Hatmud 7 Posted December 2, 2017 Share Posted December 2, 2017 With this code, use the bandages, but I need a code, so you can use them when you are below 80% of life and when you are not moving using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ComponentModel; using System.Diagnostics; using System.Threading; using robotManager.Helpful; using robotManager.Products; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; public class Main : wManager.Plugin.IPlugin { private bool isRunning; private BackgroundWorker pulseThread; private static WoWLocalPlayer Me = ObjectManager.Me; public void Start() { pulseThread = new BackgroundWorker(); pulseThread.DoWork += Pulse; pulseThread.RunWorkerAsync(); } public void Pulse(object sender, DoWorkEventArgs args) { try { while (isRunning) { if (!Products.InPause && Products.IsStarted) { if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(14530) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(14530); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(14529) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(14529); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(3531) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(3531); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(3530) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(3530); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(6451) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(6451); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(6450) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(6450); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(3531) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(3531); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(3530) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(3530); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(2581) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(2581); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(1251) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(1251); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } } Thread.Sleep(20000); } } catch (Exception ex) { } } public void Dispose() { try { isRunning = false; } catch (Exception e) { } } public void Initialize() { isRunning = true; Start(); } public void Settings() { } } Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36062 Share on other sites More sharing options...
Hatmud 7 Posted December 4, 2017 Share Posted December 4, 2017 Can someone help me complete this Pluging Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36165 Share on other sites More sharing options...
iMod 99 Posted December 4, 2017 Share Posted December 4, 2017 // are below 80% of life and when you are not moving if (ObjectManager.Me.HealthPercent <= 80 && !ObjectManager.Me.GetMove) { // Do your stuff... } Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36166 Share on other sites More sharing options...
Matenia 628 Posted December 4, 2017 Share Posted December 4, 2017 // are below 80% of life and when you are not moving if (ObjectManager.Me.HealthPercent <= 80 && !ObjectManager.Me.GetMove) { //Heavy Linen Bandage MovementMananager.StopMoveTo(false, 10000); ItemsManager.UseItem(2581); Thread.Sleep(Usefuls.Latency); Usefuls.WaitIsCasting(); } Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36187 Share on other sites More sharing options...
Hatmud 7 Posted December 4, 2017 Share Posted December 4, 2017 But something fails, you have to do it when you're not in combat Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36195 Share on other sites More sharing options...
Matenia 628 Posted December 4, 2017 Share Posted December 4, 2017 // are below 80% of life and when you are not moving if (ObjectManager.Me.HealthPercent <= 80 && !ObjectManager.Me.GetMove && !ObjectManager.Me.InCombat) { //Heavy Linen Bandage MovementMananager.StopMoveTo(false, 10000); ItemsManager.UseItem(2581); Thread.Sleep(Usefuls.Latency); Usefuls.WaitIsCasting(); } Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36196 Share on other sites More sharing options...
Hatmud 7 Posted December 6, 2017 Share Posted December 6, 2017 You could have the complete code. I've tried that and it does not work Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36303 Share on other sites More sharing options...
iMod 99 Posted December 6, 2017 Share Posted December 6, 2017 3 hours ago, Hatmud said: You could have the complete code. I've tried that and it does not work This is written right out of the mind and should work. Your infos about what is not working are a bit rare. Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36313 Share on other sites More sharing options...
Hatmud 7 Posted December 7, 2017 Share Posted December 7, 2017 The code that I put if it works correctly. I just have to see why you do not stop to use the bandages and use them at 80% of life. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ComponentModel; using System.Diagnostics; using System.Threading; using robotManager.Helpful; using robotManager.Products; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; public class Main : wManager.Plugin.IPlugin { private bool isRunning; private BackgroundWorker pulseThread; private static WoWLocalPlayer Me = ObjectManager.Me; public void Start() { pulseThread = new BackgroundWorker(); pulseThread.DoWork += Pulse; pulseThread.RunWorkerAsync(); } public void Pulse(object sender, DoWorkEventArgs args) { try { while (isRunning) { if (!Products.InPause && Products.IsStarted) { if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(14530) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(14530); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(14529) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(14529); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(3531) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(3531); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(3530) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(3530); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(6451) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(6451); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(6450) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(6450); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(3531) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(3531); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(3530) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(3530); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(2581) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(2581); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } else if (!ObjectManager.Me.IsMounted && ItemsManager.HasItemById(1251) && !ObjectManager.Me.IsDeadMe) { ItemsManager.UseItem(1251); Logging.WriteDebug("Using consumable bandage"); Thread.Sleep(Usefuls.Latency + 1000); } } Thread.Sleep(20000); } } catch (Exception ex) { } } public void Dispose() { try { isRunning = false; } catch (Exception e) { } } public void Initialize() { isRunning = true; Start(); } public void Settings() { } } Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36320 Share on other sites More sharing options...
iMod 99 Posted December 7, 2017 Share Posted December 7, 2017 And what exacly is the problem? The code you need is posted and you just need to include it into yours. Or is the problem that it is a copy & paste and you don't know C#? Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36332 Share on other sites More sharing options...
Hatmud 7 Posted December 7, 2017 Share Posted December 7, 2017 The code I used is a copy of another one. It is used for scrolling, it works well. But you just need to make the modification that I mention. I have not programmed in C # for a long time Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36333 Share on other sites More sharing options...
iMod 99 Posted December 7, 2017 Share Posted December 7, 2017 (edited) using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ComponentModel; using System.Diagnostics; using System.Threading; using robotManager.Helpful; using robotManager.Products; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; public class Main : wManager.Plugin.IPlugin { private bool isRunning; private BackgroundWorker pulseThread; public void Start() { pulseThread = new BackgroundWorker(); pulseThread.DoWork += Pulse; pulseThread.RunWorkerAsync(); } public void Pulse(object sender, DoWorkEventArgs args) { try { // Loop while (isRunning) { // Valid? if (!Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Fight.InFight && !ObjectManager.Me.IsMounted && ObjectManager.Me.HealthPercent <= 80) { uint[] items = new uint[] { 14530, 14529, 3531, 3530, 6451, 6450, 3531, 3530, 2581, 1251 }; uint? currentItemID = null; // Get itemID foreach (uint itemID in items) { // Exists? if (ItemsManager.HasItemById(itemID)) { // Set currentItemID = itemID; break; } } // Any? if (currentItemID.HasValue) { // Stop moving MovementManager.StopMoveTo(false, 10000); // Use item ItemsManager.UseItem(currentItemID.Value); Logging.WriteDebug("Using consumable bandage"); // Wait Thread.Sleep(Usefuls.Latency); Usefuls.WaitIsCasting(); } } // Wait Thread.Sleep(20000); } } catch (Exception ex) { Logging.WriteError(ex.ToString()); } } public void Dispose() { try { isRunning = false; this.pulseThread.Dispose(); } catch (Exception ex) { Logging.WriteError(ex.ToString()); } } public void Initialize() { isRunning = true; Start(); } public void Settings() { } } Edited December 7, 2017 by iMod Matenia 1 Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36336 Share on other sites More sharing options...
Hatmud 7 Posted December 7, 2017 Share Posted December 7, 2017 Good. I have tried the code that you have put, but it does not use the bandages. Thank you very much for your help. Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36349 Share on other sites More sharing options...
iMod 99 Posted December 7, 2017 Share Posted December 7, 2017 (edited) 3 minutes ago, Hatmud said: Good. I have tried the code that you have put, but it does not use the bandages. Thank you very much for your help. Just add loggings and make sure it finds the items. I can't test that stuff since i'm at work. Edited December 7, 2017 by iMod Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36350 Share on other sites More sharing options...
Hatmud 7 Posted December 8, 2017 Share Posted December 8, 2017 Could you check your code ?. Thank you Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36385 Share on other sites More sharing options...
iMod 99 Posted December 8, 2017 Share Posted December 8, 2017 5 minutes ago, Hatmud said: Could you check your code ?. Thank you I did and it looks fine for me. As i said add some logging lines and check by yourself what part is not working. If you are not able to work with this peace of code i'm sorry and you need to pay someone who creates the stuff for you. Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36386 Share on other sites More sharing options...
Hatmud 7 Posted December 8, 2017 Share Posted December 8, 2017 Thank you for your help and for your last comment. I've made it work. Link to comment https://wrobot.eu/forums/topic/6661-force-bot-to-eat-first-aid/#findComment-36399 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