Seker Posted May 17, 2012 Posted May 17, 2012 (edited) I've been asking for help a lot and I've definitely received more of it than I've earned, so I thought I should start putting out some mods. My first one is going to just be a simple revamp of a classic. I was never happy with using coordinates for searching the streets. This one simply uses mt_rand to determine outcomes is just a little cleaner and easier to edit than some floating around. As written, users get 250 steps per day and have: -- 10% chance of gaining crystals -- 16% chance of gaining money -- 11% chance of gaining experience -- 11% chance of going to the hospital -- 11% chance of going to jail -- 41% chance of nothing happening (All of this can be easily changed to your preference) SQL: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. streets.php: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add to cron_day: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I did my best to take out anything specific to my game, so the wording on the hospital/jail results may be a little weird, but other than that, you shouldn't have any problems. Edited May 19, 2012 by Seker Forgot to post the cron Quote
Newbie Posted May 19, 2012 Posted May 19, 2012 Ok i have tested this out and found couple problems 1. Streets.php - typos (easy fix) While traveling, you can find crystals, cash, or even gain experience! / You can travel 249 more times today! 2. wrong function info change You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. to You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. thanks for the mod and nice work Quote
Seker Posted May 19, 2012 Author Posted May 19, 2012 Ahh As I said, I had to strip out everything specific to my game. This isn't even called Streets for me, so nice catch. Quote
Seker Posted May 20, 2012 Author Posted May 20, 2012 V2 with edits. Edits * Removed the switch and created only one function * Removed all tables and used H3 and P tags * Maybe more, but can't remember. * 127 lines -- who's bad?! You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Tested? No. Supporting? No. Accepting free pr0n memberships? Oh, go on then! Nice.I'm sure someone would have asked. And good going on the efficiency. Tables are just my personal preference. This was only the second mod I sat down and wrote from scratch. It works for me, so I'm pretty happy with it. But your contribution is definitely appreciated SRB. Quote
Coly010 Posted May 21, 2012 Posted May 21, 2012 Very nice Mod, great being able to change the chances of different outcomes! I'll more than likely end up using it Thanks Quote
johnwest2 Posted June 3, 2012 Posted June 3, 2012 thanks this works on mccodes v2.5 just with a few minor changes. Thanks for the mod dude Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.