Automation and bots

 Помощь      Поиск      Пользователи


 Страниц (1): [1]   

> Без описания
Kibor
Отправлено: 24 Июля, 2018 - 03:56:04
Post Id



Администратор
Full Member


Покинул форум
Сообщений всего: 160
Дата рег-ции: Дек. 2017  
Репутация: 0
Карма 0




Adding functions to work with the memory of the game.

findmemorymask - search for data in process memory by mask.
Used to search in the process of a non-uniform in its value data set. This type of data can be a structure.
What is a structure?This is a set of bytes that go one by one in the form of a tape in which some data of a particular object is consistently recorded. Unlike masiv, data types can be different.
In Russian:
An example of a structure describing a mob (just an example) ....

The name of the mob (set aside 20 bytes)
HP mob (4 bytes)
The position of mob X (4 bytes)
The position of the Y mob (4 bytes)
The position of mob Z (4 bytes)
Model scale in the client (4 bytes)
Transparency (4 bytes)
...

It's all about. For the restructuring (determining what data and how many bytes are in the structure) you need experience with such programs as the Cheat Engine.

The above structure in total will take 46 bytes going one by one.

After we understand what the structure of the mob is, the list of addresses of all the mob structures can be obtained with findmemorymask .
Explanation:
Determine what data structures have the same values ??for all mobs of this type ...
This will

The name of the mob (set aside 20 bytes)
HP mob (4 bytes)
... (4 bytes)
... (4 bytes)
... (4 bytes)
Model scale in the client (4 bytes)
Transparency (4 bytes)

Knowing the general data, you can create a mask and look for these 46 bytes. We need a mask in order to find exactly the known general data (they are highlighted in green) and not take into account the remaining data.
To search, 2 char-sized macros with a size of 46 bytes are used. One is a data set, another mask.
For the data, we need to fill in a 46-byte char array with known data (mob name, mob mobility, model scale in the client, transparency) in accordance with the array indices.
For the mask, we also fill the array with 46 bytes. Initialize each byte in it 0 or 1. (0 - this value is not taken into account when searching, 1 - is taken into account). That is, the numbers in the arrays where the data are found are initialized 1, the rest (which is skipped 0).

Syntax:
findmemorymask (- 1, #poisk [0], 46, #adr [0], 0, #poiskmask [0], 100, prc);
The first parameter is the number of addresses. at -1 to look for all addresses.
The second parameter: a pointer to the array char in which the data is found
Third: the number of bytes to search
fourth: a pointer to an array of receiver addresses. int or double. Read more ..
fifth: the start address of the search.
the sixth: a pointer to an array char - a mask.
seventh: the percentage (in which the search can be considered as matching, only the bytes participating in the search are counted).
the eighth: a pointer to the process.

About the 7 parameters. If a search with 100 percent fails, you can reduce the accuracy until it is found, and then sort out which data structures are not permanent ...

Returns the number of found objects.


freezememory - Writes a set of bytes to the memory of the process at the specified address and freezes them (that is, does not allow the game to change them). It works like writememory only with freezing.
Syntax:
freezememory (0, #zamen [0], 16, adr, prc);
The parameter one is the command sequence number (as in textout). This number can then unfreeze these data.
parameter two - a pointer to the array char, in which the data for replacement and freezing are recorded.
three - the number of writable and freeze bytes
four - address in memory
five - the process.

freememory (0);
Defrosts the data for the command number in freezememory - (parameter 1).



Who is familiar with the search for data in the processes and Cheat Engine or Artmoney will be much easier to understand the purpose of these functions.


////////////////////////////////////////////////////////////

Made a correction in format - copy the char char in string. Fixed copying part of the array. More in Copy the char array to string

-----
The Visual Code Editor is Kibor. Creating bots without knowledge of programming.

Learning function for recognizing text.
-----
 
 Top
Страниц (1): [1]
Сейчас эту тему просматривают: 1 (гостей: 1, зарегистрированных: 0)
« About Kibor »


Все гости форума могут просматривать этот раздел.
Только администраторы и модераторы могут создавать новые темы в этом разделе.
Только зарегистрированные пользователи могут отвечать на сообщения в этом разделе.
 




Powered by