-
Member
Writing bot for Vanilla WoW. I need your help.
Hi guys!
For the purpose of self-development, i decided to write a small bot for Vanilla WoW (1.12.1). But there were two difficulties:
1 - Can not get the coordinates selected target.
2 - Implement the autoloot.
I get all the data from CheatEngine, but i can not get coordinates current target using it. With an autoloot i do not know what to do. I ask for your help. Direct me in the right direction. Maybe someone has code samples. I will be grateful for any useful information.
P/S
Sorry for my english =)
-
Member
With coordinates of target have already figured out himself. I can not beat autoloot for this targets. Help me, bro ..!
-
Active Member
-
Post Thanks / Like - 2 Thanks
-
Member
Kovrizha, many thanks, buddy! I have not read it yet, but it looks like it's what need me. I'll read and try!
-
Active Member
I might have misunderstood what you mean by autoloot but cant you just send a shift down click before you loot? Ive never had a problem with that approach.
-
Originally Posted by
squiggy
I might have misunderstood what you mean by autoloot but cant you just send a shift down click before you loot? Ive never had a problem with that approach.
Vanilla (1.12.1) does not have autoloot functionality, even with shift.
-
Member
Originally Posted by
squiggy
I might have misunderstood what you mean by autoloot but cant you just send a shift down click before you loot? Ive never had a problem with that approach.
squiggy, yes, you are right, i did not say right thing. Indeed, me need to right click on target body. Could you tell me how to implement this, plz?
-
Active Member
Originally Posted by
SniffingPickles
Vanilla (1.12.1) does not have autoloot functionality, even with shift.
Oh.. are you sure? i tried it on kronos and it worked there anyway. maybe it was implemented during the end of vanilla.
Originally Posted by
djanius
squiggy, yes, you are right, i did not say right thing. Indeed, me need to right click on target body. Could you tell me how to implement this, plz?
one way is to move to the mouse cursor in a scanning pattern over the window. you can read the mouseover guid from memory and compare it with the guid of the mob youre trying to loot. once youve found it, send a rightclick.
You can control the mouse using the SendInput function in the windows api, i think Zenlulz memory lib actually has an implementation for keyboard and mouse control ready to go if youre working with c#, GitHub - ZenLulz/MemorySharp: A C# based memory editing library targeting Windows applications, offering various functions to extract and inject data and codes into remote processes to allow interoperability.
Last edited by squiggy; 03-18-2017 at 10:23 AM.
-
Post Thanks / Like - 1 Thanks
djanius (1 members gave Thanks to squiggy for this useful post)
-
Member
squiggy, thank you very much for your help. Went to try))
-
Contributor
Originally Posted by
SniffingPickles
Vanilla (1.12.1) does not have autoloot functionality, even with shift.
This is completely false, it definitely DOES have auto-loot functionality (enabled by holding down shift)
@OP: Not sure where the function is exactly but autoloot is its own function, calling it will loot all the items in the currently open loot window.
EDIT:
Code:
#define F_CGLootInfo__HasLoot 0x4c2a70
#define F_Internal_CallAutoLoot 0x4c1fa0
bool CGLootInfo__HasLoot()
{
typedef bool(__stdcall *WoWFunc__CGLootInfo__HasLoot)();
if (!WoWFunctions::IsInGame())
return false;
return WoWFunc__CGLootInfo__HasLoot(F_CGLootInfo__HasLoot)();
}
void CallAutoLoot()
{
typedef void(__stdcall *WoWFunc__CallAutoLoot)();
if (!WoWFunctions::IsInGame())
return;
WoWFunc__CallAutoLoot(F_Internal_CallAutoLoot)();
}
Last edited by Saridormi; 03-18-2017 at 10:07 AM.
Reason: formatting
-
Originally Posted by
Saridormi
This is completely false, it definitely DOES have auto-loot functionality (enabled by holding down shift)
Strange, doesn't work for me after just trying it. I wonder if there's a cvar i'm missing in config. I've been playing on vanilla wow for 6 months haha and it's never worked for me.
-
Active Member
@OP What language are you writing your bot in and do you know how to inject asm/detour to your codecave so you can call in game functions?
If you want to autoloot the best route is to call the autoloot function via asm if you aren't doing dll injection.
So
call 0x4C1FA0
This is assuming you've interacted with the object to loot
Note: I think you can just interact/loot in one with something like
"push 1",
"mov ECX, " + (uint)baseAddr <-- where baseAddr is the base address of the object/unit to interact with
"call 0x005F8660", <--call right click object function
"retn"
Last edited by pinny; 03-18-2017 at 08:08 PM.
-
Member
Originally Posted by
pinny
@OP What language are you writing your bot in and do you know how to inject asm/detour to your codecave so you can call in game functions?
If you want to autoloot the best route is to call the autoloot function via asm if you aren't doing dll injection.
So
call 0x4C1FA0
This is assuming you've interacted with the object to loot
Note: I think you can just interact/loot in one with something like
"push 1",
"mov ECX, " + (uint)baseAddr <-- where baseAddr is the base address of the object/unit to interact with
"call 0x005F8660", <--call right click object function
"retn"
I am writing bot on Delphi. How to insert asm into code of program i know. Before i applied to forum, i tried autoloot via asm, but i constantly get an error "Access violation at address 005F8664 in module 'Project1.exe'. Read of address AC37A437.".
Did just as you suggested. Can it still be inject to game?
Code:
Asm
**Push AutoLoot;
**Mov ECX, BaseAddress;
**Call OnRightClickUnit;
**Retn;
End;
-
Contributor
Originally Posted by
djanius
I am writing bot on Delphi. How to insert asm into code of program i know. Before i applied to forum, i tried autoloot via asm, but i constantly get an error "Access violation at address 005F8664 in module 'Project1.exe'. Read of address AC37A437.".
Did just as you suggested. Can it still be inject to game?
Code:
Asm
**Push AutoLoot;
**Mov ECX, BaseAddress;
**Call OnRightClickUnit;
**Retn;
End;
Code:
005F8664 8B F1 mov esi, ecx
Your ECX seems to contain 0xAC37A437 - obviously.
Did you read how to use asm in Delphi? Using Assembler in Delphi
You can use debugger too (breakpoints before the call and at 0x005F8660).
And BTW, there was a post about auto-looting already from one week ago: [WoW] 1.12.1.5875 Info Dump Thread.
Last edited by tutrakan; 03-20-2017 at 02:32 AM.
-
Contributor
Code:
int InteractObj(void *obj, int a1 = 0)
{
typedef int(__thiscall *fnInteractObj)(void *obj, int a1);
fnInteractObj InteractTheObj = (fnInteractObj)wowAddr->RightClickObj;
InteractTheObj(obj, a1);
return 0;
}
InteractObj(theObj, 1) <== 1 means shift is pressed 0 by default address at 0x5F8660
This is exact same as shift clicking that way you don't have to call interact > check for loot window open > call autoloot as this function does all of that internally
Last edited by Icesythe7; 03-19-2017 at 06:01 PM.