Arguss 0 Posted February 7, 2017 Share Posted February 7, 2017 Hi. Bot is stucked in locations. How can I make a teleport to Dalaran when bot is stucked? Link to comment https://wrobot.eu/forums/topic/5025-bot-stucked/ Share on other sites More sharing options...
Droidz 2738 Posted February 7, 2017 Share Posted February 7, 2017 Hello, use this plugin: using System.ComponentModel; using System.Threading; using System.Windows.Forms; using robotManager.Helpful; using wManager; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; public class Main : wManager.Plugin.IPlugin { const int HearthstoneItemID = 6948; const int MaxStuckCount = 3; public void Initialize() { wManager.Events.MovementEvents.OnPulseStuckResolver += MovementEventsOnOnPulseStuckResolver; Logging.Write("[HearthstoneWhenStuck] Loadded."); } public void Dispose() { Logging.Write("[HearthstoneWhenStuck] Disposed."); } public void Settings() { MessageBox.Show("[HearthstoneWhenStuck] No settings for this plugin."); } private void MovementEventsOnOnPulseStuckResolver(CancelEventArgs cancelable) { if (Statistics.Stucks >= MaxStuckCount) { Logging.WriteDebug("[HearthstoneWhenStuck] Use Hearthstone."); var o = wManagerSetting.CurrentSetting.CloseIfPlayerTeleported; wManagerSetting.CurrentSetting.CloseIfPlayerTeleported = false; MovementManager.StopMove(); Thread.Sleep(Usefuls.Latency + 150); Lua.LuaDoString("local itemName, _, _, _, _, _, _, _ = GetItemInfo("+ HearthstoneItemID + "); RunMacroText('/use ' .. itemName);"); Thread.Sleep(Usefuls.Latency + 500); if (ObjectManager.Me.IsCast) { Usefuls.WaitIsCasting(); Thread.Sleep(Usefuls.Latency + 10000); // wait load screen } wManagerSetting.CurrentSetting.CloseIfPlayerTeleported = o; Statistics.Stucks = 0; cancelable.Cancel = true; } } } You can change item id and stucks count lines 11 and 12 HearthstoneWhenStuck.cs (̾●̮̮̃̾•̃̾) ̿ ̿ ‘̿’\̵͇̿̿\ and Runaro 2 Link to comment https://wrobot.eu/forums/topic/5025-bot-stucked/#findComment-23263 Share on other sites More sharing options...
Arguss 0 Posted February 7, 2017 Author Share Posted February 7, 2017 Thank you !!! Link to comment https://wrobot.eu/forums/topic/5025-bot-stucked/#findComment-23275 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