Reading from chatlog

Status
Not open for further replies.

hacker127

Active member
Joined
Jul 17, 2019
Messages
44
Reaction score
2
Hello, I need to read from my chatlog the amount I have in my account, there are 2 ways what it says in chatlog. Here are:
[08:10:51] [ i ] {FFFFFF}10 000$ bylo zaplaceno z Vašeho bankovního účtu. Zůstatek 46 075 302$
[08:13:40] [ i ] {FFFFFF}10 000$ bylo vloženo na Váš bankovní účet. Celkem v bance 46 085 302$

I would always need to copy the final amount of the "Zůstatek" and "bance" to 11@, but I do not know how to write it, please advice.
 
Last edited:

Sam201

Well-known member
Joined
Sep 22, 2014
Messages
233
Solutions
1
Reaction score
15
If you could be more specific I think what you are looking for can be solved in a simple ahk script
 

hacker127

Active member
Joined
Jul 17, 2019
Messages
44
Reaction score
2
Specifically, I just need to copy it and write it somewhere on the screen bank account status. That's all I need.

Version: 0.3DL
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,121
Solutions
5
Reaction score
882
Location
Lithuania
PHP:
{$CLEO .cs}

0000: 

wait 10000

while true
wait 0

if
0ADC:   test_cheat "ON"
then
    if
    28@ == false
    then
        28@ = true // code enable
    else
        28@ = false // code disable
    end
end


//////////////// Allocates ////////////////
0AC8: 0@ = allocate_memory_size 145 // alloctate memory to store returned chat text

0AC8: 1@ = allocate_memory_size 145 // alloctate memory to format text
0AD3: 1@ = "Zustatek" /// a small peace of text to find  

0AC8: 2@ = allocate_memory_size 145 // alloctate memory to format text
0AD3: 2@ = "bance" /// a small peace of text to find  


0AC8: 30@ = allocate_memory_size 145 // alloctate memory to store return value

0AB1: @GetChatEntryText 1 id 99 to 0@ // 99 last line from chat
if
28@ == true
then
    if                 
    0AB1: @IfTextContains 2 mainTextPointer 0@ pieceToFindPointer 1@ _returnedPointer 30@
    then
        /// 30@ is your value
    end
    
    if                 
    0AB1: @IfTextContains 2 mainTextPointer 0@ pieceToFindPointer 2@ _returnedPointer 30@
    then
        /// 30@ is your value
    end
end

0AC9: 0@ 
0AC9: 1@
0AC9: 2@
0AC9: 30@

end


:IfTextContains
{
    0@ - the main text
    1@ - piece of text to be found within the main text
}
0AB1: @StrLen 1 strPtr 0@ _length 31@
0AB1: @StrLen 1 strPtr 1@ _length 30@

//initial length check (the phrase can't be longer than the main text)
if 001D:   30@ > 31@  // (int)
then
059A:  return_false
0AB2: ret 1 0
end

31@ -= 1
26@ = 0 // counter of the same chars in a row
for 29@ = 0 to 31@ // for each char of the main text  (29@ = index)   
    0085: 24@ = 0@ // (int)
    005A: 24@ += 29@  // (int)
    0A8D: 28@ = read_memory 24@ size 1 virtual_protect 0
    
    0085: 23@ = 1@ // (int)
    005A: 23@ += 26@  // (int)
    0A8D: 27@ = read_memory 23@ size 1 virtual_protect 0

    if 003B:   28@ == 27@  // (int)   
    then
    26@++
        if 002D:   26@ >= 30@  // (int)
        then
        0485:  return_true
        0062: 24@ -= 30@  // (int)
        24@ += 1
        0AB2: ret 1 24@
        end
    else
        if 26@ > 0
        then
        29@-- //check the same char again and assume it's the begining of the string but only if there was matching parts before (otherwise it would go back all the time and make infinite loop)
        end
    26@ = 0
    end           
end
 
059A:  return_false
0AB2: ret 1 0

:strlen
{
    Example: 0AB1: @strlen 1 string 1@ return: 3@
    In: 0@ - text;
    Out: 1@ - size;
}
for 1@ = 0 to 1024
    0A8D: 2@ = read_memory 0@ size 1 virtual_protect 0
    if not 2@ == 0
    jf break
    0@ += 1
