View Single Post
  #2  
Old 01-23-2015, 01:15 AM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,762
Kyttias is on a distinguished road
Default

I can probably do this! A column can be added to the database to store when the adopt was created, and calculations can be done from there. When would you like age checks to be done? At log in, every time the user goes to visit their adopts, and on the user's profile page? (I'd alternatively suggest using a Cron job, as most sites of the kind you're wanting to make probably do, but I hear that your chosen host, iPage, doesn't allow it.) Even so, it should be possible to do a quick check of 'born' until 'now', to give the best illusion possible of levelling up over time.

This would only be a first step -

database
Open up the owned_adoptables table in your database using phpMyAdmin. Open up the second tab, Structure. Below the existing table structure, there is an option to add a column at the end of the table and a 'go' button. Just hit go! On this new page we're creating a column. Name it born, set the type to varchar and the length to 20. Ignore the rest of the options and go ahead and hit 'save'.
date of birth set at creation
Open up adopt.php, classes/class_promocode.php, and classes/class_stockadopt.php. Search these files for $mysidia->db->insert. Above this line in each file, let's create a variable that holds today's date. It will be in the format: 2015-01-15 17:16:18:
PHP Code:
$today date("Y-m-d H:i:s"); 
Now let's examine the array after $mysidia->db->insert. As you can probably guess, this code in these places adds a fresh adopt to the owned_adoptables table, the same one we just added a 'born' column to. so in all these places, we want to be sure to add in a date of birth. Find "lastbred" => 0 at the end of the array. Add in a comma, and let's add:
PHP Code:
"born" => $today 
Using 'born' may be a bit of a misnomer, especially if you're going the normal egg-first route, but it's really just setting a timestamp of the creation date.

I assume you'll want to completely disable the current system of gaining exp through clicks?

If you can get me some more details (how long between levels, for example, and if it'd be different between different tiers of creatures or something), I can run some tests and develop something. If, in the end, you decide you don't want it, I can always release it to the community. But, as you're interested in paying, the specifics can definitely be kept between us.

I've been tinkering with the Mysidia framework for a year, so I'm familiar with it. I've made a couple mods for the community, and for myself, just for fun. But... I wouldn't call myself advanced yet (php is more daunting than it looks!), but at least mid to high intermediate level. =/ Of the currently active people around, IntoRain and Hall of Famer himself are probably/definitely better than me, but may not have the time. I'd be happy to hear what you PayPal offer is, though.

I'll probably continue work on this out of curiosity alone...
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.

Last edited by Kyttias; 01-23-2015 at 01:24 AM.
Reply With Quote