CLEO Help Pause script while not moving

CLEO related
Status
Not open for further replies.

Monstercat

Well-known member
Joined
Feb 26, 2013
Messages
281
Reaction score
5
Hey i have a little request...
I have here a scriptand I want that when I aktivite it, pause it, if I'm not moving

Code:
{$CLEO .cs}

//-------------MAIN---------------
Thread '[Monstercat]' 

:MAIN_ACTIVATION
wait 0
if
0AB0:   key_pressed 122
else_jump @MAIN_ACTIVATION
0ACD: show_text_highpriority "ACTIVATED" time 1500

:GO
wait 0
repeat
wait 0
until player.Defined(0)
0A96: 0@ = actor $PLAYER_ACTOR struct
0@ += 66
while true
wait 0
if
0AB0:   key_pressed 123
else_jump @CONTINUE
0ACD: show_text_highpriority "DEACTIVATED" time 1500
0A8C: write_memory 0@ size 1 value 0 virtual_protect 0
jump @MAIN_ACTIVATION

:CONTINUE
0A8C: write_memory 0@ size 1 value 0xCC virtual_protect 0
end


Thanks to xzytro for the On/Off Script
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
7
Code:
{$CLEO .cs}

//-------------MAIN---------------
Thread '[Monstercat]'

:MAIN_ACTIVATION
wait 0
if
0AB0:   key_pressed 122
else_jump @MAIN_ACTIVATION
0ACD: show_text_highpriority "ACTIVATED" time 1500

:GO
wait 0
repeat
wait 0
until player.Defined(0)
0A96: 0@ = actor $PLAYER_ACTOR struct
0@ += 66
while true
wait 0
if
0AB0:   key_pressed 123
else_jump @CHECK_IF_MOVING
0ACD: show_text_highpriority "DEACTIVATED" time 1500
0A8C: write_memory 0@ size 1 value 0 virtual_protect 0
jump @MAIN_ACTIVATION

:CHECK_IF_MOVING
wait 0
04C4: store_coords_to $oldposx $oldposy $oldposz from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
wait 500
04C4: store_coords_to $newposx $newposy $newposz from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
if and
0044:   $oldposx == $newposx
0044:   $oldposy == $newposy
0044:   $oldposz == $newposz
else_jump @CONTINUE
0A8C: write_memory 0@ size 1 value 0 virtual_protect 0
end

:CONTINUE
0A8C: write_memory 0@ size 1 value 0xCC virtual_protect 0
end

I don't know if this will work or not, wrote it on notepad like a blind guy playing piano, but give it a try at least.
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
7
Ohh, ye i know why it gave that error, it's because i wrote "end" twice. Try this one now :

Code:
{$CLEO .cs}

//-------------MAIN---------------
Thread '[Monstercat]'

:MAIN_ACTIVATION
wait 0
if
0AB0:   key_pressed 122
else_jump @MAIN_ACTIVATION
0ACD: show_text_highpriority "ACTIVATED" time 1500

:GO
wait 0
repeat
wait 0
until player.Defined(0)
0A96: 0@ = actor $PLAYER_ACTOR struct
0@ += 66
while true
wait 0
if
0AB0:   key_pressed 123
else_jump @CHECK_IF_MOVING
0ACD: show_text_highpriority "DEACTIVATED" time 1500
0A8C: write_memory 0@ size 1 value 0 virtual_protect 0
jump @MAIN_ACTIVATION

:CHECK_IF_MOVING
wait 0
04C4: store_coords_to $oldposx $oldposy $oldposz from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
wait 500
04C4: store_coords_to $newposx $newposy $newposz from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
if and
0044:   $oldposx == $newposx
0044:   $oldposy == $newposy
0044:   $oldposz == $newposz
else_jump @CONTINUE
0A8C: write_memory 0@ size 1 value 0 virtual_protect 0
jump @GO

:CONTINUE
0A8C: write_memory 0@ size 1 value 0xCC virtual_protect 0
end
 
Status
Not open for further replies.
Top