Mysidia Adoptables Support Forum  

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

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 04-12-2012, 02:29 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 111,666
Abronsyth is on a distinguished road
Default Could some one code this..?

So, on my site, I'd like to make it so that a user can only own one growing pet at a time. So, they adopt their first pet, then it must reach it's maximum level ('3' in most cases; 0, 1, 2, 3) before they can adopt another pet.

Would someone be able to code this for me? I can offer art, line art, shading of a line art, writing, or something as payment.

Well, Thanks
-Iris
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #2  
Old 04-12-2012, 08:25 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 81,209
SilverDragonTears is on a distinguished road
Default

I think you're looking for something like what I have. The user can only have 5 eggs at a time. But you have to add it to breeding.php, the pound (which with the new script I haven't tried yet) doadopt.php and I think that's it. It's something like this though

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!"; 
}
        else
__________________

Check out SilvaTales
Reply With Quote
  #3  
Old 04-13-2012, 10:06 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 111,666
Abronsyth is on a distinguished road
Default

Thank you so much! However, on which line should that go for each?

Thanks,
-Iris
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #4  
Old 04-13-2012, 02:57 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 81,209
SilverDragonTears is on a distinguished road
Default

This is the doadopt.php

Code:
<?php

include("functions/functions.php");
include("functions/functions_users.php");
include("functions/functions_adopts.php");
include("inc/lang.php");

//***************//
//  START SCRIPT //
//***************//

$id = $_GET["id"];
$promocode = $_GET["promocode"];
$name = $_GET["name"];
$date = date("M j, Y");
// $date = "Oct 23, 2001";

if($isloggedin == "yes"){

$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!"; 
}
        else 
	if($_SESSION["allow"] != 1){
	
		$article_title = $err_idnoexist;
		$article_content = $err_idnoexist_text;
	}
Change the currentlevel to the level just below your adults and the 5 to 1
__________________

Check out SilvaTales
Reply With Quote
  #5  
Old 04-13-2012, 07:25 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 111,666
Abronsyth is on a distinguished road
Default

Huh, didn't seem to work properly. Now it keeps saying that the id was invalid, the id is 3, and it shows up in the url, but wasn't working. I reverted it to the original...hm...
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #6  
Old 04-13-2012, 07:27 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 81,209
SilverDragonTears is on a distinguished road
Default

Can you post the edited part?
__________________

Check out SilvaTales
Reply With Quote
Reply

Thread Tools
Display Modes

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
Looking for someone to code for me :) Infernette Staff Central 33 02-03-2014 04:44 PM
PHP Code. Aasixx Questions and Supports 2 09-17-2012 05:15 PM
Invite Code/Alpha Code Shex Questions and Supports 0 03-07-2011 04:08 AM
I need a simple code Cosma Questions and Supports 2 01-26-2010 04:55 AM
Need a code to vote Cosma Questions and Supports 0 01-25-2010 04:24 PM


All times are GMT -5. The time now is 08:39 AM.

Currently Active Users: 437 (0 members and 437 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