RE: help - changeing language
Than you, but yoru siggy also doesn't work... why??:O
So if you want the adoptables can breed 1 time for 3 days:
add new pole - breed varchar(20) and be default yes - it must be in database abandon and owned_adoptables
in breeding.php find
Quote:
//This will select all the female adoptables the user has
$result = mysql_query("SELECT * FROM ".$prefix."owned_adoptables WHERE owner = '$loggedinname' AND gender = 'female'");
$num = mysql_num_rows($result);
|
and repalce it with:
Quote:
//This will select all the female adoptables the user has
$result = mysql_query("SELECT * FROM ".$prefix."owned_adoptables WHERE owner = '$loggedinname' AND gender = 'female' AND breed = 'yes' AND isfrozen = 'no'");
$num = mysql_num_rows($result);
|
and find a little down
Quote:
//This will select all the female adoptables the user has
$result = mysql_query("SELECT * FROM ".$prefix."owned_adoptables WHERE owner = '$loggedinname' AND gender = 'male'");
$num = mysql_num_rows($result);
|
and replace it with:
Quote:
//This will select all the female adoptables the user has
$result = mysql_query("SELECT * FROM ".$prefix."owned_adoptables WHERE owner = '$loggedinname' AND gender = 'male' AND breed = 'yes' AND isfrozen = 'no'");
$num = mysql_num_rows($result);
|
next also in breeding.php find
Quote:
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','fortrade','no','$gender','$date')");
|
a replace it with:
Quote:
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','fortrade','no','$gender','$date','yes' )");
|
and up paste it: and down past it:
Quote:
mysql_query("UPDATE ".$prefix."owned_adoptables SET breed='".$breed."' WHERE aid='".$male_id."'");
mysql_query("UPDATE ".$prefix."owned_adoptables SET breed='".$breed."' WHERE aid='".$female_id."'");
|
breeding file ok ;-)
in doadopt.php find
Quote:
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no','$gender','$date')") ;
|
and replace it with
Quote:
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no','$gender','$date','y es')");
|
also in doadoptab.php find
Quote:
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no','$gender','$date')") ;
|
and replace it with
Quote:
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no','$gender','$date','y es')");
|
the last file is myadopts.php
find
Quote:
else if($act == "manage"){
|
and down you have
Quote:
$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$currentlevel=@mysql_result($result,$i,"currentlev el");
$type=@mysql_result($result,$i,"type");
$name=@mysql_result($result,$i,"name");
$gender=@mysql_result($result,$i,"gender");
$isfrozen=@mysql_result($result,$i,"isfrozen");
$totalclicks=@mysql_result($result,$i,"totalclicks ");
|
and down past it:
Quote:
$breed=@mysql_result($result,$i,"breed");
$decay=time() - 3 * 24 * 60 * 60;
// here you can set how many days. now it's 3 days, but if you past
// $decay=time() - 2 * 24 * 60 * 60;
// it will be 2 days ;-)
$removed="no";
if($breed < $decay){ //check if the creature is too the abandoned database
//yes it is, time to remove it
$removed="yes";
mysql_query("UPDATE ".$prefix."owned_adoptables SET breed='yes' WHERE aid='".$aid."'");
}
|
and down find
find
Quote:
else if($act == "manage"){
|
Quote:
mysql_query("INSERT INTO ".$prefix."abandoned VALUES ('$aid', '$type', '$name','$owner', '$currentlevel', '$totalclicks', '$code', '', '$usealternates', '$tradestatus', '$isfrozen', '$gender', '$date')");
mysql_query("DELETE FROM ".$prefix."owned_adoptables WHERE aid='$id' and owner='$loggedinname'");
|
replace with
Quote:
mysql_query("INSERT INTO ".$prefix."abandoned VALUES ('$aid', '$type', '$name','$owner', '$currentlevel', '$totalclicks', '$code', '', '$usealternates', '$tradestatus', '$isfrozen', '$gender', '$date', 'yes')");
mysql_query("DELETE FROM ".$prefix."owned_adoptables WHERE aid='$id' and owner='$loggedinname'");
|
Ok - it's the end ;-)
it's working for me ;-)
I thing you understand me ;-)
and please help me with siggy.php ;-)
|