Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Mys v1.1.x Mods (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=20)
-   -   Limit Adopted Eggs (http://www.mysidiaadoptables.com/forum/showthread.php?t=1854)

fadillzzz 01-29-2011 11:30 PM

Limit Adopted Eggs
 
This mod will limit how many eggs the users can have before they can adopt more adoptables.

Open your doadopt.php
find this code
PHP Code:

if($aid == "" or !is_numeric($aid)){

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;



Add below
PHP Code:

$query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='".$loggedinname."' AND currentlevel='0'";
$result mysql_query($query);
$num mysql_num_rows($result);

if(
$num >= 5){
$canadopt "no";
$article_title "Too many eggs!";
$article_content "You already have too many eggs!";


Change 5 to the number you want to limit of how many eggs the users can have.
Note: I'm not sure if setting the $canadopt to no is necessary to make it more secure, but I put it there anyways just in case if things happen.

Do the same thing with doadoptab.php so that they can't cheat by abandoning the adoptables and adopt more from the adopt.php then readopt the abandoned from the abandon.php

If you encounter any problem with this mod, post it here.

Kaeliah 01-30-2011 12:40 PM

Looks very nice. :smile: It's nice to see such a wide range of mods. I think this mod will be particularly useful to prevent people from hogging. :wutno:

Hall of Famer 01-30-2011 02:18 PM

Nice mod, sounds like a very nice fix for many users. For those who have egg levels above lv.0, simply change the part currentlevel='0' to anything you want, such as currentlevel<'3'.

DragonTamerChris 01-30-2011 03:43 PM

I requested this mod about a week ago. :veeee:

I like it. :pleased: As Kae said, it's good to prevent people from hogging adopts.

RoconzaArt 01-30-2011 04:41 PM

I'm debating adding this do to one problem good old Hydra. I'm worried people will hydra there animals or create a bunch of dummy accounts to get around it.

PTGigi 01-30-2011 04:48 PM

Well it depends how hard it is to get past the egg stage I assume O.o

Lolz I'd add it but I just realized my site has no egg stages XD Or it could be used to say above this level (lvl 5=15 clicks sounds good) Hm....*ponders*

RoconzaArt 01-30-2011 05:03 PM

On the site I would use it on it takes 15 clicks to get out of the egg stages since all babies hatch at lvl 5 or in some rare cases lvl 4.

DragonTamerChris 01-30-2011 05:30 PM

Quote:

Originally Posted by RoconzaArt (Post 14088)
I'm debating adding this do to one problem good old Hydra. I'm worried people will hydra there animals or create a bunch of dummy accounts to get around it.

Maybe a code that makes people have to also wait a certain amount of time before their adopt can become an egg/hatchling/adult?

Missy Master 01-31-2011 09:25 AM

Quote:

Originally Posted by DragonTamerChris (Post 14091)
Maybe a code that makes people have to also wait a certain amount of time before their adopt can become an egg/hatchling/adult?

Good ideas... again, we really desperately need some way to control timing with the breeding portion of all this ...there is so much we could do with that!

I know there is a 'decay' thing for php, no idea how to get it to go in reverse or sideways hahah ...

Missy Master 01-31-2011 09:35 AM

Currently searching here for a way to delay egg/baby insertions!



http://us2.php.net/manual/en/function.strtotime.php


All times are GMT -5. The time now is 12:59 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.