Limiting number of eggs and hatchlings

Forum
Last Post
Threads / Messages

SilverDragonTears

I am your Nemesis.
Premium Member
Joined
Jun 1, 2011
Messages
1,113
Points
36
Mysidian Dollar
51,802
Currently I have this which says if you have more than 5 eggs you can't adopt.

Code:
$stmt = $adopts->query("SELECT * FROM ".constant("PREFIX")."owned_adoptables WHERE owner='".$loggedinname."' AND currentlevel<='3' AND isfrozen='no'");
$data = $stmt->fetchAll();
$num = count($data);

if($num >= 5){ 
$canadopt = "no"; 
$article_title = "Too many eggs!"; $article_content = "You already have too many eggs to take care of! Come back once you have hatched an egg!"; 
}

How can I change this so that you can't have more than 5 eggs AND say... 10 hatchilings at a time?
 
this is brilliant, which program did you insert this code to, and what line? I'd be happy with just the limiting eggs.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,130
Members
1,603
Latest member
Monako
BETA

Latest Threads

Latest Posts

Top