result of address <classMemory>RHCP Topic is solved

Ask gaming related questions (AHK v1.1 and older)
theon
Posts: 124
Joined: 23 Jun 2019, 15:39

result of address <classMemory>RHCP

03 Mar 2021, 15:38

I made a script where he finds the name of the monsters Now I need help with a part of the script
ReadEOClient% A_Index%: = mem.readString (mem.BaseAddress + 0x55B11C, 15, utf-8, Offset% A_Index% *) what would be the base addres here numeric?
Spoiler
Spoiler

because with the result of ReadEOClient + 18,find the life of the creature
plus 18 is not an offset but a variable addres that according to the result x + 18 = life
see my code

Code: Select all

#Include <classMemory>
#SingleInstance,Force
#NoEnv
#WinActivateForce ; need to test it

SetTitleMatchMode, RegEx
#Warn All, Off    ; #Warn eables warnings to assist with detecting common errors, while "all, off" makes them all disabled
#Persistent

SendMode InputThenPlay
global food

Gui, add, Text, x20 y20 w70 h40 vchar,
Gui, add, Text, x20 y40 w70 h40 vchar2,
Gui, add, Text, x20 y60 w70 h40 vchar3, 
Gui, add, Text, x20 y80 w70 h40 vchar4,
Gui, add, Text, x20 y100 w70 h40 vchar5,
Gui, add, Text, x130 y20 w70 h40 vchar6,
Gui, add, Text, x130 y40 w70 h40 vchar7,
Gui, add, Text, x130 y60 w70 h40 vchar8,
Gui, add, Text, x130 y80 w70 h40 vchar9,
Gui, add, Text, x130 y100 w70 h40 vchar10,
Gui, add, Text, x130 y120 w70 h40 vchar11,

Gui +LastFound +AlwaysOnTop
Gui Show, w400 h200, Elder Bot - LOGar Maker  V.1.1
return

5::
	life:= mem.read(mem.ReadEOClient1 + 0x1c, "int")
	MsgBox, % life
return

1::SetTimer casa, 500

casa:
	Loop 11 ; Para criarmos 10 arrays
	{
		OFFSET_ATUAL := A_Index ; Salvamos o valor da iteração atual do loop externo para poder usá-lo dentro do loop interno abaixo.
		Offset%OFFSET_ATUAL% := [0xC, 0xF4] ; Iniciamos com o modelo básico da array
		Loop % A_Index ; E aí vamos fazer um loop pelo número da iteração atual
			Offset%OFFSET_ATUAL%.InsertAt(1, 0x0) ; Para inserir tantos elementos 0x0 quanta for a iteração atual (por exemplo, na 5a iteração, inseriremos 5 elementos 0x0)
	}
	loop, 11
	{
		OFFSET1_ATUAL := A_Index ; Salvamos o valor da iteração atual do loop externo para poder usá-lo dentro do loop interno abaixo.
		Offset1%OFFSET_ATUAL1% := [0xC, 0xF4] ; Iniciamos com o modelo básico da array
		Loop % A_Index ; E aí vamos fazer um loop pelo número da iteração atual
			Offset1%OFFSET_ATUAL1%.InsertAt(1, 0x0) ; Para inserir tantos elementos 0x0 quanta for a iteração atual (por exemplo, na 5a iteração, inseriremos 5 elementos 0x0)
	}

	mem := new _ClassMemory("ahk_exe client_dx.exe")
	if !isObject(mem)
	{
		msgbox failed to open a handle
		return
	}

	Loop 11
	{
		ReadEOClient%A_Index% := mem.readString(mem.BaseAddress + 0x55B11C, 15, "utf-8",  Offset%A_Index%*)
		GuiControl,,char%A_Index%, % ReadEOClient%A_Index%
	}

	loop,11
		if (StrLen(ReadEOClient%A_Index%) > 2)
			if  NOT ((ReadEOClient%A_Index% = "Rat") OR (ReadEOClient%A_Index% = "Kod"))
				FileAppend, % ReadEOClient%A_Index% , FileNo.txt
return

desloger() { ; doesn't appear to be used
	loop, 5
	ControlSend,, {Ctrl Down}q{Ctrl Up},
}

