Jump to content

Cleo 3 library


mcsniper

Recommended Posts

I downloaded some cleo scripts from a japanese site that are activated by

cheats. for example portal script

portal.cs is activated only when i type PORTAL and it writes me Cheat activated and after it it begins working.

Does anyone know how to make cheat scripts using cleo 3

What opcode is used ?

for example i want the script to start after i type HITMAN

Link to comment
Share on other sites

SandroTheDarkness

 

00D6: if and0AB0:   key_pressed x

 

 

List of keys:

 

Character Decimal

Backspace 8

Tab 9

Enter 13

Shift (both) 16

Ctrl (both) 17

Pause 19

Caps Lock 20

Esc 27

Spacebar 32

Page Up 33

Page Down 34

End 35

Home 36

(left arrow) 37

(up arrow) 38

(right arrow) 39

(down arrow) 40

Insert 45

Delete 46

0 48

1 49

2 50

3 51

4 52

5 53

6 54

7 55

8 56

9 57

A or a 65

B or b 66

C or c 67

D or d 68

E or e 69

F or f 70

G or g 71

H or h 72

I or i 73

J or j 74

K or k 75

L or l 76

M or m 77

N or n 78

O or o 79

P or p 80

Q or q 81

R or r 82

S or s 83

T or t 84

U or u 85

V or v 86

W or w 87

X or x 88

Y or y 89

Z or z 90

(left Windows key) 91

(right Windows key) 92

(application key - located between

the right Windows and Ctrl keys

on most keyboards) 93

0 (numpad with Num Lock on) 96

1 (numpad with Num Lock on) 97

2 (numpad with Num Lock on) 98

3 (numpad with Num Lock on) 99

4 (numpad with Num Lock on) 100

5 (numpad with Num Lock on) 101

6 (numpad with Num Lock on) 102

7 (numpad with Num Lock on) 103

8 (numpad with Num Lock on) 104

9 (numpad with Num Lock on) 105

* (numpad) 106

+ (numpad) 107

- (numpad) 109

. (numpad) 110

/ (numpad) 111

F1 112

F2 113

F3 114

F4 115

F5 116

F6 117

F7 118

F8 119

F9 120

F11 122

F12 123

Num Lock 144

Scroll Lock 145

; 186

= 187

, 188

- 189

. 190

/ 191