end
0AB2: ret 1 1@

:GetChatEntryText
{
    0AC8: 0@ = allocate_memory_size 145
    0AB1: @getChatEntryText 1 id 99 to 0@ 
    0.3.DL
} 
IF 0AA2: 1@ = "samp.dll"
THEN
    1@ += 0x2ACA10
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x132
    0@ *= 0xFC
    005A: 1@ += 0@
    1@ += 0x20
    0AA3: 1@
END
0AB2: ret 1 1@
 

hacker127

Active member
Joined
Jul 17, 2019
Messages
44
Reaction score
2
PHP:
{$CLEO .cs}

0000:

wait 10000

while true
wait 0

if
0ADC:   test_cheat "ON"
then
    if
    28@ == false
    then
        28@ = true // code enable
    else
        28@ = false // code disable
    end
end


//////////////// Allocates ////////////////
0AC8: 0@ = allocate_memory_size 145 // alloctate memory to store returned chat text

0AC8: 1@ = allocate_memory_size 145 // alloctate memory to format text
0AD3: 1@ = "Zustatek" /// a small peace of text to find 

0AC8: 2@ = allocate_memory_size 145 // alloctate memory to format text
0AD3: 2@ = "bance" /// a small peace of text to find 


0AC8: 30@ = allocate_memory_size 145 // alloctate memory to store return value

0AB1: @GetChatEntryText 1 id 99 to 0@ // 99 last line from chat
if
28@ == true
then
    if                
    0AB1: @IfTextContains 2 mainTextPointer 0@ pieceToFindPointer 1@ _returnedPointer 30@
    then
        /// 30@ is your value
    end
   
    if                
    0AB1: @IfTextContains 2 mainTextPointer 0@ pieceToFindPointer 2@ _returnedPointer 30@
    then
        /// 30@ is your value
    end
end

0AC9: 0@
0AC9: 1@
0AC9: 2@
0AC9: 30@

end


:IfTextContains
{
    0@ - the main text
    1@ - piece of text to be found within the main text
}
0AB1: @StrLen 1 strPtr 0@ _length 31@
0AB1: @StrLen 1 strPtr 1@ _length 30@

//initial length check (the phrase can't be longer than the main text)
if 001D:   30@ > 31@  // (int)
then
059A:  return_false
0AB2: ret 1 0
end

31@ -= 1
26@ = 0 // counter of the same chars in a row
for 29@ = 0 to 31@ // for each char of the main text  (29@ = index)  
    0085: 24@ = 0@ // (int)
    005A: 24@ += 29@  // (int)
    0A8D: 28@ = read_memory 24@ size 1 virtual_protect 0
   
    0085: 23@ = 1@ // (int)
    005A: 23@ += 26@  // (int)
    0A8D: 27@ = read_memory 23@ size 1 virtual_protect 0

    if 003B:   28@ == 27@  // (int)  
    then
    26@++
        if 002D:   26@ >= 30@  // (int)
        then
        0485:  return_true
        0062: 24@ -= 30@  // (int)
        24@ += 1
        0AB2: ret 1 24@
        end
    else
        if 26@ > 0
        then
        29@-- //check the same char again and assume it's the begining of the string but only if there was matching parts before (otherwise it would go back all the time and make infinite loop)
        end
    26@ = 0
    end          
end

059A:  return_false
0AB2: ret 1 0

:strlen
{
    Example: 0AB1: @strlen 1 string 1@ return: 3@
    In: 0@ - text;
    Out: 1@ - size;
}
for 1@ = 0 to 1024
    0A8D: 2@ = read_memory 0@ size 1 virtual_protect 0
    if not 2@ == 0
    jf break
    0@ += 1
end
0AB2: ret 1 1@

:GetChatEntryText
{
    0AC8: 0@ = allocate_memory_size 145
    0AB1: @getChatEntryText 1 id 99 to 0@
    0.3.DL
}
IF 0AA2: 1@ = "samp.dll"
THEN
    1@ += 0x2ACA10
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x132
    0@ *= 0xFC
    005A: 1@ += 0@
    1@ += 0x20
    0AA3: 1@
END
0AB2: ret 1 1@
It is written in the code so that it appears somewhere on the screen and that after each change it automatically refresh?
 
Status
Not open for further replies.
Top