Gain EXP (to Level-up) when Feeding your pet
[i made this since many active users enjoy taking care
of their pets but does not likes to fight in the arena]
edit the file:
/forum/profile.php
find the code:
Code:
$DB_site->query("
DELETE FROM " . TABLE_PREFIX . "petz_inventory WHERE ID='$itemid'
");
add below:
Code:
// <GAIN EXP>
if (abs($theitem[HNG]) >0) { $myaddexp= abs($theitem[HNG]/4.5) + rand(0,9);
$myaddexp= round($myaddexp,0);
$petz[EXP]=$petz[EXP]+$myaddexp;
// Do The Levelling UP
if ($petz[EXP] >= 100) {
if ($petz[LVL]!=100) { $petz[LVL]=$petz[LVL]+1; }
$petz[EXP]=0;
$DB_site->query("UPDATE " . TABLE_PREFIX . "petz_petz SET LVL='$petz[LVL]' WHERE ID='$petz[ID]'");
}
$DB_site->query("UPDATE " . TABLE_PREFIX . "petz_petz SET EXP='$petz[EXP]' WHERE ID='$petz[ID]'");
}
// </GAIN EXP>
easy...