Memus
-
Posts
13 -
Joined
-
Last visited
Content Type
Forums
Articles
Bug Tracker
Downloads
Store
Posts posted by Memus
-
-
58 minutes ago, zatvorgt said:
I opened this theme!is realy actual becouse exist servers with max 4 yards for interract distance and wrobot when go to repair - stuck becouse he stop moving on 5 yards and have "bad interract distance " spam
You're mixing WoWUnit up with WoWGameObject type.
-
Yeah, but that's not what I'm after.
1. I wan't to see if an object has a quest available with the NpcMarker property.
2. I wan't to know if we're within interact distance of the object to interact and accept the quest.
GetDistance isn't reliable since objects can vary ALOT in size.
For ex. 4 yards might be perfect for smaller object but unreachable for bigger objects (if the objects radius is wider that 4 yards).
An alternative to implementing IsGoodInteractDistance for WoWGameObject can be if WRobot can tell us the size (radius) of the object so we can implement it ourselves.Clearer now? :)
-
31 minutes ago, The Smokie. said:
Hello @Memus
to interact with object, you can use one if these run code methods.
wManager.Wow.Bot.Tasks.GoToTask.ToPosition(new Vector3(x, y, z)); wManager.Wow.Helpers.Interact.InteractGameObject(ObjectManager.GetWoWGameObjectByEntry(object ID).FirstOrDefault().GetBaseAddress) Or wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithGameObject(pos, objectId);
Both should work fine.
Thanks, but please read my post again ?
-
Would be super if you could implement NpcMarker and IsGoodInteractDistance for the type WoWGameObject?
Thanks :) -
23 minutes ago, Matenia said:
Because target guid is a static offset in WotLK.
ObjectManager.Me.Target = unit.Guid;
works, or if you want to set mouseover:
private static void SetMouseoverGuid(ulong guid) { switch (Usefuls.WowVersion) { case 5875: Memory.WowMemory.Memory.WriteUInt64((uint)Memory.WowMemory.Memory.MainModuleAddress + 0x74E2C8, guid); break; case 8606: Memory.WowMemory.Memory.WriteUInt64((uint)Memory.WowMemory.Memory.MainModuleAddress + 0x86E950, guid); break; case 12340: Memory.WowMemory.Memory.WriteUInt64((uint) 0x00BD07A0, guid); break; default: throw new Exception("Wow version is not supported!"); } } private static void SetMouseoverUnit(WoWUnit unit) { SetMouseoverGuid(unit.Guid); } public static void Target(WoWUnit unit) { ulong guid = unit.Guid; if (guid == 0) { return; } ulong tmp = Memory.WowMemory.Memory.ReadUInt64((uint)Memory.WowMemory.Memory.MainModuleAddress + 0x74E2C8); SetMouseoverUnit(unit); Lua.LuaDoString(@"TargetUnit(""mouseover"");"); //do something here SetMouseoverUnit(tmp); }
ObjectManager.Me.Target = unit.Guid; Triggers interact/autoattack on hostile/neutral unit which is too annoying to live with. The Mouseover solution is what I'm using right now but I consider that as an workaround. I want a clean solution, as in Vanilla with the inject code.
-
On 11/17/2017 at 4:51 PM, iMod said:
Targeting by guid for vanilla (not tested)
private static readonly object LockTargeting = new object(); public static void TargetUnit(ulong guid) { // Allocate memory for the target guid uint alloc = Memory.WowMemory.Memory.AllocateMemory(8); // Write guid Memory.WowMemory.Memory.WriteUInt64(alloc, guid); // Create asm string[] asm = new string[] { $"mov ecx, {alloc}", $"call {0x489A40}", Memory.WowMemory.RetnToHookCode }; lock (LockTargeting) { // Execute Memory.WowMemory.InjectAndExecute(asm); } // Free memory Memory.WowMemory.Memory.FreeMemory(alloc); }
Got a working example of this for 3.3.5a?
Changing $"call {0x489A40}" to $"call {0x524BF0}" does not suffice :S -
Thanks mate!
I tried that approach but i didn't work...
And know I see why...
As sloppy as I am, I used "System.Windows.Forms.Keys.Shift" instead of "System.Windows.Forms.Keys.ShiftKey"
Embarassing :S -
I have the same problem.
Any working solution? -
Nevermind.
Found the Engine.StartEngine ignoreIfAlreadyLaunched parameter :) -
This code:
engine = new Engine(false);
engine.States.Add(new SpellState("Power Word: Fortitude", 11, c => !ObjectManager.Me.HaveBuff("Power Word: Fortitude"), true, false));
engine.States.Add(new SpellState("Divine Spirit", 10, c => !ObjectManager.Me.HaveBuff("Divine Spirit"), true, false));
engine.StartEngine(15);Only the first/highest prioritized SpellState gets evaluated...
No matter what.
How can I make the engine process more than one state of a particular type? -
-
Hi.
I can't find a target method for WoWUnit.
So how about a WoWUnit.Target()?
A wish for implementation of two useful methods
in Developers assistance
Posted
Nothing on this?
Since both WoWUnit and WoWGameObject are derived from WoWObject maybe IsGoodInteractDistance and NpcMarker should be declared and implemented by WoWObject?
Both are clearly visualized in-game. Highlighted cogwheel cursor and big exclamation/question mark above object.