Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.1.x Mods

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-29-2011, 10:30 PM
fadillzzz fadillzzz is offline
Dev Staff
 
Join Date: Jan 2010
Posts: 501
Gender: Male
Credits: 32,818
fadillzzz is an unknown quantity at this point
Default 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.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
limit adopted eggs kristhasirah Questions and Supports 9 04-19-2015 09:13 AM
Is there a Limit adopted eggs for 1.3.2? Infernette Questions and Supports 6 02-08-2013 01:20 PM
Last adopted? Xius Questions and Supports 2 05-17-2009 03:14 PM
Adopted by certain user levels... densaugeo Questions and Supports 11 04-21-2009 03:33 PM
change the "You just adopted a ..." code output LilPixie Questions and Supports 2 02-14-2009 06:41 PM


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

Currently Active Users: 598 (0 members and 598 guests)
Threads: 4,080, Posts: 32,024, 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 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636