/**
* Code used when a player equips a ring.
*/
$info=object_info($id);
if(inventory_check($id) > 0)
{
if($uservals["RING1"]+0 != 0 && $uservals["RING2"]+0 != 0)
{
echo "
";
echo "Result |
\n";
echo ""; echo "You cannot equip more rings !\n"; echo " |
\n";
}
else
{
$uservals["ATTACK"]+=$info["ATTACK"];
$uservals["PROTECTION"]+=$info["PROTECTION"];
$uservals["DEXMOD"]+=$info["DEXTERITY"];
$uservals["STRMOD"]+=$info["STRONGNESS"];
$uservals["CHAMOD"]+=$info["CHARISMA"];
$uservals["INTMOD"]+=$info["INTELLIGENCE"];
$uservals["BLOCK"]+=$info["BLOCK"];
$uservals["HPMOD"]+=$info["HP"];
$uservals["MPMOD"]+=$info["MP"];
if(($uservals["HP"]+0) > ($uservals["HPMOD"]+$uservals["MAXHP"]))
$uservals["HP"]=$uservals["HPMOD"]+$uservals["MAXHP"];
if(($uservals["MP"]+0) > ($uservals["MPMOD"]+$uservals["MAXMP"]))
$uservals["MP"]=$uservals["MPMOD"]+$uservals["MAXMP"];
if($uservals["RING1"]+0 == 0)
$uservals["RING1"]=$id;
else if($uservals["RING2"]+0 == 0)
$uservals["RING2"]=$id;
$db->Execute("UPDATE PLAYER SET ATTACK={$uservals['ATTACK']}, PROTECTION={$uservals['PROTECTION']},
DEXMOD={$uservals['DEXMOD']}, STRMOD={$uservals['STRMOD']}, CHAMOD={$uservals['CHAMOD']},
INTMOD={$uservals['INTMOD']}, HPMOD={$uservals['HPMOD']}, MPMOD={$uservals['MPMOD']},
HP={$uservals['HP']}, MP={$uservals['MP']}, BLOCK={$uservals['BLOCK']},
RING1={$uservals['RING1']},RING2={$uservals['RING2']} WHERE ID=$userid");
inventory_add($id,-1);
echo "
";
echo "Result |
\n";
echo ""; echo "You equipped your ".$info["NAME"]." successfully.\n"; echo " |
\n";
}
}
?>
Wyszukiwarka
Podobne podstrony:
equip ringequip ringequip shieldthree axis ring plot kiodane jan27Beyoncé Single ladies (Put a ring on it)equip armortoken ring 3 6rl5faenidlemor5ydzvykagrrwoxbl4jwrxs7y 6rl5faenidlemor5ydzvykagrrwoxbl4jwrxs7yBronze Signet Ringtoken ring zkvitl2vd5ubrwvzjrajzjtxnhq46vd3mavwomi zkvitl2vd5ubrwvzjrajzjtxnhq46vd3mavwomiRing [alternatywna solucja]Lost Souls The Promise RingHaggard, H Rider Queen Sheba s Ringringbead&button peeking pearls ring and earringsQuick Start LotR War of the Ringwięcej podobnych podstron