GuiClose:
ExitApp
return

Code: Select all

life: = mem.read (mem.ReadEOClient1 + 18, "int",)
I need to add the client's addres with 18
plz help me !!!!

:rainbow: :beer:
Last edited by theon on 05 Mar 2021, 08:25, edited 4 times in total.
theon
Posts: 124
Joined: 23 Jun 2019, 15:39

Re: result of address

03 Mar 2021, 21:35

help me plz :(
User avatar
boiler
Posts: 17390
Joined: 21 Dec 2014, 02:44

Re: result of address

03 Mar 2021, 22:04

If this is your actual code:

Code: Select all

life: = mem.read (mem.ReadEOClient1 + 18, "int",)
...then you need to remove the space before the open parenthesis.
theon
Posts: 124
Joined: 23 Jun 2019, 15:39

Re: result of address

03 Mar 2021, 22:16

it doesn't work anymore
theon
Posts: 124
Joined: 23 Jun 2019, 15:39

Re: result of address

03 Mar 2021, 22:17

I wanted to add ReadEOClient1 +18 to have the result of life you saw the photos
User avatar
boiler
Posts: 17390
Joined: 21 Dec 2014, 02:44

Re: result of address

03 Mar 2021, 22:48

I’m not sure what you’re saying. Does your code still have a space or not?

Code: Select all

life: = mem.read (mem.ReadEOClient1 + 18, "int",) ; has a space that needs to be removed
life: = mem.read(mem.ReadEOClient1 + 18, "int",)  ; corrected
theon
Posts: 124
Joined: 23 Jun 2019, 15:39

Re: result of address

03 Mar 2021, 23:01

you did not understand what I meant what would be the function to add the value of my base + 18
User avatar
boiler
Posts: 17390
Joined: 21 Dec 2014, 02:44

Re: result of address

03 Mar 2021, 23:04

You’re right. I don’t understand. Did you remove the space I pointed out must be removed or not?
theon
Posts: 124
Joined: 23 Jun 2019, 15:39

Re: result of address

03 Mar 2021, 23:06

yes, but nothing happens = x
theon
Posts: 124
Joined: 23 Jun 2019, 15:39

Re: result of address

03 Mar 2021, 23:07

Code: Select all

Loop 11 ; Para passarmos todas as 10 arrays criadas.
{

	ReadEOClient%A_Index% := mem.readString(mem.BaseAddress + 0x55B11C , 15, utf-8,  Offset%A_Index%*)
		GuiControl,,char, %life%
		GuiControl,,char, %life%
		GuiControl,,char3, %life%
		GuiControl,,char4, %ReadEOClient4%
		GuiControl,,char5, %ReadEOClient5%
		GuiControl,,char6, %ReadEOClient6%
		GuiControl,,char7, %ReadEOClient7%
		GuiControl,,char8, %ReadEOClient8%
		GuiControl,,char9, %ReadEOClient9%
		GuiControl,,char10, %ReadEOClient10%
		GuiControl,,char11, %ReadEOClient11%
		life := mem.read(ReadEOClient3 + 18, "handle")  ; corrected
}
[Mod edit: [code][/code] tags added.]
User avatar
boiler
Posts: 17390
Joined: 21 Dec 2014, 02:44

Re: result of address

03 Mar 2021, 23:11

All I was pointing out was the syntax error. Now that you fixed that and you still have a problem, perhaps someone familiar with the ClassMemory class can help.
theon
Posts: 124
Joined: 23 Jun 2019, 15:39

Re: result of address

03 Mar 2021, 23:12

um, thanks will there be someone who can help me?
User avatar
boiler
Posts: 17390
Joined: 21 Dec 2014, 02:44

Re: result of address

03 Mar 2021, 23:15

The members answer questions on a volunteer basis, so I can’t say. It depends on whether someone who has the knowledge and experience with this happens to see the thread. It’s not like there is a staff that gets threads assigned to them.
theon
Posts: 124
Joined: 23 Jun 2019, 15:39

Re: result of address

03 Mar 2021, 23:19

thank you very much, I hope a good soul will help me
User avatar
boiler
Posts: 17390
Joined: 21 Dec 2014, 02:44

Re: result of address

03 Mar 2021, 23:27

This line appears to have an error:

Code: Select all

ReadEOClient%A_Index% := mem.readString(mem.BaseAddress + 0x55B11C , 15, utf-8,  Offset%A_Index%*)
utf-8 should be in quotes:

Code: Select all

ReadEOClient%A_Index% := mem.readString(mem.BaseAddress + 0x55B11C , 15, "utf-8",  Offset%A_Index%*)
I have no idea if that method might work anyway when that parameter has an incorrect or unexpected value, but it should be fixed.
theon
Posts: 124
Joined: 23 Jun 2019, 15:39

Re: result of address

03 Mar 2021, 23:59

I changed more even so it didn't work I need someone who understands classmemory
theon
Posts: 124
Joined: 23 Jun 2019, 15:39

Re: result of address <classMemory>

04 Mar 2021, 08:13

I've tried everything and I didn't succeed
plz help me !..
thx

Code: Select all

Loop 11
{

    life:= mem.read(ReadEOClient%A_Index% + 1c)
	ReadEOClient%A_Index% := mem.readString(mem.BaseAddress + 0x55B11C, 15, "utf-8",  Offset%A_Index%*)
		GuiControl,,char, %ReadEOClient1%
		GuiControl,,char, %ReadEOClient2%
		GuiControl,,char3, %ReadEOClient3%
		GuiControl,,char4, %ReadEOClient4%
		GuiControl,,char5, %ReadEOClient5%
		GuiControl,,char6, %ReadEOClient6%
		GuiControl,,char7, %ReadEOClient7%
		GuiControl,,char8, %ReadEOClient8%
		GuiControl,,char9, %ReadEOClient9%
		GuiControl,,char10, %ReadEOClient10%
		GuiControl,,char11, %ReadEOClient11%
		life:= mem.read(ReadEOClient1 + 1c "int")
   
MsgBox, % life
}
User avatar
boiler
Posts: 17390
Joined: 21 Dec 2014, 02:44

Re: result of address <classMemory>

04 Mar 2021, 09:04

In two places, you have + 1c, which is not correct. It appears you are trying to add the hex value 1c. That would have to be either + 0x1c or + 28. Otherwise, you are adding the value of the variable named 1c, which would have a null value.

You are also missing a comma between parameters here:

Code: Select all

life:= mem.read(ReadEOClient1 + 1c "int")
Needs to be

Code: Select all

life:= mem.read(ReadEOClient1 + 0x1c, "int")

You have to make sure all the syntax is correct before anything else.
theon
Posts: 124
Joined: 23 Jun 2019, 15:39

Re: result of address <classMemory>

04 Mar 2021, 09:13

I changed more, nothing happens.
User avatar
boiler
Posts: 17390
Joined: 21 Dec 2014, 02:44

Re: result of address <classMemory>

04 Mar 2021, 09:16

Also, in the code below and in the first script you posted, you are using the value of ReadEOClient1, 2, etc., before you have assigned them values. In the first script, there is a loop that uses them before the loop that assigns them, and in the code below, you are using them inside the loop before they are assigned, both in the life := line and in the GuiControl lines.

Code: Select all

 Loop 11
{

    life:= mem.read(ReadEOClient%A_Index% + 1c)
	ReadEOClient%A_Index% := mem.readString(mem.BaseAddress + 0x55B11C, 15, "utf-8",  Offset%A_Index%*)
		GuiControl,,char, %ReadEOClient1%
		GuiControl,,char, %ReadEOClient2%
		GuiControl,,char3, %ReadEOClient3%
		GuiControl,,char4, %ReadEOClient4%
		GuiControl,,char5, %ReadEOClient5%
		GuiControl,,char6, %ReadEOClient6%
		GuiControl,,char7, %ReadEOClient7%
		GuiControl,,char8, %ReadEOClient8%
		GuiControl,,char9, %ReadEOClient9%
		GuiControl,,char10, %ReadEOClient10%
		GuiControl,,char11, %ReadEOClient11%
		life:= mem.read(ReadEOClient1 + 1c "int")
   
MsgBox, % life
}

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 88 guests