CLEO Help It is possible?

CLEO related
Status
Not open for further replies.

aPELAobr

Active member
Joined
Jan 13, 2015
Messages
185
Reaction score
0
Is it possible to create a cleo that will type what appears on the screen? It is a command to exit the afk and it always changes (obviously). The cleo needs to read the code that appears and enter it after '/ sairafk'

Print: http://imgur.com/a/msoS1
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,115
Solutions
5
Reaction score
878
Location
Lithuania
supahdupahnubah said:
@Parazitas IIRC this string is stored in 0xBAAE70

So the code should be something like this.
@supahdupahnubah

[shcode=cpp]

{$CLEO .cs}
0000:


REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY 

WHILE TRUE
    WAIT 0
    
    0C17: 21@ = strlen 0xBAAE70
    IF 
    21@ <> 0
    THEN
        21@++
        alloc 22@ = 21@
        0C24: strncpy destination 22@ source 0xBAAE70 size 21@
        IF
        0AD4: $NOT_USED = 22@ format "/SAIRAFK %s TEMPO RESTANTE %d" 2@v $NOT_USED
        THEN
            say "/SAIRAFK %s" 2@V
            free 22@
        END
    END

END /// END WHILE TRUE


[/shcode]
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
@Parazitas good job, there might be some other strings in it, so you better compare it first with strcmp "/SAIRAFK" as an example
 

aPELAobr

Active member
Joined
Jan 13, 2015
Messages
185
Reaction score
0
Parazitas said:
supahdupahnubah said:
@Parazitas IIRC this string is stored in 0xBAAE70

So the code should be something like this.
@supahdupahnubah

[shcode=cpp]

{$CLEO .cs}
0000:


REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY 

WHILE TRUE
    WAIT 0
    
    0C17: 21@ = strlen 0xBAAE70
    IF 
    21@ <> 0
    THEN
        21@++
        alloc 22@ = 21@
        0C24: strncpy destination 22@ source 0xBAAE70 size 21@
        IF
        0AD4: $NOT_USED = 22@ format "/SAIRAFK %s TEMPO RESTANTE %d" 2@v $NOT_USED
        THEN
            say "/SAIRAFK %s" 2@V
            free 22@
        END
    END

END /// END WHILE TRUE


[/shcode] uknow opcode on 0C17 when i try compile  :-/ I tried to find 0C17 in the database and did not find it. Is that right?
 

aPELAobr

Active member
Joined
Jan 13, 2015
Messages
185
Reaction score
0
I tried the Parazita's script but it did not work :-/ As the message has a countdown from 60 seconds to the kick, I tried to add the number 58 on line 20 (0AD4: $NOT_USED = 22@ format "/SAIRAFK %s TEMPO RESTANTE 58 %d" 2@v $NOT_USED) Imagining that on arriving in 58 seconds it would send '/ sairafk' together To the code, but did not work too.
 
Status
Not open for further replies.
Top