Input text

Caiac

New Member
Joined
Apr 13, 2019
Messages
4
Likes
0
Points
1
1
#1
Hello guys, i need a dialog imput text mod cleo, to input codes like 1W44r.
 
Last edited:

Parazitas

Well-Known Member
Joined
Jan 2, 2017
Messages
873
Likes
50
Points
43
Location
Lithuania
Website
ugbase.eu
10
#2
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 [email protected] 512
    0BD7: samp get_dialog_text [email protected]
    if
    0AD4: $NOT_USED = scan_string [email protected] format "Type verification code: '%d %s %d %s %d %s'" [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
    then
        alloc [email protected] 16
        format [email protected] "%d %s %d %s %d %s" [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
        0B4B: samp set_current_dialog_editbox_text [email protected]
        free [email protected]
        0B47: samp close_current_dialog_with_button 1
    end
end

end
Take pic from your verification dialog
 

Parazitas

Well-Known Member
Joined
Jan 2, 2017
Messages
873
Likes
50
Points
43
Location
Lithuania
Website
ugbase.eu
10
#4
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 [email protected] 260
    0BD8: samp get_dialog_caption [email protected]
    if
    0C29: $NOT_USED = stristr string1 [email protected] string2 "Dealership:" // check dialog caption
    then
        alloc [email protected] 512
        0BD7: samp get_dialog_text [email protected]
        call @GetCodeWithOneQuotationMark 1 WriteStringPointer [email protected] ReturnCode [email protected]
        call @RemoveOneQuotationMark 1 WriteCode [email protected]  // self return
        alloc [email protected] 30
        format [email protected] "%s" [email protected]
        0B4B: samp set_current_dialog_editbox_text [email protected]
        free [email protected]
        0B47: samp close_current_dialog_with_button 1
    end
end

END 

:GetCodeWithOneQuotationMark
0C17: [email protected] = strlen [email protected]
[email protected] -= 1
    for [email protected] = 0 to [email protected]
    0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 1 
     
        if
        [email protected] == 39
        then
            [email protected]++  
            ret 1 [email protected]                                                        
        end    

    [email protected]++
    end
ret 0

:RemoveOneQuotationMark
0C17: [email protected] = strlen [email protected]
[email protected] -= 1
0085: [email protected] = [email protected]
005A: [email protected] += [email protected] 
0085: [email protected] = [email protected]
  for [email protected] = [email protected] to [email protected]
  0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 1
      if
      [email protected] == 39
      then
      else
      0A8C: write_memory [email protected] size 1 value [email protected] virtual_protect 1  
      [email protected]++    
      end        
  end
  0A8C: write_memory [email protected] size 1 value 0 virtual_protect 1
ret 0
 

Attachments

Last edited:
Top