-Matt- Posted February 13, 2008 Posted February 13, 2008 I'm Looking for the medical pack fix. were it takes down the minute so it works. Any idea's Thanks! Quote
Klikoka Posted February 13, 2008 Posted February 13, 2008 Re: Looking For MedPack Fix You Just Use The Item Make Option On Staff Panel Quote
-Matt- Posted February 13, 2008 Author Posted February 13, 2008 Re: Looking For MedPack Fix Wich is . . . Quote
Isomerizer Posted February 13, 2008 Posted February 13, 2008 Re: Looking For MedPack Fix This is the code i use in itemuse.php and it works fine.. if($r['itmtypename'] == 'Medical') { $stat="Health"; $f=mysql_query("SELECT * FROM medical WHERE item_id={$r['itmid']}",$c); $fr=mysql_fetch_array($f); mysql_query("UPDATE inventory SET inv_qty=inv_qty-1 WHERE inv_id={$_GET['ID']}",$c); mysql_query("DELETE FROM inventory WHERE inv_qty=0",$c); mysql_query("UPDATE users SET hp=hp+{$fr['health']} WHERE userid=$userid"); mysql_query("UPDATE users SET hp=maxhp WHERE hp > maxhp"); if($r['itmname'] == 'Full Restore') { mysql_query("UPDATE users SET energy=maxenergy,will=maxwill,brave=maxbrave WHERE userid=$userid",$c); $stat="Energy"; } if($r['itmname'] == 'Motivation Potion') { $stat="Motivation"; mysql_query("UPDATE users SET will=maxwill WHERE userid=$userid",$c); } if($r['itmname'] == 'Small First Aid kit') { mysql_query("UPDATE users SET hospital=hospital-50 WHERE userid=$userid",$c); } if($r['itmname'] == 'First Aid Kit') { mysql_query("UPDATE users SET hospital=hospital-75 WHERE userid=$userid",$c); } if($r['itmname'] == 'Morphine') { mysql_query("UPDATE users SET hospital=hospital-100 WHERE userid=$userid",$c); } echo 'You use a '.$r['itmname'].'. You feel a bit of '.$stat.' coming back to you.'; mysql_query("UPDATE users SET hospital=0 WHERE hospital<0", $c); } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.