Zurkernine 0 Posted September 12, 2019 Share Posted September 12, 2019 I'm wondering if it is possible to use mount only when the bot get out of grinder to go sell stuff while ignoring the mobs along the way that are not targets in profile? Link to comment https://wrobot.eu/forums/topic/11620-using-mounts-only-to-sell-stuff/ Share on other sites More sharing options...
AlexTheCarMan 4 Posted September 12, 2019 Share Posted September 12, 2019 (edited) Here is a simple plugin that i made for you. (Untested.) using System; using robotManager.Helpful; using wManager.Wow.Helpers; using System.Threading; using System.ComponentModel; using wManager.Wow.ObjectManager; using System.IO; using robotManager; using wManager.Plugin; public class Main : IPlugin { bool loaded; public void Initialize() { MountVender.Load(); loaded = true; while(loaded) { try { robotManager.Events.FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += (engine, state, cancelable) => { if (state.DisplayName == "To Town" && MountVender.CurrentSetting.MountName != string.Empty && !ObjectManager.Me.HaveBuff(MountVender.CurrentSetting.MountName) && ObjectManager.Me.Level >= 20) { SpellManager.CastSpellByNameLUA(MountVender.CurrentSetting.MountName); Thread.Sleep(2000); } }; } catch { } Thread.Sleep(100); } } public void Dispose() { loaded = false; } public void Settings() { MountVender.Load(); MountVender.CurrentSetting.ToForm(); MountVender.CurrentSetting.Save(); } } [Serializable] public class MountVender : Settings { [DefaultValue(1000)] [Category("Mount")] [DisplayName("Name")] [Description("Mount Name you wish to use.")] public string MountName { get; set; } private MountVender() { MountName = ""; ConfigWinForm( new System.Drawing.Point(300, 400), "ExamplePlugin " + Translate.Get("Settings") ); } public static MountVender CurrentSetting { get; set; } public bool Save() { try { return Save(AdviserFilePathAndName("MountVender", ObjectManager.Me.Name + "." + Usefuls.RealmName)); } catch (Exception e) { Logging.WriteError("MountVender > Save(): " + e); return false; } } public static bool Load() { try { if (File.Exists(AdviserFilePathAndName("MountVender", ObjectManager.Me.Name + "." + Usefuls.RealmName))) { CurrentSetting = Load<MountVender>( AdviserFilePathAndName("MountVender", ObjectManager.Me.Name + "." + Usefuls.RealmName)); return true; } CurrentSetting = new MountVender(); } catch (Exception e) { Logging.WriteError("MountVender > Load(): " + e); } return false; } } or if you want to use the normal settings of wrobot use this instead. while(loaded) { try { robotManager.Events.FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += (engine, state, cancelable) => { if (state.DisplayName == "To Town" && MountVender.CurrentSetting.MountName != string.Empty && !ObjectManager.Me.HaveBuff(MountVender.CurrentSetting.MountName) && ObjectManager.Me.Level >= 20) { SpellManager.CastSpellByNameLUA(MountVender.CurrentSetting.MountName); Thread.Sleep(2000); } else if (state.DisplayName == "To Town" && wManager.wManagerSetting.CurrentSetting.GroundMountName != string.Empty && !ObjectManager.Me.HaveBuff(wManager.wManagerSetting.CurrentSetting.GroundMountName) && ObjectManager.Me.Level >= 20) { SpellManager.CastSpellByNameLUA(wManager.wManagerSetting.CurrentSetting.GroundMountName); Thread.Sleep(2000); } }; } catch { } Thread.Sleep(100); } Edited September 13, 2019 by AlexTheCarMan Added wManager.wManagerSetting.CurrentSetting mount option. Zurkernine 1 Link to comment https://wrobot.eu/forums/topic/11620-using-mounts-only-to-sell-stuff/#findComment-55823 Share on other sites More sharing options...
Zurkernine 0 Posted September 13, 2019 Author Share Posted September 13, 2019 Thanks for that, rly, very kind of you to put all this work into this. But Im such a noob, where am I supose to use this? should I create a Plugin or something else? Should I insert my mount name somewhere? Link to comment https://wrobot.eu/forums/topic/11620-using-mounts-only-to-sell-stuff/#findComment-55824 Share on other sites More sharing options...
AlexTheCarMan 4 Posted September 13, 2019 Share Posted September 13, 2019 14 minutes ago, Uhtredsson said: Thanks for that, rly, very kind of you to put all this work into this. But Im such a noob, where am I supose to use this? should I create a Plugin or something else? Should I insert my mount name somewhere? download mount plugin, move into plugin file within wrobot/Plugin/Here Mount Plugin.cs Zurkernine 1 Link to comment https://wrobot.eu/forums/topic/11620-using-mounts-only-to-sell-stuff/#findComment-55825 Share on other sites More sharing options...
Zurkernine 0 Posted September 13, 2019 Author Share Posted September 13, 2019 I took the test, and apparently what happens is that when I get to the Grinder area my character keeps summoning the mount before enganing mobs, hence doing the same the bot already does. Link to comment https://wrobot.eu/forums/topic/11620-using-mounts-only-to-sell-stuff/#findComment-55826 Share on other sites More sharing options...
AlexTheCarMan 4 Posted September 13, 2019 Share Posted September 13, 2019 Can you provide me with your logs? Link to comment https://wrobot.eu/forums/topic/11620-using-mounts-only-to-sell-stuff/#findComment-55827 Share on other sites More sharing options...
Zurkernine 0 Posted September 13, 2019 Author Share Posted September 13, 2019 Sure, there you go: 13 set 2019 03H08.log.html Link to comment https://wrobot.eu/forums/topic/11620-using-mounts-only-to-sell-stuff/#findComment-55828 Share on other sites More sharing options...
AlexTheCarMan 4 Posted September 13, 2019 Share Posted September 13, 2019 UseGroundMount = True turn off ground mount in settings. Link to comment https://wrobot.eu/forums/topic/11620-using-mounts-only-to-sell-stuff/#findComment-55834 Share on other sites More sharing options...
Zurkernine 0 Posted September 13, 2019 Author Share Posted September 13, 2019 I've done, disabled everything under mount tab, and still happens what I reported. Link to comment https://wrobot.eu/forums/topic/11620-using-mounts-only-to-sell-stuff/#findComment-55837 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