Trying to find Turn Value Pointers

05/01/2012 15:59 evilimprint#1
im trying to find pointers to get the value when its my turn in battle.. i find them and then restart the game then some stay static then restart the game then they all go away... is there no way to really get turn values anymore?
05/01/2012 16:12 bitangry#2
Skirmish is "session" handled. So, each time you enter a new fight, new pointers are created, else you would have found them.
For PvE/PvP you still can find the "Your Turn flag"
I have in my mind to search for "passed turns" which should be the same in PvE and Skirmish. But not sure how to use it to your favor.
05/01/2012 17:53 evilimprint#3
is activation session controlled? like when main char gets activated?
05/01/2012 18:39 bitangry#4
Last time I tryed to find a way to know if bot could act it seemed it had no way in skirmish, because all pointers are "session" style and get created at start of fight and destroyed after it.
So, "is activation session controlled? like when main char gets activated?" AFAIK, Yes it is, but you can't find the pointers between battles, because they change with each new battle.

Try to find the "number of passed turns" pointer. It should help you do what you want. It just counts the number of turns passed, so, first turn is 0, 2nd is 1, 3rd is 2 and so on. Problem is: or you issue a command each time a turn pass, or you must find a way to know/guess when it is oponents turn and when it is your turn. Basicaly without a "your turn" flag you must issue a command each time a turn passes, or you can be sending the command the wrong turn.
Example:
You start the fight: V = 0 (your turn), V = 1 (enemy turn), V = 2 (your turn) and so on.
Enemy start the fight: V = 0 (enemy turn), V = 1 (your turn), V = 2 (enemy turn) and so on.

Also, search for the "number of passed turns" in pve fights and check if it is working for skirmish. If it does not, then it is a "session" pointer as well.
05/01/2012 19:38 evilimprint#5
i kinda got creative i set a timer in vb to get pixelchecksum of the little box that glows around the chars when they are active so that sends it is my turn and to skip turn..
05/01/2012 20:01 bitangry#6
That's a nice solution, but you have 2 major consequences of the method:
1. Each screen size demands a new coordinate to do the pixelsum
2. Pixelsums can be (a lot) time consuming.

For number 1 you can make a .Ini where you write the coordinates for each screen resolution, so, if it is listed, you use the listed value, else you ask the player to set the position with mouse and read mouse coord. Thats what I do in my bot.

For number 2, you can make it read the pixelsum only at the first turns, until you get a positive value at two turns with one false inbetween. And then you can determine the turn just based on the passed turns.
Example: V=0 (false), V=1 (false, your turn but main did not got to act), V=2 (false), V=3 (true), V=4 (false), V=5 (true). You determined odd turns are your act turns, because you got true on pixelsum at 3 and 5.
If fight takes more than 6 turns you gain time because you just need to read memory and no pixel sums needed anymore, else you would do the pixel sum anyway.

Also, pixelsum is a nice solution to determine main turn to act. I will implement it on my bot as well, as I was trying to find a way to reduce commands sent to AO client.
05/01/2012 20:22 evilimprint#7
well if you require them to use a certain res for the bot then all checksums should be the same for everyone.... what program you use to code your bot?

i also found a solution to clicking mobs that other are attacking... if you click a mob that is already in battle it moves to next mob

also i found a solution work arround so people dont need to use textmod
05/01/2012 20:32 bitangry#8
1. I use AutoIt to code my bot.

2. For mobs other ppl are attacking I just set "Battling Avatars" to "Omit" in the AO client.

3. I use a pixelchecksum to detect movement of items on screen and mouse pointer to determine if it is sword, then send a click command. It's pretty unfinished stuff, but otimized and works pretty well for me. Later on I will try to improve the search algorith for a more optimized one. I already have it in mind, but need to code and test first, and I have no time now with newborn daughter. After that, I will compare textmod solution with mine and see what to do next, or just implement both and select one according to my mood.
05/01/2012 20:34 evilimprint#9
you should really think about using another language means AutoIT is only a scripting lang when C#, VB and .NET platforms are a actual programming language
05/01/2012 20:48 bitangry#10
I like to leave it simple as it is. To learn other languages would take me too much time, and as I said I have no time atm.
BTW, what would be the difference in programing on AutoIt or any other programming languages?
05/01/2012 21:07 evilimprint#11
well first autoit you have to run a constant loop for anything to happen... with a normal programming lang you can run multiple loops at the same time to do all diffrent things at once.. like i got a loop for normal bot running... i got a loop for a checksum check on mains turn... i got a loop for chat... i got a loop for multiple whisper window's so if somone whispers you it displays there whispers in there own windows...