Thread: Mm2+
View Single Post
  #33  
Old 02-17-2011, 02:39 PM
PTGigi's Avatar
PTGigi PTGigi is offline
Crazily Friendly~HoF
 
Join Date: Jul 2009
Location: Somewhere >.>
Posts: 370
Gender: Female
Credits: 36,719
PTGigi
Default

And I fail at typing X3 I meant "three evolutions" instead of triple evolution system X3 I added in a second alt first for Pokemon that can have two outcomes for evolutions and then added in a total of seven for the Eevee evolutions. But since I was only planning on 3 outcomes via level-up I didn't bother making a 7 level-up outcome system. :3 (since I've also begun to add "special" level up, for now just a certain mood (ie Pokemon like Togepi) and 'areas' for level-up (like the MD system for level-up was, or like the twin rocks for Eevee to go to Leafeon/Glaceon, stuff like that :3)

And here's what I got on my level-up page:
PHP Code:
// 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... 
It worked fine as two evolution paths so I don't know why this third would mess up D: And I know the tables aren't messed up because I checked that :S

EDIT: Derp see one problem that's no evolution related but the 'Elements'. Odd I never noticed that failing, it works which is odd O.o *fixes anyway*
__________________


"I see now that the circumstances of one's birth are irrelevant; it is what you do with the gift of life that determines who you are."~Mewtwo
My Adoptables|Nuzlocke Webcomic
Reply With Quote