` 192

[ 219

\ 220

] 221

' 222

 

hope it helps smile.gif

Link to comment
Share on other sites

james227uk

Doesn't help at all. Using 00E1: like that means he has to hold down every key at once for the script to activate.

 

I have no idea how to make cheat keypresses like the one for the portal gun

Link to comment
Share on other sites

I have a way, dunno if it is the same that is used in the portal one but here goes. If the you type HITMAN the player will be given 1000 money.

 

 

{$CLEO .cs}:HM03A4: name_thread 'HITMAN_CHEAT':MAIN_LOOP0001: wait 0 ms 0A8D: 1@ = read_memory 0x00969110 size 4 virtual_protect 0 //read NAMT 0A8D: 2@ = read_memory 0x00969114 size 2 virtual_protect 0 //read IH00D6: if 104A4:   1@ == 0x544D414E //checks if 1@ = NAMT 04A4:   2@ == 0x4849 //checks if 2@ = IH004D: jump_if_false @MAIN_LOOP :ACTIVATE0109: player $PLAYER_CHAR money += 10000A8C: write_memory 0x00969110 size 4 value 0 virtual_protect 0 //clear the buffer0A8C: write_memory 0x00969114 size 2 value 0 virtual_protect 0 //clear the buffer0002: jump @MAIN_LOOP

 

 

Needs some explaining. the "buffer" for keypresses is at 0x00969110. What you type is reversed here.

 

This part:

 

04A4:   1@ == 0x544D414E //checks if 1@ = NAMT 04A4:   2@ == 0x4849 //checks if 2@ = IH

 

 

The way I calculated those values is like follows:

 

HITMAN would look like NAMTIH in memory (reversed)

I then got the ascii character codes,so it would look like(hex):

4E,41,4D,54,49,48

 

I then seperated those values into 4 bytes then 2 bytes:

 

0x00969110 must equal 4E,41,4D,54

0x00969114 must equal 49,48

 

Then i just "Reversed" those values to get

544D414E

4849

 

You also need to clear the buffer with

 

0A8C: write_memory 0x00969110 size 4 value 0 virtual_protect 0 //clear the buffer0A8C: write_memory 0x00969114 size 2 value 0 virtual_protect 0 //clear the buffer

 

Otherwise your cheat will be executed the whole time.

 

Hope this helps,there might be an easier way,dunno tounge2.gif

 

 

Link to comment
Share on other sites

gtasbigfoot

I do it a very simlar way to GoofyHTS but I don't do it back to front I just get the ascii character and do it nomal that way works fine for me,both ways works ok for me.

 

 

{$CLEO .cs}:androm03A4: name_thread 'androm':start0001: wait 0 ms 0A8D: 0@ = read_memory 0x00969110 size 4 virtual_protect 0  00D6: if 1                  04A4:   0@ == 0x414E4452 //=andr  004D: jump_if_false @start :start_00247:  request_model #ANDROM038B: load_requested_models :check0001: wait 0 ms00D6: if and0248:   model #ANDROM available004D: jump_if_false @check 03E5: text_box 'CHEAT1'  // Cheat aktiviert04C4: store_coords_to 3@ 4@ 5@ from_actor $PLAYER_ACTOR with_offset 0.0 12.8 0.0 00A5: 6@ = create_car #ANDROM at 3@ 4@ 5@0224: set_car 6@ health_to 4000 08A4: set_car 6@ extra_parts_angle_to 1.00249: release_model #ANDROM 0A8C: write_memory 0x00969110 size 4 value 0 virtual_protect 0 0002: jump @start

 

 

 

And we get a andromada in front of us.

 

user posted image

 

 

Hex ascii characters

 

 

//40 @                //41 A //42 B                            //43 C //44 D             //45 E             //46 F              //47 G //48 H //49 I //4A J //4B K //4C L //4D M //4E N  //4F O //50 P //51 Q //52 R //53 S //54 T        //55 U //56 V //57 W //58 X           //59 Y //5A Z 

 

 

There is more ways but I think they are harder.

 

Usefull topic:

 

http://www.gtaforums.com/index.php?showtopic=262280

 

 

Ryosuke does not do it like this for exmaple look in his fire sword script he has a diffrent way.

Edited by gtasbigfoot
Link to comment
Share on other sites

I didn't even know you can save 7 byte integer into a local var blush.gif

Yours is easier to do wink.gif Now i'm wondering why I did it back-to-front...

Link to comment
Share on other sites

gtasbigfoot

Me too I thinked 4 was max but 7 worked aswell I dont know why which is reaaly getting me.

 

I changed my script to 4 now because im preety sure it's the max but when I did one for'andromada' it worked.

 

andr is the cheat in this script because I did not like the look of what happened.

 

and Seemann said it is so it must be my game or somthing went wrong I really have no idea.

 

Edited by gtasbigfoot
Link to comment
Share on other sites

Doomed_Space_Marine
Doesn't help at all. Using 00E1: like that means he has to hold down every key at once for the script to activate.

 

I have no idea how to make cheat keypresses like the one for the portal gun

You're mistaken. It's possible to make a script that with 0AB0. Check if some key is pressed, then jump to a loop that checks if other key is pressed.

Link to comment
Share on other sites

gtasbigfoot

 

Doesn't help at all. Using 00E1: like that means he has to hold down every key at once for the script to activate.

 

I have no idea how to make cheat keypresses like the one for the portal gun

You're mistaken. It's possible to make a script that with 0AB0. Check if some key is pressed, then jump to a loop that checks if other key is pressed.

Yeah,you could always do that I think,but what would be the point ?

 

You mean like this ?

 

 

{$CLEO .cs}:Take_the_piss03A4: name_thread 'Take_the_piss':starting0001: wait  0 ms00D6: if  0256:   player $PLAYER_CHAR defined004D: jump_if_false @starting 00D6: if  0038:   $ONMISSION ==  0  // integer values004D: jump_if_false @starting 00D6: if and0AB0:   key_pressed 65 //A004D: jump_if_false @starting0002: jump @key_2:key_20001: wait 0 ms 00D6: if and0AB0:   key_pressed 78 // N004D: jump_if_false @key_20002: jump @key_3:key_30001: wait 0 ms 00D6: if and                  //D0AB0:   key_pressed 68004D: jump_if_false @key_30002: jump @key_4:key_40001: wait 0 ms 00D6: if and0AB0:   key_pressed 82     //R004D: jump_if_false @key_40002: jump @androm            // Are we finished yet ? :androm0247:  request_model #ANDROM038B: load_requested_models :check0001: wait 0 ms00D6: if 0248:   model #ANDROM available004D: jump_if_false @check 0172: 2@ = actor $PLAYER_ACTOR z_angle000B: 2@ +=  180.0  // floating-point values04C4: store_coords_to 3@ 4@ 5@ from_actor $PLAYER_ACTOR with_offset 0.0 12.8 0.0 00A5: 6@ = create_car #ANDROM at 3@ 4@ 5@0175: set_car 6@ Z_angle_to 2@0224: set_car 6@ health_to 4000 08A4: set_car 6@ extra_parts_angle_to 1.00001: wait 8000 ms0AA5: call 0x00439D80 num_params 0 pop 0 0249: release_model #ANDROM01C3: remove_references_to_car 6@ // Like turning a car into any random car 0002: jump @starting

 

 

 

 

andr 8 secs later boom,which is quiet fun to watch,0AA5:

Edited by gtasbigfoot
Link to comment
Share on other sites

Doomed_Space_Marine

Yeah, I mean like this. Also, it's necessary to check if other keys are pressed and if they are, jump to the first loop.

Link to comment
Share on other sites

 

Yeah, I mean like this. Also, it's necessary to check if other keys are pressed and if they are, jump to the first loop.

Yep, that is how I did it on my paint changer tool.

I am interested on how to do it the Hex way though as that seems way better than miles of code like I have done previously.

 

Is there any easy way for someone like myself who is not in the know of Hex Decimal on how to come up with the correct numbers?

Actually having read more closely, are the same hex numbers given in the Cleo help for key presses the correct ones to use for this?

 

I am a blind tit for not seeing the bottom of gtasbigfoot's post but the hex numbers are also in the cleo help documentation under virtual_key_codes in the help section. This gives the details for all key presses.

 

Some experimenting tonight for me. smile.gif

 

Yay, success. been a helpful topic for me anyway. Thanks to all who helped.

 

My only question is, what if the word you want typed has odd numbers like 5 letters for hydra for example?

Edited by pinky
Link to comment
Share on other sites

 

My only question is, what if the word you want typed has odd numbers like 5 letters for hydra for example?

you would use 4 bytes and then 1 byte. wink.gif

Link to comment
Share on other sites

Thanks lads I will follow your advices but look at this one

how it works

 

thread 'PORTAL' :PORTAL_11wait 0 30@ = -229907 008B: 30@ = &0(30@,1i) // (int) 0085: 31@ = 30@ // (int) 31@ /= 65536 31@ *= 65536 0062: 30@ -= 31@ // (int) if  30@ == 20559 else_jump @PORTAL_11 30@ = -229908 if  &0(30@,1i) == 1381253452 else_jump @PORTAL_11 &0(30@,1i) = 1381253376 03E5: show_text_box 'CHEAT1'  // Cheat activated9@ = 0 Model.Load(#TEC9)038B: load_requested_models 

 

 

deactivation code

 

:PORTAL_69530@ = -229907 008B: 30@ = &0(30@,1i) // (int) 0085: 31@ = 30@ // (int) 31@ /= 65536 31@ *= 65536 0062: 30@ -= 31@ // (int) if  30@ == 20559 else_jump @PORTAL_247 30@ = -229908 if  &0(30@,1i) == 1381253452 else_jump @PORTAL_247 &0(30@,1i) = 1381253376 03E5: show_text_box 'CHEAT8'  // Cheat deactivatedif 03CA:   object 10@ exists else_jump @PORTAL_863 Object.Destroy(10@)Object.Destroy(12@)06D6: disable_racing_checkpoint 14@ 

 

 

 

I found it very original but hard to explain.

Does any one of U knows how it works

Sorry I am new in codding and I use examples to teach myshelf

Link to comment
Share on other sites

gtasbigfoot

Seemann, I have a question Which you problay will easly be able to answer....

 

I found out this for game time to equal 1 min in real time, would not it work like spaceeinstein's real time clock ?

 

 

03A4: name_thread 'Time'0@ = 301567&0(0@,1i) = 60000004E: end_thread 

 

 

Im also very intrested in your carrec script since the max safe limit of paths is 49 to add(which is more than enough),is there any max size on one path ? What I mean is say if my carrec837.rrr is 32 kb is there a limit of what kb it is ?

 

The biggest path I tryed to far is 40 kb.

 

 

Clock seems to work ok.

 

user posted image

Link to comment
Share on other sites

You can make a real time clock with the only line:

 

 

0A8C: write_memory 0xB7015C size 4 value 60000 virtual_protect 0

 

 

 

RRR size is unlimited as far as I remember.

Link to comment
Share on other sites

gtasbigfoot

Ok,thx im used to mem addressing now,only one I hade problam with is 0x969167.

 

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.