[size=xx-large]ORGINAL OWNER SCRIPT[/size]
This script gives every aoptable an orginal owner. Nice if you have a trade/gift script :)!
1) Open your doadopt.php & search for this line;
PHP Code:
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no')");
& change it to this;
PHP Code:
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no','$loggedinname')");
2) Insert a new row in your owned_adoptables database called OT,
& with this settings;
Type: varchar (40)
Collation: latin1_general_ci
Null: Yes
Default: (THE NAME OF THE OWNER FOR PREVIEUS ADOPTED ADOPTABLES, AODPTABLES ADOPTED BY GUESTS!)
3) Now are you finished, but if you want to vieuw who's the OT, you do this;
Open your myadopts.php & search for this;
PHP Code:
// Now we see if the adoptable actually exists...
$query = "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='$loggedinname' and aid='$id'";
$result = mysql_query($query);
$num = mysql_numrows($result);
//Loop out code
$i=0;
while ($i < 1) {
$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$currentlevel=@mysql_result($result,$i,"currentlevel");
$type=@mysql_result($result,$i,"type");
$name=@mysql_result($result,$i,"name");
$totalclicks=@mysql_result($result,$i,"totalclicks");
& change it to this;
PHP Code:
// Now we see if the adoptable actually exists...
$query = "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='$loggedinname' and aid='$id'";
$result = mysql_query($query);
$num = mysql_numrows($result);
//Loop out code
$i=0;
while ($i < 1) {
$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$currentlevel=@mysql_result($result,$i,"currentlevel");
$type=@mysql_result($result,$i,"type");
$name=@mysql_result($result,$i,"name");
$OT=@mysql_result($result,$i,"OT");
$totalclicks=@mysql_result($result,$i,"totalclicks");
Search now for this;
PHP Code:
$article_title = $name."'s Statistics:";
$article_content = "<img src='".$image."'><br><br>
<b>Total Clicks: ".$totalclicks."<br>
Current Level: ".$currentlevel."<br>
Next Level: ".$nloutput."<br></b>";
& change it to this;
PHP Code:
$article_title = $name."'s Statistics:";
$article_content = "<img src='".$image."'><br><br>
<b>Total Clicks: ".$totalclicks."<br>
Current Level: ".$currentlevel."<br>
Orginal Owner: ".$OT."<br>
Next Level: ".$nloutput."<br></b>";
You are now finished :D!
[size=xx-large]SIMPLE SLOT MACHINE SCRIPT[/size]
DEMO: http://secret.uphero.com/adoptables/levelup.php?id=1
1) Upload the images for your slot machine to a folder. (mine is adoptables/slotmachine)
( Name your images 1,2,3.... )
2) Insert (into levelup.php) this
PHP Code:
$willekeurig = rand(1, 2);
( Change 2 to the amound of images for your slot machine, it's also the change for getting a price. )
after this;
PHP Code:
// Adoptable is NOT frozen, so I think we can actually proceed with the leveling up of this adoptable...
$random = rand(1, 5);
3) Insert this where you want to display the slot machine;
PHP Code:
<img src='YOURITE.COM/adoptables/FOLDER OF IMAGES SLOTMACHINE/".$willekeurig.".jpg'> <br> $melding
CHANGE .jpg to the file type of your images! (gif, png ...)
4) Now we gone do the payout :P
Insert this;
PHP Code:
if($willekeurig == 2) {
$melding = 'Place here a promo code or somthing else...'</center> ';
}
else {
$melding = 'Sorry, Try again.';
}
( change 2 to the number of your winning image, mine is 2.)
You can also do it with money etc.
Hope it works :).
More mods comming soon ;)