-
Posts
288 -
Joined
-
Last visited
Recent Profile Visitors
4797 profile views
reapler's Achievements
-
star_warsik reacted to a file: EvadeHate
-
Umix1998 reacted to a file: [Holy - Paladin] The Holy Grail
-
pepsiplaya reacted to a file: SmoothMove
-
M4k5P0w3r reacted to a comment on a file: Move During Combat
-
I believe this should work: /// <summary> /// Used to get the facing from two positions based on the origin rotation. /// </summary> /// <param name="from">The 1. position.</param> /// <param name="to">The 2. position.</param> /// <param name="originRotation">The origin rotation.</param> /// <returns>Negative radian on the right; positive on the left.</returns> public float FacingCenter(WoWPoint from, WoWPoint to, float originRotation) { var face = NormalizeRadian(Atan2Rotation(from, to) - originRotation); if (face < Math.PI) return -face; return NormalizeRadian(originRotation-Atan2Rotation(from, to)); } /// <summary> /// Used to normalize the input radian. /// </summary> /// <param name="radian">The radians to normalize.</param> public float NormalizeRadian(float radian) { if (radian < 0.0) return (float) (-(- radian % (2.0 * Math.PI)) + 2.0 * Math.PI); return radian % 6.283185f; } /// <summary> /// Used to calculate atan2 of to positions. /// </summary> /// <param name="from">Position 1.</param> /// <param name="to">Position 2.</param> /// <param name="addRadian">Radians to add.</param> /// <returns></returns> public static float Atan2Rotation(WoWPoint from, WoWPoint to, float addRadian = 0) { return (float) Math.Atan2(to.Y - from.Y, to.X - from.X) + addRadian; } /// <summary> /// Used to calculate new position by parameter. /// </summary> /// <param name="from">The position to calculate from.</param> /// <param name="rotation">The rotation of the object in radians.</param> /// <param name="radius">The radius to add.</param> /// <returns></returns> public static WoWPoint CalculateNewPosition(WoWPoint from, float rotation, float radius) { return new WoWPoint(Math.Sin(rotation) * radius + from.X, Math.Cos(rotation) * radius + from.Y, from.Z); }
-
-
Pudge reacted to a post in a topic: Fight Class - Check if Target is Humanoid
-
Pudge reacted to a post in a topic: Difference between Friendly and Hostile targets condition
-
Garub reacted to a post in a topic: More questions from a novice programmer.
-
It depends, if you compile yourself any framework version should work. If you let for example WRobot compile your C# files(.cs) it will be on C# 4.0 / net framework 4.0. Prefered would be a higher version. https://stackoverflow.com/questions/247621/what-are-the-correct-version-numbers-for-c At first a small project like a plugin for WRobot is good enough to start off, later you may take other sources as reference and improve your code style, structure & performance preferably with C# projects on github or here at the download section. If the goal is to create a bot, you can also just start your own project and take other bot sources as reference. It is also advisable to google as much you can to follow the best practices and apply it to the code. Recommend tools: Visual Studio(IDE) DotPeek(Decompiler) - if you would like to view the API Recommend links: https://github.com/ - Many open source projects to explore http://stackoverflow.com - For me a good a resource on things like how to do X https://www.dotnetperls.com - Good & small code examples for handling different tasks https://docs.microsoft.com/en-us/dotnet/framework/index - C# / Net framework reference https://docs.microsoft.com/en-us/dotnet/framework/wpf/getting-started/walkthrough-my-first-wpf-desktop-application - Create your own app with Wpf Bot sources: https://github.com/miceiken/IceFlake https://github.com/tanis2000/babbot/ https://github.com/Zz9uk3/ZzukBot_V3
-
reapler reacted to a post in a topic: Unofficial WRobot API Documentation
-
Include safe-list by ID in CS foreach Iteration?
reapler replied to Paultimate's topic in Developers assistance
Hello you can use a hashset for this purpose like this: private HashSet<int> safeList = new HashSet<int> { 12345, 12346, } private void ProtectItem(WoWItem item) { safeList.Add(item.GetItemInfo.ItemId); } private void ProtectItem(int itemId) { safeList.Add(itemId); } private void PulseDestroy() { if (ButlerSettings.CurrentSetting.DestroyGray) { foreach (WoWItem item in bagItems) { if ((item.GetItemInfo.ItemRarity==0 || item.GetItemInfo.ItemRarity==1) && !safeList.Contains(item.GetItemInfo.ItemId)) { while (ObjectManager.Me.InCombat || ObjectManager.Me.IsDead) { Thread.Sleep(shortDelay); } List<int> BagAndSlot=Bag.GetItemContainerBagIdAndSlot(item.Entry); Logging.Write(ButlerPrefix+"destroying \""+item.GetItemInfo.ItemName+"\""); Lua.LuaDoString(string.Format("PickupContainerItem({0}, {1}); DeleteCursorItem()", (object) BagAndSlot[0],(object) BagAndSlot[1]),false); Thread.Sleep(shortDelay); } } } } -
On vanilla this field is a List, it should be be HashSet on all expansions.
-
reapler reacted to a comment: GetHashCode() & Equals() position implementation
-
The following classes can have these overrides implemented: Vector3 TaxiNode A correct implementation would look like this: public override int GetHashCode() { return (Position.X.GetHashCode() * 397 ^ Position.Y.GetHashCode()) * 397 ^ Position.Z.GetHashCode(); } public override bool Equals(object obj) { Node rhs = obj as Node; if (rhs == null) return false; return Position.X == rhs.Position.X && Position.Y == rhs.Position.Y && Position.Z == rhs.Position.Z; } This will enable the usage of the class in Dictionary<> and HashSet<>. These collections provide higher performance and uniqueness of each inserted element. List<> collection's behavior will stay the same.
-
reapler reacted to a comment: "[MovementManager] Think we are stuck" while stunned
-
The bug happens while the character tries to walk while stunned and this message appears "[MovementManager] Think we are stuck". I could also imagine it, it would also happen with other movement impairing effects such as roots. If the event "MovementEvents.OnSeemStuck" is registered this will be also called. If someone else would use this event for an own bug reporting, this would result in false-positive reports.
-
Botish movement improve (tips and tricks)
reapler replied to Ivkan1997's topic in General discussion
Hello, you may decompile or create project with dotpeek for the plugin and tweak it abit. The used methods are correct to turn the character(the same methods which are called for mouse turns). One problem is, wrobot is hooking endscene to execute methods of wow and this is also affected by fps, it must be also mentioned it is a safe method to do it. Injected it could calls the used methods directly with a higher ratio. Also the plugin itself is in my eyes still a prototype. A pid controller, better fps / latency dependent settings can be implemented in order to work 'ok' with endscene. -
reapler reacted to a file: [Product] Traveller
-
reapler reacted to a file: PartyBot Helper
-
reapler reacted to a review on a file: SmoothMove
-
Thank you for the kind words. To your problem, this bug may happen on low fps, high configured path-smoothness, used product/plugins/fightclass, or whether the character is riding or not. To pin the bug please describe your steps to reproduce it exactly, provide the used settings from the plugin, may include the path(A-B), using a 'xml-fightclass', disable all other plugins and a log would be also helpful. If i got time, i can hopefully investigate the bug.
-
Hello, .cs files are written in C# and allows the developer to take advantage of the full Wrobot API / Bot behavior. This means C# written routines are superior towards routines created by the fightclass editor because every action of the character can controlled by these C# routines. In case if you would like to develop yourself these fightclasses:
-
(̾●̮̮̃̾•̃̾) ̿ ̿ ‘̿’\̵͇̿̿\ started following reapler
-
Hello, you may take a look into memory mapped objects / remote procedure call(RPC). For example: https://github.com/spazzarama/SharedMemory http://csharptest.net/projects/rpclibrary/index.html These can be also installed via nuget packet manager on Visual Studio and can be binded with fody with your distributed library(fightclass / plugin). Note: RPC is rather for client / server communication but you may also exchange data via calls. If this may take abit too much effort, you can also save a file to disk(like fightclass settings) and read from another wrobot instance.