Result |
---|
"; } if(isset($text)) $text.="You consumed some {$info['NAME']} restoring {$info['FOOD']} points. \n"; else echo "You consumed some {$info['NAME']} restoring {$info['FOOD']} points. \n"; if($id == 7007 || $id == 7034) { if(isset($text)) $text.="You feel funny... \n"; else echo "You feel funny... \n"; if($id ==7007) $db->Execute("UPDATE PLAYER SET INVISIBILITY=30 WHERE ID = $userid"); else $db->Execute("UPDATE PLAYER SET INVISIBILITY=300 WHERE ID = $userid"); } else if($info["HP"]+$uservals["HP"] < 0 || $info["MP"]+$uservals["MP"] < 0) { if(isset($text)) $text.="You cannot eat this food at this time. "; else echo "You cannot eat this food at this time. "; } else { $hp=mt_rand(ceil($info["HP"]/2),$info["HP"]); $uservals["HUNGRY"]+=$info["FOOD"]; if($uservals["HUNGRY"] > 100) $uservals["HUNGRY"]=100; $uservals["HP"]+=$hp; if($uservals["HP"] > ($uservals["HPMOD"]+$uservals['MAXHP'])) $uservals["HP"]=($uservals["HPMOD"]+$uservals['MAXHP']); $mp=mt_rand(ceil($info["MP"]/2),$info["MP"]); $uservals["MP"]+=$mp; if($uservals["MP"] > ($uservals["MPMOD"]+$uservals['MAXMP'])) $uservals["MP"]=($uservals["MPMOD"]+$uservals['MAXMP']); $db->Execute("UPDATE PLAYER SET HP={$uservals['HP']}, MP={$uservals['MP']}, HUNGRY={$uservals['HUNGRY']} WHERE ID=$userid"); if($hp > 0) { if(isset($text)) $text.="You gain $hp HP (HP ".$uservals['HP']."/".($uservals["MAXHP"]+$uservals["HPMOD"]).") \n"; else echo "You gain $hp HP (HP ".$uservals['HP']."/".($uservals["MAXHP"]+$uservals["HPMOD"]).") \n"; } if($mp > 0) { if(isset($text)) $text.="You gain $mp MP (MP ".$uservals['MP']."/".($uservals["MAXMP"]+$uservals["MPMOD"]).") \n"; else echo "You gain $mp MP (MP ".$uservals['MP']."/".($uservals["MAXMP"]+$uservals["MPMOD"]).") \n"; } } inventory_add($id,-1); if(!isset($text)) { echo " |