Zoki 0 Posted April 4, 2017 Share Posted April 4, 2017 Hey there. I'm relatively new to WRobot, so far I'm learning plugin writing so I can have full control on most of bot's actions. I'd like to know if there is a way to recompile plugins without reopening Wrobot every time. Is there a way to block Product (like Gatherer or Quester) pulsing so plugin could take needed actions? Thanks in advance <3 Link to comment https://wrobot.eu/forums/topic/5570-few-developer-questions/ Share on other sites More sharing options...
reapler 154 Posted April 5, 2017 Share Posted April 5, 2017 Hello and welcome to the Wrobot community! Usually you don't need to reopen Wrobot to compile the plugins(only if you add a new .cs or .dll file to the plugin directory). As soon you save the .cs or .dll file you just need to start and stop Wrobot to update it. And yes, you can block your product indirectly by events. For e.g. the movement public Vector3 POI = new Vector3(); public void Initialize()//wrobot method { MovementEvents.OnMoveToPulse += (vectors, state) => { if (POI != Vector3.Empty && MovementManager.CurrentPath.LastOrDefault() != POI) { state.Cancel = true; } }; } public void Pulse()//ticks { if (ObjectManager.Me.TargetObject.Position != Vector3.Empty && POI == Vector3.Empty && POI.DistanceTo(ObjectManager.Me.Position) > 5) { List<Vector3> Path = PathFinder.FindPath(ObjectManager.Me.Position, ObjectManager.Me.TargetObject.Position); MovementManager.Go(Path); POI = Path.LastOrDefault(); Logging.Write("Walk to :\n"+POI); } if (!ObjectManager.Me.GetMove && POI != Vector3.Empty) { List<Vector3> Path = PathFinder.FindPath(ObjectManager.Me.Position, POI); MovementManager.Go(Path); } else if (POI.DistanceTo(ObjectManager.Me.Position) < 7) { Logging.Write("Arrived clear target to go back to task"); Lua.LuaDoString("ClearTarget()"); } if (ObjectManager.Me.Target == 0) { POI = new Vector3(); } } or you switch your product which doesn't influence specific behaviors: Link to comment https://wrobot.eu/forums/topic/5570-few-developer-questions/#findComment-25437 Share on other sites More sharing options...
Zoki 0 Posted April 5, 2017 Author Share Posted April 5, 2017 Thanks a lot. I have a few more questions to ask. How can I enable\disable combat in plugin? Link to comment https://wrobot.eu/forums/topic/5570-few-developer-questions/#findComment-25467 Share on other sites More sharing options...
Droidz 2738 Posted April 5, 2017 Share Posted April 5, 2017 13 minutes ago, Zoki said: Thanks a lot. I have a few more questions to ask. How can I enable\disable combat in plugin? Link to comment https://wrobot.eu/forums/topic/5570-few-developer-questions/#findComment-25469 Share on other sites More sharing options...
Zoki 0 Posted April 5, 2017 Author Share Posted April 5, 2017 Thank you very much. I also could not find any way to load profile for current product (like Gatherer or Quester). Link to comment https://wrobot.eu/forums/topic/5570-few-developer-questions/#findComment-25478 Share on other sites More sharing options...
Zoki 0 Posted April 6, 2017 Author Share Posted April 6, 2017 Anyone? Please? I'm stuck with this Profile Load thingy. Link to comment https://wrobot.eu/forums/topic/5570-few-developer-questions/#findComment-25547 Share on other sites More sharing options...
Matenia 628 Posted April 7, 2017 Share Posted April 7, 2017 Products.ProductStop(); Products.LoadProducts(name); For changing between Quester and others. If you look at available functions in the .dll files, you'll find how to load a certain quester profile too, I'm sure. As for stopping combat: wManager.Wow.Helpers.Fight.StopFight(); Link to comment https://wrobot.eu/forums/topic/5570-few-developer-questions/#findComment-25552 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