Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


plants vs zombies: plant switch mod

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
dick_traced
Newbie cheater
Reputation: 0

Joined: 22 Sep 2011
Posts: 21

PostPosted: Fri Nov 18, 2011 4:59 am    Post subject: plants vs zombies: plant switch mod Reply with quote

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



plants_mod.CT
 Description:

Download
 Filename:  plants_mod.CT
 Filesize:  4.92 KB
 Downloaded:  1071 Time(s)

Back to top
View user's profile Send private message
Spon27
Cheater
Reputation: 0

Joined: 22 Aug 2010
Posts: 29
Location: América del Sur

PostPosted: Sat Nov 19, 2011 1:48 am    Post subject: Reply with quote

A very good job, interesting! We thank. Smile
_________________
» Do not forget to visit! / No te olvides de visitar!

» http://cheatnova.com
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites