April 4, 20179 yr 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
April 5, 20179 yr 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:
April 5, 20179 yr Author Thanks a lot. I have a few more questions to ask. How can I enable\disable combat in plugin?
April 5, 20179 yr 13 minutes ago, Zoki said: Thanks a lot. I have a few more questions to ask. How can I enable\disable combat in plugin?
April 5, 20179 yr Author Thank you very much. I also could not find any way to load profile for current product (like Gatherer or Quester).
April 7, 20179 yr 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();
Create an account or sign in to comment