dick_traced Newbie cheater
Reputation: 0
Joined: 22 Sep 2011 Posts: 21
|
Posted: Fri Nov 18, 2011 4:59 am Post subject: plants vs zombies: plant switch mod |
|
|
i've made a little mod for plant vs zombies
it's for v 1.2.0.1073
what it does: every time a zombie dies, a plant is replaced by a random one
video: youtube[.]com/watch?v=SO7brqp2YAU
sorry for quality
the mechanism:
-i put a counter which gets increased everytime a zombie dies
-in the function that cicles through all plants i injected the code that checks for zombie_counter
-if we have dead zombies, we decrease the counter, remove current plant and plant a new *random* one on the same coordinates
problems:
-doesn't work with all the plants, just with the first 7. we need to make it work with others aswell
-tested on lawn only levels, no pool or rooftops or night (i didn't test them)
-the random number generator sucks. a good adition to cheatengine would have a random_number_generator function that takes 2 arguments: the min and max interval. or if someone have asm code for that, please share
-how can i set a hotkey for a script, without having to inject code for that hotkey? please give example (lua?)
if you want to contribute, here's some interesting things:
-function destroy plant: 46b470 takes 1 argument: base of plant to be destroyed
-function create plant: 4126F0 takes 3 arguments: x coord, y coord, and a game root pointer
also the id for the plant to be created is held in mouse (like when you select a plant with the mouse from the slots)
the scripts are commented, any help on improving is greatly appreciated
| Description: |
|
 Download |
| Filename: |
plants_mod.CT |
| Filesize: |
4.92 KB |
| Downloaded: |
1071 Time(s) |
|
|