mcsniper Posted July 4, 2008 Share Posted July 4, 2008 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 More sharing options...
SandroTheDarkness Posted July 5, 2008 Share Posted July 5, 2008 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 Link to comment Share on other sites More sharing options...
james227uk Posted July 5, 2008 Share Posted July 5, 2008 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 More sharing options...
GoofyHTS Posted July 5, 2008 Share Posted July 5, 2008 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: [email protected] = read_memory 0x00969110 size 4 virtual_protect 0 //read NAMT 0A8D: [email protected] = read_memory 0x00969114 size 2 virtual_protect 0 //read IH00D6: if 104A4: [email protected] == 0x544D414E //checks if [email protected] = NAMT 04A4: [email protected] == 0x4849 //checks if [email protected] = 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: [email protected] == 0x544D414E //checks if [email protected] = NAMT 04A4: [email protected] == 0x4849 //checks if [email protected] = 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 Link to comment Share on other sites More sharing options...
gtasbigfoot Posted July 5, 2008 Share Posted July 5, 2008 (edited) 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: [email protected] = read_memory 0x00969110 size 4 virtual_protect 0 00D6: if 1 04A4: [email protected] == 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 [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 12.8 0.0 00A5: [email protected] = create_car #ANDROM at [email protected] [email protected] [email protected]: set_car [email protected] health_to 4000 08A4: set_car [email protected] 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. 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 July 5, 2008 by gtasbigfoot Link to comment Share on other sites More sharing options...
GoofyHTS Posted July 5, 2008 Share Posted July 5, 2008 I didn't even know you can save 7 byte integer into a local var Yours is easier to do Now i'm wondering why I did it back-to-front... Link to comment Share on other sites More sharing options...
gtasbigfoot Posted July 5, 2008 Share Posted July 5, 2008 (edited) 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 July 5, 2008 by gtasbigfoot Link to comment Share on other sites More sharing options...
Doomed_Space_Marine Posted July 5, 2008 Share Posted July 5, 2008 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 More sharing options...
gtasbigfoot Posted July 5, 2008 Share Posted July 5, 2008 (edited) 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: [email protected] = actor $PLAYER_ACTOR z_angle000B: [email protected] += 180.0 // floating-point values04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 12.8 0.0 00A5: [email protected] = create_car #ANDROM at [email protected] [email protected] [email protected]: set_car [email protected] Z_angle_to [email protected]: set_car [email protected] health_to 4000 08A4: set_car [email protected] extra_parts_angle_to 1.00001: wait 8000 ms0AA5: call 0x00439D80 num_params 0 pop 0 0249: release_model #ANDROM01C3: remove_references_to_car [email protected] // Like turning a car into any random car 0002: jump @starting andr 8 secs later boom,which is quiet fun to watch,0AA5: Edited September 2, 2008 by gtasbigfoot Link to comment Share on other sites More sharing options...
Doomed_Space_Marine Posted July 6, 2008 Share Posted July 6, 2008 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 More sharing options...
pinky Posted July 7, 2008 Share Posted July 7, 2008 (edited) 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. 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 July 7, 2008 by pinky Link to comment Share on other sites More sharing options...
GoofyHTS Posted July 7, 2008 Share Posted July 7, 2008 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. Link to comment Share on other sites More sharing options...
mcsniper Posted July 7, 2008 Author Share Posted July 7, 2008 Thanks lads I will follow your advices but look at this one how it works thread 'PORTAL' :PORTAL_11wait 0 [email protected] = -229907 008B: [email protected] = &0([email protected],1i) // (int) 0085: [email protected] = [email protected] // (int) [email protected] /= 65536 [email protected] *= 65536 0062: [email protected] -= [email protected] // (int) if [email protected] == 20559 else_jump @PORTAL_11 [email protected] = -229908 if &0([email protected],1i) == 1381253452 else_jump @PORTAL_11 &0([email protected],1i) = 1381253376 03E5: show_text_box 'CHEAT1' // Cheat [email protected] = 0 Model.Load(#TEC9)038B: load_requested_models deactivation code :[email protected] = -229907 008B: [email protected] = &0([email protected],1i) // (int) 0085: [email protected] = [email protected] // (int) [email protected] /= 65536 [email protected] *= 65536 0062: [email protected] -= [email protected] // (int) if [email protected] == 20559 else_jump @PORTAL_247 [email protected] = -229908 if &0([email protected],1i) == 1381253452 else_jump @PORTAL_247 &0([email protected],1i) = 1381253376 03E5: show_text_box 'CHEAT8' // Cheat deactivatedif 03CA: object [email protected] exists else_jump @PORTAL_863 Object.Destroy([email protected])Object.Destroy([email protected])06D6: disable_racing_checkpoint [email protected] 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 More sharing options...
Seemann Posted July 10, 2008 Share Posted July 10, 2008 mcsniper; read the SA Memory Handling topic from my sig and you will find the example of a new cheat. Sanny Builder 3 • SA Memory Handling • OpenIV • gtamodding.com CLEO.li - The CLEO Library - Official site Link to comment Share on other sites More sharing options...
gtasbigfoot Posted July 10, 2008 Share Posted July 10, 2008 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'[email protected] = 301567&0([email protected],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. Link to comment Share on other sites More sharing options...
Seemann Posted July 10, 2008 Share Posted July 10, 2008 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. Sanny Builder 3 • SA Memory Handling • OpenIV • gtamodding.com CLEO.li - The CLEO Library - Official site Link to comment Share on other sites More sharing options...
gtasbigfoot Posted July 10, 2008 Share Posted July 10, 2008 Ok,thx im used to mem addressing now,only one I hade problam with is 0x969167. Link to comment Share on other sites More sharing options...
Guest Posted September 2, 2008 Share Posted September 2, 2008 Please Go to this address and help me: ( it's about CLEO ): http://www.gtaforums.com/index.php?act=ST&f=49&t=368294 (http://www.gtaforums.com/index.php?act=ST&f=49&t=368294) Please Please Please I Want to have a Backward Light in GTA SA Please Go To That Address Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now