This is posible to make like this:TH3RM4L link said:
/housepass
0000
enter
-----------
/housepass
0001
enter
-----------
/housepass
0002
enter
Yes.Pa0NeiX link said:This is posible to make like this:
You can show me how to make simple script of FAKE_KEYPRESS ?? :yesyes:TH3RM4L link said:Yes.
It's damn easy. Just use the call function and put the keys which you want to use. The snippets should be put somewhere else.Pa0NeiX link said:You can show me how to make simple script of FAKE_KEYPRESS ?? :yesyes:
:label
wait 0
if
..
jf [member=23507]Label[/member]
0AB1: @FAKE_KEYPRESS 1 OFFSET_KEY 0x3 // W
0AB1: call @keyPress 2 key 53 time 500
goto [member=23507]Label[/member]
:FAKE_KEYPRESS
1@ = 0xB73458
005A: 1@ += 0@ // (int)
0A8C: write_memory 1@ size 1 value 255 virtual_protect 0
0AB2: ret 0
: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
TH3RM4L link said:It's damn easy. Just use the call function and put the keys which you want to use. The snippets should be put somewhere else.
Code::label wait 0 if .. jf [member=23507]Label[/member] 0AB1: @FAKE_KEYPRESS 1 OFFSET_KEY 0x3 // W 0AB1: call @keyPress 2 key 53 time 500 goto [member=23507]Label[/member] :FAKE_KEYPRESS 1@ = 0xB73458 005A: 1@ += 0@ // (int) 0A8C: write_memory 1@ size 1 value 255 virtual_protect 0 0AB2: ret 0 :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
:MAIN
wait 0
0AB1: call @keyPress 2 key 84 time 500
0AB1: call @keyPress 2 key 76 time 500
0AB1: call @keyPress 2 key 79 time 500
0AB1: call @keyPress 2 key 76 time 500
0AB1: call @keyPress 2 key 13 time 500
SAMP.CmdRet()
goto @MAIN
:keyPress
// 0@ - key, 1@ - time
// Example: 0AB1: call @keyPress 2 key 0@ time 1@
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
0@ = 0001
1@ += 0@
Result:
0000
0001
Umm, I don't understand what you want. Explain more.Pa0NeiX link said:how i make like this ??
Code:0@ = 0001 1@ += 0@ Result: 0000 0001
I want to do this:TH3RM4L link said:Umm, I don't understand what you want. Explain more.
0AF9: "/housepass"Pa0NeiX link said:I want to do this:
/HousePass
{dialog from server popup}
0001
0002
0003
0004 AndMore
TH3RM4L link said:0AF9: "/housepass"
wait 200
0AB1: call @keyPress 2 key 48 {0} time 100
wait 100
0AB1: call @keyPress 2 key 48 {0} time 100
wait 100
0AB1: call @keyPress 2 key 48 {0} time 100
wait 100
0AB1: call @keyPress 2 key 49 {1} time 100
0000
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 +
0AB1: call @keyPress 2 key 48 {0} time 100
wait 100
0AB1: call @keyPress 2 key 48 {0} time 100
wait 100
0AB1: call @keyPress 2 key 48 {0} time 100
wait 100
0AB1: call @keyPress 2 key 49 {1} time 100
I already understand thisTH3RM4L link said:Place this many times
But replace 49 (which means 1) with the next number, like 50 (which means 2)Code:0AB1: call @keyPress 2 key 48 {0} time 100 wait 100 0AB1: call @keyPress 2 key 48 {0} time 100 wait 100 0AB1: call @keyPress 2 key 48 {0} time 100 wait 100 0AB1: call @keyPress 2 key 49 {1} time 100
Example:
// first key presses
0AB1: call @keyPress 2 key 48 {0} time 100
wait 100
0AB1: call @keyPress 2 key 48 {0} time 100
wait 100
0AB1: call @keyPress 2 key 48 {0} time 100
wait 100
0AB1: call @keyPress 2 key 49 {1} time 100
// the 2nd key presses
wait 100
0AB1: call @keyPress 2 key 48 {0} time 100
wait 100
0AB1: call @keyPress 2 key 48 {0} time 100
wait 100
0AB1: call @keyPress 2 key 48 {0} time 100
wait 100
0AB1: call @keyPress 2 key 50 {2} time 100 // see? i changed 49 to 50 so it presses 2 this time, not 1
// etc
{$CLEO}
0000: NOP
10@ = 48
11@ = 48
12@ = 48
13@ = 49
:START
wait 0
if
0ADC: "K"
jf @START
:LABEL1
wait 0
0AB1: call @10 2 key 10@ time 1@
wait 100
0AB1: call @11 2 key 11@ time 1@
wait 100
0AB1: call @12 2 key 12@ time 1@
wait 100
0AB1: call @13 2 key 13@ time 1@
// the following lines were just for testing
{
0AF8: "10: %d" 0xFFFFFF 10@
wait 100
0AF8: "10: %d 11: %d" 0xFFFFFF 10@ 11@
wait 100
0AF8: "10: %d 11: %d 12: %d" 0xFFFFFF 10@ 11@ 12@
wait 100
0AF8: "10: %d 11: %d 12: %d 13: %d" 0xFFFFFF 10@ 11@ 12@ 13@
}
13@ += 1
:LABEL2
if or
13@ == 58
13@ >= 58
jf @LABEL3
13@ = 49
12@ += 1
:LABEL3
if or
12@ == 58
12@ >= 58
jf @LABEL4
12@ = 48
11@ += 1
:LABEL4
if or
11@ == 58
11@ >= 58
jf @LABEL5
11@ = 48
10@ += 1
:LABEL5
if or
10@ == 58
10@ >= 58
jf @LABEL1
10@ = 48
11@ = 48
12@ = 48
13@ = 48
goto @LABEL1
:10
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 10@
wait 1@
0AA5: call 2@ num_params 4 pop 0 0 0x02 0 10@
end
end
0AB2: ret 0
:11
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 11@
wait 1@
0AA5: call 2@ num_params 4 pop 0 0 0x02 0 11@
end
end
0AB2: ret 0
:12
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 12@
wait 1@
0AA5: call 2@ num_params 4 pop 0 0 0x02 0 12@
end
end
0AB2: ret 0
:13
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 13@
wait 1@
0AA5: call 2@ num_params 4 pop 0 0 0x02 0 13@
end
end
0AB2: ret 0