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 03-22-2012, 10:08 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 112,322
SilverDragonTears is on a distinguished road
Default

Scratch that, lol... that was hard... Ok I had to pick through... is this right?

Code:
	// Begin the output of all the adoptables to the user...
    $uncommon = rand(1,50); 
    $rare = rand(1,100); 
    $ultrarare = rand(1,200); 

    if ($uncommon==1){ 
    $query = "SELECT * FROM ".$prefix."adoptables WHERE rarity='1' ORDER BY RAND() LIMIT 1"; 
    } 
    else if ($rare==1){ 
    $query = "SELECT * FROM ".$prefix."adoptables WHERE rarity='2' ORDER BY RAND() LIMIT 1"; 
    }     
    else if ($ultrarare==1){ 
    $query = "SELECT * FROM ".$prefix."adoptables WHERE rarity='3' ORDER BY RAND() LIMIT 1"; 
    }     
    else{ 
    $query = "SELECT * FROM ".$prefix."adoptables WHERE rarity='0' ORDER BY RAND() LIMIT 1"; 
    } 
	$stmt = $adopts->query($query);
	
	$article_content .= "
	<table class='adopt'><tr>";

	
	while($row = $stmt->fetch(PDO::FETCH_OBJ)) {
		$aid=$row->id; //The adoptable's ID
		$type=$row->type;
		$description=$row->description;
		$eggimage=$row->eggimage;

		// Call a function to check if we have the proper privledge level to adopt this pet
		if($promocode == "") $promocode = "none";
		$canadopt = canadopt($aid, "showing", $promocode, $row); // Feed an adoptable ID and showing, to show the adopt to guests...

		if($canadopt == "yes"){
			//If we can adopt the adoptable, show the image and adoption link...
			$article_content .= "
			<td  VALIGN='top'><br><br><br><br><br><br><br><br><br><br><a href='doadopt.php?id=".$aid."'><img src='picuploads/png/e42598f988b271a7e66b36b9a5d8143b.png' /></a><br>
			{$description}</td>";
		}
	}



    if ($uncommon==1){ 
    $query = "SELECT * FROM ".$prefix."adoptables WHERE rarity='1' ORDER BY RAND() LIMIT 1"; 
    } 
    else if ($rare==1){ 
    $query = "SELECT * FROM ".$prefix."adoptables WHERE rarity='2' ORDER BY RAND() LIMIT 1"; 
    }     
    else if ($ultrarare==1){ 
    $query = "SELECT * FROM ".$prefix."adoptables WHERE rarity='3' ORDER BY RAND() LIMIT 1"; 
    }     
    else{ 
    $query = "SELECT * FROM ".$prefix."adoptables WHERE rarity='0' ORDER BY RAND() LIMIT 1"; 
    } 
	$stmt = $adopts->query($query);
	
	$article_content .= "
	<table class='adopt'><tr>";

	
	while($row = $stmt->fetch(PDO::FETCH_OBJ)) {
		$aid=$row->id; //The adoptable's ID
		$type=$row->type;
		$description=$row->description;
		$eggimage=$row->eggimage;

		// Call a function to check if we have the proper privledge level to adopt this pet
		if($promocode == "") $promocode = "none";
		$canadopt = canadopt($aid, "showing", $promocode, $row); // Feed an adoptable ID and showing, to show the adopt to guests...

		if($canadopt == "yes"){
			//If we can adopt the adoptable, show the image and adoption link...
			$article_content .= "
			<td  VALIGN='top'><br><br><br><br><br><br><br><br><br><br><a href='doadopt.php?id=".$aid."'><img src='picuploads/png/e42598f988b271a7e66b36b9a5d8143b.png' /></a><br>
			{$description}</td>";
		}
	}



    if ($uncommon==1){ 
    $query = "SELECT * FROM ".$prefix."adoptables WHERE rarity='1' ORDER BY RAND() LIMIT 1"; 
    } 
    else if ($rare==1){ 
    $query = "SELECT * FROM ".$prefix."adoptables WHERE rarity='2' ORDER BY RAND() LIMIT 1"; 
    }     
    else if ($ultrarare==1){ 
    $query = "SELECT * FROM ".$prefix."adoptables WHERE rarity='3' ORDER BY RAND() LIMIT 1"; 
    }     
    else{ 
    $query = "SELECT * FROM ".$prefix."adoptables WHERE rarity='0' ORDER BY RAND() LIMIT 1"; 
    } 
	$stmt = $adopts->query($query);
	
	$article_content .= "
	<table class='adopt'><tr>";

	
	while($row = $stmt->fetch(PDO::FETCH_OBJ)) {
		$aid=$row->id; //The adoptable's ID
		$type=$row->type;
		$description=$row->description;
		$eggimage=$row->eggimage;

		// Call a function to check if we have the proper privledge level to adopt this pet
		if($promocode == "") $promocode = "none";
		$canadopt = canadopt($aid, "showing", $promocode, $row); // Feed an adoptable ID and showing, to show the adopt to guests...

		if($canadopt == "yes"){
			//If we can adopt the adoptable, show the image and adoption link...
			$article_content .= "
			<td  VALIGN='top'><br><br><br><br><br><br><br><br><br><br><a href='doadopt.php?id=".$aid."'><img src='picuploads/png/e42598f988b271a7e66b36b9a5d8143b.png' /></a><br>
			{$description}</td>";
		}
	}
__________________

Check out SilvaTales

Last edited by SilverDragonTears; 03-22-2012 at 10:14 PM.
Reply With Quote
  #2  
Old 03-22-2012, 10:25 PM
!Alive !Alive is offline
Member
 
Join Date: Feb 2012
Posts: 39
Gender: Male
Credits: 1,742
!Alive is on a distinguished road
Default

That looks like it should work with the new 1.3 version. Though I have not messed with it at all as of yet. XP But it looks like you make the changes so it should work in the 1.3 version. XD
Reply With Quote
  #3  
Old 03-22-2012, 10:29 PM
!Alive !Alive is offline
Member
 
Join Date: Feb 2012
Posts: 39
Gender: Male
Credits: 1,742
!Alive is on a distinguished road
Default

^-^ I'm glad that it works for you. *blushes* Thanks, I'm happy that I was able to help even with my limited knowledge. X3
You don't owe me anything, seriously. I don't even know what I would ask for...
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


All times are GMT -5. The time now is 03:10 PM.

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