Coding

 Reply to this postStart new topic

My first mod/cheat

Worzox
post Feb 1 2010, 06:25 PM
Post #1


The New Guy!

Posts: 2
Joined: 1-February 10



CODE
0A8D: 1@ = read_memory 0x969111 size 4 virtual_protect 0
0A8D: 0@ = read_memory 0x969113 size 2 virtual_protect 0
if or
84A4:   not 1@ == 0x4b494c4c // Hex String 'KILL'
84A4:   not 0@ == 0x4d45 // Hex String 'ME'
else_jump @CHEATS_KILLME

:CHEATS_KILLME
0223: set_actor $PLAYER_ACTOR health_to 0


You like? I haven't tested it, will it work?


--------------------
:)
Go to the top of the page
 
+Quote Post
Deji
post Feb 1 2010, 09:30 PM
Post #2


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



It's a good start.

Is that the whole script? If so, it would crash work as headers and things are required.


However, you have made a very easy mistake in the conditional lines... At the moment your cheat is "MEKILL". The ordering is just a bit wrong.

0x969111 is the LAST key sequence that was pressed... so you would correct the code by simply inverting your variables:

CODE
0A8D: 1@ = read_memory 0x969111 size 4 virtual_protect 0
0A8D: 0@ = read_memory 0x969113 size 2 virtual_protect 0


Which should make it work perfectly. Try it out.


--------------------
Go to the top of the page
 
+Quote Post
Worzox
post Feb 2 2010, 05:11 PM
Post #3


The New Guy!

Posts: 2
Joined: 1-February 10



Cheers. smile.gif


--------------------
:)
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: