WHY YUS IT IS MY GOOD FRIEND 8D He's rather creepy because--Oh well you'll see later He is adoptable though, just it's not easy XD
Looks like Mm2+ is by far the most popular adoptables site here now. ^^
// the script below examines if an adoptable can evolve or not and executes if the conditions are met
//We need to make it check for alts!
if($evolution == "yes" and $nextlevel >= $evolutionlevel){
if ($evolutionform2 != "" and $evolutionform3 == ""){
$randevo = rand(1,2);
if ($randevo == 1){
$newtype = $evolutionform;
}
else if ($randevo == 2){
$newtype = $evolutionform2;
}
$query = "UPDATE ".$prefix."owned_adoptables SET type='".$newtype."' WHERE aid='".$id."'";
mysql_query($query);
if($type == $name){
$query = "UPDATE ".$prefix."owned_adoptables SET name='".$newtype."' WHERE aid='".$id."'";
mysql_query($query);
}
}
else if ($evolutionform2 != "" and $evolutionform3 != ""){
$randevo = rand(1,3);
if ($randevo == 1){
$newtype = $evolutionform;
}
else if ($randevo == 2){
$newtype = $evolutionform2;
}
else if ($randevo == 3){
$newtype = $evolutionform3;
}
$query = "UPDATE ".$prefix."owned_adoptables SET type='".$newtype."' WHERE aid='".$id."'";
mysql_query($query);
if($type == $name){
$query = "UPDATE ".$prefix."owned_adoptables SET name='".$newtype."' WHERE aid='".$id."'";
mysql_query($query);
}
}
else {
$newtype = $evolutionform;
$query = "UPDATE ".$prefix."owned_adoptables SET type='".$newtype."' WHERE aid='".$id."'";
mysql_query($query);
if($type == $name){
$query = "UPDATE ".$prefix."owned_adoptables SET name='".$newtype."' WHERE aid='".$id."'";
mysql_query($query);
}
}
//However, the evolution info is outdated, we will need to update it below:
$query = "SELECT * FROM ".$prefix."adoptables WHERE type='$evolutionform'";
$result = mysql_query($query);
$num = mysql_numrows($result);
//Loop out code
$i=0;
while ($i < 1) {
$elemental=@mysql_result($result,$i,"Element");
$evolutionnew=@mysql_result($result,$i,"evolution");
$evolutionnewlevel=@mysql_result($result,$i,"evolutionlevel");
$evolutionnewform=@mysql_result($result,$i,"evolutionform");
$evolutionnewform2=@mysql_result($result,$i,"evolutionform2");
$evolutionnewform3=@mysql_result($result,$i,"evolutionform3");
$i++;
}
//Now it's time to update the evolution info to the next possible evolution
$query = "UPDATE ".$prefix."owned_adoptables SET Elemental='".$elemental."' WHERE aid='".$id."'";
mysql_query($query);
$query = "UPDATE ".$prefix."owned_adoptables SET evolution='".$evolutionnew."' WHERE aid='".$id."'";
mysql_query($query);
$query = "UPDATE ".$prefix."owned_adoptables SET evolutionlevel='".$evolutionnewlevel."' WHERE aid='".$id."'";
mysql_query($query);
$query = "UPDATE ".$prefix."owned_adoptables SET evolutionform='".$evolutionnewform."' WHERE aid='".$id."'";
mysql_query($query);
$query = "UPDATE ".$prefix."owned_adoptables SET evolutionform2='".$evolutionnewform2."' WHERE aid='".$id."'";
mysql_query($query);
$query = "UPDATE ".$prefix."owned_adoptables SET evolutionform2='".$evolutionnewform3."' WHERE aid='".$id."'";
mysql_query($query);
}
// Now we check if we are enabling alternate images...