Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 12-13-2013, 06:00 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 22,455
IntoRain is on a distinguished road
Default

I will break it down into smaller problems


Quote:
The main feature I would like to add at this point is an exploration system that allows users to select one of their pets of "level 3" or higher and take said pet exploring.
This is very simple. On the page they will have to choose their pets, create a dropdown with only pets of that user with a level equal or above 3. This is simple because you can look at how it's done in other pages (breeding for example) and the query to retrieve the pets from the database is fairly simple. Submiting is also in the breeding page so you can see how it works.


Quote:
A user could only take a max total of 5 pets exploring each day,
A good way to solve this is with the database itself. You will probably have to create a table for the exploration system. This exploration table will hold the user's name, the date (look at the leveling pages to see how it registers if a user already visited a pet in that day) and an integer that holds the number of pets this user sent. You can also have whatever else you want/need.
And basically, all you have to do is make a query to this table where the username matches, get the current date and compare to the date in the table:
If the dates aren't equal, register the current date in the table (through a database update, you can search the db->update function for example in the rename() function). If not, check the number of pets. If that number is bigger than 5, throw an exception and don't allow the user to submit it. If it's less than 5, allow the user to choose a pet and update this number.

Quote:
or pay a fine of currency (# undecided) to allow exploration with one more pet for each payment.
So, if the user had 5 pets already, instead of an exception it would ask the user if he wants to pay to enter another pet. If you want to limit the amount of times he can pay, you can also add that limit to the database with a counter. Put a button for him to accept the payment, take him to the choose-a-pet page and remove money from him (updating database again with the updated money value).

Quote:
The system would reset, so to speak after a total of 24 hours.
You can use a cron job for this. But honestly the comparing dates I mentioned above is how it's done in this script...

Quote:
The exploration page itself would be fairly simple, first showing the selection page, having a drop-down of eligible pets.
Mentioned above

Quote:
Once a pet is selected it would simply show a picture of the selected pet and an "Explore" button.
Ok. So when you enter explore, it should verify first if user has a pet exploring. Maybe another variable in the table mentioned above?

Quote:
At each click a status update would show under the pet (it would be best if I could add/delete/edit possible statuses at will).
You can make a "statuses" table in your database with the attributes you want and randomly get them. For example, sort a random number and that number is the ID of the status randomly obtained. So you do a query searching for the status with that ID.

Quote:
While exploring there would be a possibility of the pet "finding" something, which could be any one of the items added to the system (so an option to add items to the explore system would also be needed through the aCP).
Again, can be done as above. A table of items with IDs. Randomly sort a number. That number is the ID you want.
The ACP is not needed once you learn how to enter things directly in the databse.

Quote:
If the item is left, then the exploration simply continues. If taken, the item is added to the user's inventory.
Easy, two buttons. One of them updates the user's inventory table


Quote:
Pets may also "find" currency (between 1 and 100 currencies), which is added to the users total.
Another db->update()

Quote:
Each pet would have 25 "moves" as in times the user could press the "explore" button and possibly find something.
Maybe add another variable to the explore table? Or create a table with all adoptables currently exploring (their ID, their owner and the number of times they explored and mayeb the date to be sure)
__________________


asp.net stole my soul.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:09 PM.

Currently Active Users: 2075 (0 members and 2075 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636