Thread: Egg Generator
View Single Post
  #11  
Old 04-30-2013, 05:25 PM
bobbybig bobbybig is offline
Member
 
Join Date: Mar 2011
Posts: 36
Gender: Male
Credits: 5,140
bobbybig is on a distinguished road
Default

This can be handled by a cron job and basically have a page built to hold all the pets to be adopted at a set number (say 25 on page at all times) you then program the cron job to check the page if it needs more pets added to the page to keep it full, and run an array and pick what pets will go in in random order. You can even go so far as to program it to value some pets over others keeping some pets as rare in the array.

The cron job can be set to run at certain times. (every 5 min on a server is a bit steep, but every 15 min or 30 min is doable on most hosts without problems)

In the admin control it can be set to allow the admin to pick the pets to go in the array, and even what pets might be rare.

In the old days we had to set up every cron job on the hosting to have them run but by todays standards cron jobs can be set up easily in code and even set up to set the times that they run in the admin control panel and all be handed from source code.

Now you ask what happens if you say set it to only fill the page ever 30 min and the pets start to run out on the page? Well this is where you also allow for members to drop eggs onto the page as well.

The only problem I see is the small bit of work the database would need to go through to keep up with what is there what was taken off and what is put on by both cron job and players.

On dragon cave I am sure that database never sleeps. lol

OK there is my 2 cents lol I will gladly add my 2 cents to making it happen.
Reply With Quote