After completing the platform(mem reading, key and mouse posts,skills and settings, and most logic) for my bot(personal project i run to endure my C# and reverse skills), i was in the process to write some logic for combat and few specific scopes, and i felt in a problem i cant solve since 7 days (my summer vacation).
Now my vacation are running out, and after have read tons and tons of shit in the quest to learn it, i ended telling myself to ask.
I'm trying to find enemy without the need to target them (i already can get DispositionToTarget), but it ended that the best solution is to call LUA function GetDispositionTo
as described here .
Not being able to call LUA function, i decided i for now can live knowing the Unit Faction, and it ended being another LUA function.
And like those, many other suffs i wish i can use are function.
Can someone pls give me some idea of how should i call a LUA function with C#?
I'm really confused about what istruction (should i just write some intPtr in the process memory and read the output from somewhere)
For exemple:
this are the most recent Function call posted:
I Set my target writing directly the ID if the Unit i want to target to my Target ID, and it work, i don't call the function SetTarget, is dirty, ugly stinky, but work.Code:enum Functions { RegisterEvent = 0x179DD0, UnregisterEvent = 0x17A240, SetTarget = 0x4EF5E0, PerformAction = 0x455140, VacuumLoot = 0x378670, ClickToMove = 0x4832D0, }
This is my Click to move....call it function
But the Address i use are nowhere near the Standard ClickToMove function you all report, my address are:Code:public void move(Vector4 v4) { IntPtr g = gamemanagerptr(); Game.memory.Write<float>(g + (int)GameManager.movements.ClickToMoveX, v4.x); Game.memory.Write<float>(g + (int)GameManager.movements.ClickToMoveY, v4.y); Game.memory.Write<float>(g + (int)GameManager.movements.ClickToMoveZ, v4.z); byte[] data = { 0x00, 0x00, 0x00, 0x00 }; Game.memory.WriteBytes(g + (int)GameManager.movements.ClickToMoveGo, data); }
(So you now know my special address call it a contrib. )Code:enum Global { pGameManager = 0xAB7B48, //ok pSpellManager = 0xAB8930, //ok (1..10 skills manager) pInnateManager = 0xAD8DB0, // ok (innate ability manager) pSkillXManager = 0xAD8E78 // ok (X ability manager) }; enum movements { ClickToMoveX = 0x7540, //ok ClickToMoveY = 0x7548, //ok ClickToMoveZ = 0x7544, //ok ClickToMoveW = 0x754c, //ok ClickToMoveGo = 0x7524, //ok };
What i do is write the coordinate of the destination directly to the address the client read, and trigger the movement, all based on some address i have found (you have no idea how much time i'm spending to learn, and wildstar is neither looking so promising, but is letting me learn alot) in my long search.
Is this a LUA Function called by me magically without me knowing i were doing it?
Obviously no, i'm aware i'm not calling anything, pls what is the way to call a ingame LUA function and read the result, eventually?
If someone want to give me a lesson, i'll be gland to pay(well) for your time, send me a pm if interessed, i'm online all the day and night, and tomorrow too (last day of vacation).
Pls give me a hand.
Alcor75