#1
|
|||
|
|||
No Clicks at all?
I'm trying to teach myself PHP, and I was wondering which bits of the script contain parts that determine when the adoptable levels up, and how hard that would be to change to no clicks? I'm trying to get it to change after a certain amount of time, you see, like this:
PHP Code:
|
#2
|
|||
|
|||
RE: No Clicks at all?
Well, I can tell you that it will be rather tricky to convert from a clicks based system to a time-based one, simply because the script wasn't designed for time-based leveling. Here's the code though that controls when an adoptable levels up...
In levelup.php: PHP Code:
I would wait though until the new version comes out in a week or two before changing anything as the new version is a major rewrite. :) |
#3
|
|||
|
|||
RE: No Clicks at all?
Yes, I'll wait. I'm trying it out now, and I have a basic script done which grows the adoptables after a certain amount of time (ah, success!) but I still can't figure out how to put them on an account.
|
#4
|
|||
|
|||
RE: No Clicks at all?
What do you mean by put them on an account? They should already be on a user's account as their adoptable, if that's what you mean.
|
#5
|
|||
|
|||
RE: No Clicks at all?
No, I have a script where it allows the person go get a pet simply by plugging in their name and pet name. They don't need to register at all, which makes it difficult to determine ownership. The script I've done chooses a random outcome from the ones I've made and makes the pets grow after a specified number of days.[hr]
You see, what I need to do is to integrate my existing script with the Easyadoptables script so that it will allow my users to add their adopted, time growing pets to an account. |
#6
|
|||
|
|||
RE: No Clicks at all?
Ok, I see. I assume though that your script has saved in a database the username and adoptable type a user has, right? What you would probably have to do is make a conversion script in PHP for your script to the PHP EasyAdoptables Script.
The converter would have to allow users to make a new account on the EasyAdoptables script and then somehow import their adoptables into their new account. It can be done I think. You would simply create a new adoptable on the EasyAdoptables database for every old adoptable the user had, then adjust the clicks or time in the database for the new adoptable accordingly. Hope it helps, Brandon |
#7
|
|||
|
|||
RE: No Clicks at all?
Erm... No, there's no database for that. The only SQL database I've made is one that saves the ID and the date. The ID pertains to the adoptable, which I specify the growth and images in a file called adoptables.xml. So, there's no username involved.
A conversion script? OK, so I somehow have to integrate my existing script with this other script.... *scurries away* How many of the pages in EasyAdoptables have bits that include the growth-by-click system? -Rose[hr] Oh, and I can get you a .zip file if you need one. Seeing as how I made the script, it's very basic. |
#8
|
|||
|
|||
RE: No Clicks at all?
Well, the levelup.php file is the one that actually does the leveling of adoptables. The rest of the pages just pull or display the current level from the database.
|
#9
|
|||
|
|||
RE: No Clicks at all?
How difficult would it be to add something like this:
PHP Code:
PHP Code:
|
#10
|
|||
|
|||
RE: No Clicks at all?
I don't know that you can measure date as a numerical value. Maybe you can though. I suppose you could do that somehow if you could measure date as a numerical value.
You would have to do something like this to the database: Code:
alter table owned_adoptables add column leveldate varchar (30) ; I wouldn't start on this yet though as a new release is right around the corner. :) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Freeze ONLY the evolution, not the clicks | dulop | Questions and Supports | 2 | 09-28-2012 10:29 AM |
Limit amount of clicks per day | SilverDragonTears | Questions and Supports | 15 | 11-29-2011 11:50 AM |
Limit clicks/day to 10 | sensacion | Questions and Supports | 1 | 07-02-2011 05:15 AM |
Days Instead of Clicks | alonaria | Suggestions and Feature Requests | 7 | 06-25-2011 05:27 AM |
Limit clicks/day to 10, for each pet? | Quillink | Questions and Supports | 9 | 02-08-2010 02:35 PM |
What's New? |
What's Hot? |
What's Popular? |