CLEO Help Select dialog list item problem

CLEO related
Status
Not open for further replies.

mihailescudenis

New member
Joined
Apr 13, 2017
Messages
4
Reaction score
0
Code:
{$CLEO .cs}
0000:NOP
while true
wait 0
if 
0B4C: samp is_dialog_active -1
then
    0B49: samp set_current_dialog_list_item 8 // 4th option
    0B47: samp close_current_dialog_with_button 1 //Ok/Enter
end
end
 

It doesn't select the 8th option it just close the dialog with ok
The 0B49 op code doesn't work neither in the sampfuncs console in game. What's the problem?
 

mihailescudenis

New member
Joined
Apr 13, 2017
Messages
4
Reaction score
0
It's a script for auto job can you accept me on skype?


https://www.youtube.com/watch?v=DcA1_hZfbBg&feature=youtu.be this is a video
I want to auto select "The farmer" from the list so I can stay afk and route record.
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,140
Solutions
5
Reaction score
885
Location
Lithuania
Normally set dialog list item don't work on your server , maybe server is protected, but is more different ways to do it , so i found and finished, Good luck to use.

This don't work on your server.
[shcode=cpp]
0AB1: @FAKE_KEYPRESS_GUI_SELECT 1

:FAKE_KEYPRESS_GUI_SELECT
1@ = 0xB73458
005A: 1@ += 0@  // (int)
0B49: samp set_current_dialog_list_item 1
0AB2: ret 0 
[/shcode]

When i found other method then working.
[shcode=cpp]
{$CLEO .cs}
0000:


REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY

alloc 2@ 32
format 2@ "Selecteaza destinatia:" //dialog title to detect Romania language

while true
wait 0
if
0B4C: samp is_dialog_active -1
then
    alloc 3@ 256                           
    0BD8: samp get_dialog_caption 3@ 
    if 0C14: strcmp string1 2@ string2 3@ //comparing 
    then
        free 3@
        wait 105
        0AB1: @FAKE_KEYPRESS 1 _OFFSET_KEY_ 0x28 {Down arrow}
        wait 10
        0AB1: @FAKE_KEYPRESS 1 _OFFSET_KEY_ 0x28 {Down arrow}
        wait 10
        0AB1: @FAKE_KEYPRESS 1 _OFFSET_KEY_ 0x28 {Down arrow}
        wait 10
        0AB1: @FAKE_KEYPRESS 1 _OFFSET_KEY_ 0x28 {Down arrow}
        wait 10
        0AB1: @FAKE_KEYPRESS 1 _OFFSET_KEY_ 0x28 {Down arrow}
        wait 10
        0AB1: @FAKE_KEYPRESS 1 _OFFSET_KEY_ 0x28 {Down arrow}
        wait 10
        0AB1: @FAKE_KEYPRESS 1 _OFFSET_KEY_ 0x28 {Down arrow} 
        wait 10  
        0AB1: @FAKE_KEYPRESS_GUI_ClOSE 1 _OFFSET_KEY_ 0x1E {Enter}
    end
end
wait 500
END
        
        
/////////////////////// Snipppet /////////////////////// 

/////////// Snippet for Press key Enter
:FAKE_KEYPRESS_GUI_CLOSE
1@ = 0xB73458
005A: 1@ += 0@  // (int)
0B47: samp close_current_dialog_with_button 1@ size 1 value 255 virtual_protect 0
0AB2: ret 0

/////////// Snippet for Press key Down
:FAKE_KEYPRESS
if 0AA2: 2@ = load_library "User32.dll"
then
    if 0AA4: 2@ = get_proc_address "keybd_event" library 2@
    then
        0AA5: call 2@ num_params 4 pop 0 0 0 0 0@
        wait 1@
        0AA5: call 2@ num_params 4 pop 0 0 0x02 0 0@
    end
end
0AB2: ret 0
[/shcode]
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
You're closing the dialog with button 1, which is "Close", you want to use

[shcode=cpp]
0B47: samp close_current_dialog_with_button 0
[/shcode]

to close the dialog with the "Select" button, so

button 0 = "Select"
button 1 = "Close"
 
Status
Not open for further replies.
Top