CLEO Help Help me with Deactivation

CLEO related
Status
Not open for further replies.

Monstercat

Well-known member
Joined
Feb 26, 2013
Messages
281
Reaction score
5
Hey in my little Script here i have a Activation when i type: WERNER

Then it jumps to the only while aim Activation

Thread '[Monstercat]'

Code:
Thread '[Monstercat]'

:ACTIVATION
wait 0
0ADC:   test_cheat "WERNER"
else_jump @ACTIVATION
0ACD: show_text_highpriority "ACTIVATED" time 1500
jump @MAIN_ACTIVATION 

:MAIN_ACTIVATION
wait 0
if and
0AB0:   key_pressed 2
else_jump @MAIN_ACTIVATION

:GO
wait 0
repeat
wait 0
until player.Defined(0)
0A96: 0@ = actor $PLAYER_ACTOR struct
0@ += 66
while true
wait 0
if
8AB0:  not key_pressed 2
else_jump @CHECK_IF_MOVING
0A8C: write_memory 0@ size 1 value 0 virtual_protect 0
jump @MAIN_ACTIVATION

:CHECK_IF_MOVING
wait 0
02A0: actor $PLAYER_ACTOR stopped
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

Now i want to Deactivate the Script when i type: "WERNER" again but idk how
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
7
Code:
Thread '[Monstercat]'

:ACTIVATION
wait 0
0ADC:   test_cheat "WERNER"
else_jump @ACTIVATION
0ACD: show_text_highpriority "~B~WERNER ~G~ACTIVATED" time 1500
jump @MAIN_ACTIVATION

:MAIN_ACTIVATION
wait 0
if
0AB0:   key_pressed 2
else_jump @MAIN_ACTIVATION

:GO
wait 0
repeat
wait 0
until player.Defined(0)
0A96: 0@ = actor $PLAYER_ACTOR struct
0@ += 66
while true
wait 0
if
8AB0:  not key_pressed 2
else_jump @CHECK_IF_MOVING
0A8C: write_memory 0@ size 1 value 0 virtual_protect 0
jump @DEACTIVATION_CHECK

:CHECK_IF_MOVING
wait 0
if
02A0: actor $PLAYER_ACTOR stopped
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

:DEACTIVATION_CHECK
wait 0
if
0ADC:   test_cheat "WERNER"
else_jump @MAIN_ACTIVATION
0A8C: write_memory 0@ size 1 value 0 virtual_protect 0
0ACD: show_text_highpriority "~B~WERNER ~R~DEACTIVATED" time 1500
jump @ACTIVATION
:catface: :catface::catface:
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
7
Lemme guess, you compiled this, and put this in CLEO folder, and went in-game, and did this :

typed WERNER to activate, and again typed WERNER quickly to deactivate.

Right? That's not it's supposed to be. After activating WERNER, you must aim at least once, to be able to type WERNER to deactivate again.

Try it in-game, but first, USE the mod, after using it for 1 or 2 minutes, deactivate it, you will see that it works.

If you want it too much, i can make it able to deactivate before aiming too.

EDIT : Here, this one should work better :

Code:
Thread '[Monstercat]'

:ACTIVATION
wait 0
0ADC:   test_cheat "WERNER"
else_jump @ACTIVATION
0ACD: show_text_highpriority "~B~WERNER ~G~ACTIVATED" time 1500
jump @MAIN_ACTIVATION

:MAIN_ACTIVATION
wait 0
if
0AB0:   key_pressed 2
else_jump @FIRST_DEACTIVATION_CHECK

:GO
wait 0
repeat
wait 0
until player.Defined(0)
0A96: 0@ = actor $PLAYER_ACTOR struct
0@ += 66
while true
wait 0
if
8AB0:  not key_pressed 2
else_jump @CHECK_IF_MOVING
0A8C: write_memory 0@ size 1 value 0 virtual_protect 0
jump @DEACTIVATION_CHECK

:CHECK_IF_MOVING
wait 0
if
02A0: actor $PLAYER_ACTOR stopped
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

:FIRST_DEACTIVATION_CHECK
wait 0
if
0ADC:   test_cheat "WERNER"
else_jump @MAIN_ACTIVATION
0ACD: show_text_highpriority "~B~WERNER ~R~DEACTIVATED" time 1500
jump @ACTIVATION


:DEACTIVATION_CHECK
wait 0
if
0ADC:   test_cheat "WERNER"
else_jump @MAIN_ACTIVATION
0A8C: write_memory 0@ size 1 value 0 virtual_protect 0
0ACD: show_text_highpriority "~B~WERNER ~R~DEACTIVATED" time 1500
jump @ACTIVATION
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,486
Reaction score
227
Location
( ͡° ͜ʖ ͡°)
Code:
Thread '[Monstercat]'

:ACTIVATION
wait 0
if
0ADC:   test_cheat "WERNER"
else_jump @ACTIVATION
0ACD: show_text_highpriority "~B~WERNER ~G~ACTIVATED" time 1500
jump @MAIN_ACTIVATION

:MAIN_ACTIVATION
wait 0
if
0ADC:   test_cheat "WERNER"
jf @nope
0A8C: write_memory 0@ size 1 value 0 virtual_protect 0
0ACD: show_text_highpriority "~B~WERNER ~R~DEACTIVATED" time 1500
jump @ACTIVATION

:Nope
if
0AB0:   key_pressed 2
else_jump @MAIN_ACTIVATION

:GO
wait 0
repeat
wait 0
until player.Defined(0)
0A96: 0@ = actor $PLAYER_ACTOR struct
0@ += 66
while true
wait 0
if
8AB0:  not key_pressed 2
else_jump @CHECK_IF_MOVING
0A8C: write_memory 0@ size 1 value 0 virtual_protect 0
jump @DEACTIVATION_CHECK

:CHECK_IF_MOVING
wait 0
if
02A0: actor $PLAYER_ACTOR stopped
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

:DEACTIVATION_CHECK
wait 0
if
0ADC:   test_cheat "WERNER"
else_jump @MAIN_ACTIVATION
0A8C: write_memory 0@ size 1 value 0 virtual_protect 0
0ACD: show_text_highpriority "~B~WERNER ~R~DEACTIVATED" time 1500
jump @ACTIVATION
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,486
Reaction score
227
Location
( ͡° ͜ʖ ͡°)
Just add this everywhere:

Code:
if
0ADC:   test_cheat "WERNER"
then
0A8C: write_memory 0@ size 1 value 0 virtual_protect 0
0ACD: show_text_highpriority "~B~WERNER ~R~DEACTIVATED" time 1500
jump @ACTIVATION
end
 
Status
Not open for further replies.
Top