CLEO Help Input text

CLEO related
Status
Not open for further replies.

Caiac

New member
Joined
Apr 13, 2019
Messages
4
Reaction score
1
Hello guys, i need a dialog imput text mod cleo, to input codes like 1W44r.
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
936
Location
Lithuania
Hello guys, i just want to do a cleo mod which is typing the verify code like: Type verification code: "9fa329s"

Code:
{$CLEO .cs}

0000: NOP

wait 10000

while true
wait 0

if
0B4C:  samp is_dialog_active -1
then
    alloc 0@ 512
    0BD7: samp get_dialog_text 0@
    if
    0AD4: $NOT_USED = scan_string 0@ format "Type verification code: '%d %s %d %s %d %s'" 1@ 3@ 4@ 5@ 6@ 7@
    then
        alloc 2@ 16
        format 2@ "%d %s %d %s %d %s" 1@ 3@ 4@ 5@ 6@ 7@
        0B4B: samp set_current_dialog_editbox_text 2@
        free 2@
        0B47: samp close_current_dialog_with_button 1
    end
end

end
Take pic from your verification dialog
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
936
Location
Lithuania
PHP:
{$CLEO .cs}

0000:


REPEAT
   WAIT 0
UNTIL 0AFA:  SAMP_IS_READY 


WHILE TRUE
WAIT 0

if
0B4C:  samp is_dialog_active -1
then
    alloc 0@ 260
    0BD8: samp get_dialog_caption 0@
    if
    0C29: $NOT_USED = stristr string1 0@ string2 "Dealership:" // check dialog caption
    then
        alloc 21@ 512
        0BD7: samp get_dialog_text 21@
        call @GetCodeWithOneQuotationMark 1 WriteStringPointer 21@ ReturnCode 21@
        call @RemoveOneQuotationMark 1 WriteCode 21@  // self return
        alloc 20@ 30
        format 20@ "%s" 21@
        0B4B: samp set_current_dialog_editbox_text 20@
        free 20@
        0B47: samp close_current_dialog_with_button 1
    end
end

END 

:GetCodeWithOneQuotationMark
0C17: 31@ = strlen 0@
31@ -= 1
    for 30@ = 0 to 31@
    0A8D: 29@ = read_memory 0@ size 1 virtual_protect 1 
     
        if
        29@ == 39
        then
            0@++  
            ret 1 0@                                                        
        end    

    0@++
    end
ret 0

:RemoveOneQuotationMark
0C17: 31@ = strlen 0@
31@ -= 1
0085: 28@ = 0@
005A: 28@ += 31@ 
0085: 27@ = 0@
  for 30@ = 0@ to 28@
  0A8D: 29@ = read_memory 30@ size 1 virtual_protect 1
      if
      29@ == 39
      then
      else
      0A8C: write_memory 27@ size 1 value 29@ virtual_protect 1  
      27@++    
      end        
  end
  0A8C: write_memory 27@ size 1 value 0 virtual_protect 1
ret 0
 

Attachments

  • Test.cs
    19 KB · Views: 13
Last edited:
Status
Not open for further replies.
Top