dphome
Well-known member
anti-afk_v1.cs - sends /g every 30 seconds, bypasses afk
anti-afk_v2.cs - moves the camera, bypasses afk
anti-afk_v2.1.cs - moves the camera, bypasses afk, working in pause
Code:
{$CLEO .cs}
0000: NOP
REPEAT
WAIT 1000
0A8D: 0@ = readMem 0xA444A0 sz 4 vp 0
UNTIL 0@ == 1
32@ = 0 // keep active timer
33@ = 0 // keep active timer
while true
wait 0
if
0ADC: test_cheat "AFK"
then
if
30@ == false
then
30@ = true
0AD1: show_formatted_text_highpriority "anti-afk v1 ~g~Activated" time 1337
32@ = 0 // timer
33@ = 0 // timer
else
30@ = false
0AD1: show_formatted_text_highpriority "anti-afk v1 ~r~Deactivated" time 1337
end
end
if
30@ == true
then
if
33@ > 27000
then
0AC8: 0@ = allocate_memory_size 260
0AD3: 0@ = format "/g" // here command format
0AB1: @SEND_CMD 1 0@ /// here send command
wait 3000
0AB1: @SEND_CMD 1 0@ /// here send command
33@ = 0 // reset timer
end
end
end
:SEND_CMD
//0AB1: @SEND_CMD 1 $text
IF 0AA2: 1@ = "samp.dll"
THEN
1@ += 0x69340 // FUNC_SEND_CMD_03DL
0AA5: call 1@ num_param 1 pop 0 0@
END
0AB2: 0
Code:
{$CLEO .cs}
0000: NOP
REPEAT
WAIT 1000
0A8D: 0@ = readMem 0xA444A0 sz 4 vp 0
UNTIL 0@ == 1
32@ = 0 // keep active timer
33@ = 0 // keep active timer
while true
wait 0
if
0ADC: test_cheat "AKF"
then
if
30@ == false
then
30@ = true
0AD1: show_formatted_text_highpriority "~w~anti-afk v2 ~g~Activated" time 1337
32@ = 0 // timer
33@ = 0 // timer
else
30@ = false
0AD1: show_formatted_text_highpriority "~w~anti-afk v2 ~r~Deactivated" time 1337
end
end
if
30@ == true
then
if
33@ > 2000
then
099C: camera_set_shake_simulation_simple 1 time 4000.0 intensity 1.0
33@ = 0 // reset timer
end
end
end
Code:
{$CLEO .cs}
0000: NOP
REPEAT
WAIT 1000
0A8D: 0@ = readMem 0xA444A0 sz 4 vp 0
UNTIL 0@ == 1
0AB1: @memset 3 destination 7623723 value 144 size 8
WHILE TRUE
WAIT 0
IF
0ADC: test_cheat "ASD"
THEN
IF
1@ == FALSE
THEN
1@ = TRUE
0AD1: show_formatted_text_highpriority "~w~anti-afk v2.1 ~g~Activated" time 1337
ELSE
1@ = FALSE
0AD1: show_formatted_text_highpriority "~w~anti-afk v2.1 ~r~Deactivated" time 1337
END
END
IF
1@ == TRUE
THEN
0A8C: write_memory 7634870 size 1 value 1 virtual_protect 1
0A8C: write_memory 7635034 size 1 value 1 virtual_protect 1
0AB1: @memset 3 destination 5499528 value 144 size 6 // disable esc when game is minimized
0AB1: @memset 3 destination 7623723 value 144 size 8 // disable mouse centering
099C: camera_set_shake_simulation_simple 1 time 4000.0 intensity 1.0
ELSE
0A8C: write_memory 7634870 size 1 value 0 virtual_protect 1
0A8C: write_memory 7635034 size 1 value 0 virtual_protect 1
0AC6: 2@ = label @SOMETHING1 offset
0AB1: @memcpy 3 destination 5499528 source 2@ size 6
0AC6: 3@ = label @SOMETHING2 offset
0AB1: @memcpy 3 destination 7623723 source 3@ size 8
END
END
:memcpy
var
0@ : integer
1@ : integer
2@ : integer
3@ : integer
end
// 0@ - destination, 1@ - source, 2@ - size
// Example: 0AB1: @memcpy 3 destination 0@ source 1@ size 2@
dec(2@)
for 3@ = 0 to 2@
0A8D: 4@ = read_memory 1@ size 1 virtual_protect 0
0A8C: write_memory 0@ size 1 value 4@ virtual_protect 0
1@ += 1
0@ += 1
end
0AB2: ret 0
:memset
var
0@ : integer
1@ : integer
2@ : integer
3@ : integer
end
// 0@ - destination, 1@ - value, 2@ - size
// Example: 0AB1: @memset 3 destination 0@ value 32 size 1
2@ -= 1
for 3@ = 0 to 2@
0A8C: write_memory 0@ size 1 value 1@ virtual_protect 0
0@ += 1
end
0AB2: ret 0
:SOMETHING1
hex
0F 84 7B 01 00 00
end
:SOMETHING2
hex
50 51 FF 15 00 83 85 00
end
Attachments
Last edited: