Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Misc Items Begin */
- if ($_GET['use'] == 43){ //if they are trying to use an awake pill
- $result = mysql_query("SELECT * FROM `inventory` WHERE `userid`='".$user_class->id."' AND `itemid`='43'");
- $howmany = mysql_num_rows($result);
- if ($howmany > 0) {
- $result = mysql_query("UPDATE `grpgusers` SET `awake` = '".$user_class->maxawake."' WHERE `id`='".$_SESSION['id']."'");
- Take_Item(43, $user_class->id, 1);//take away an awake pill
- echo Message("You popped an awake pill.");
- }
- }
- if($_GET['use'] == 44) { # if they are trying to use Guard Protection
- $res = mysql_query("SELECT * FROM `inventory` WHERE `userid`='".$user_class->id."' AND `itemid`='44'");
- $howmany = mysql_num_rows($res);
- if($howmany > 0) {
- $result = mysql_query("UPDATE `grpgusers` SET `protection` = 3600 WHERE `id`='".$_SESSION['id']."'");
- Take_Item(44, $user_class->id, 1); # Take away the guard protection
- echo Message("You used your guard protection and are now protected for 1 hour from attacks and muggings.");
- }
- }
- if($_GET['use'] == 45) { # if they are trying to use health pills
- $res = mysql_query("SELECT * FROM `inventory` WHERE `userid`='".$user_class->id."' AND `itemid`='45'");
- $howmany = mysql_num_rows($res);
- if($user_class->hospital == 0)
- echo Message("You are not in the hospital so that would be a waste for a pill.");
- exit;
- if($howmany > 0) {
- $result = mysql_query("UPDATE `grpgusers` SET `hospital` = 0 WHERE `hospital` > 0 AND `id`='".$_SESSION['id']."'");
- Take_Item(45, $user_class->id, 1); # Take away the health pill
- echo Message("You used your health pill and removed 10 minutes of your hospital time.");
- }
- }
- if($_GET['use'] == 46) { # if they are trying to use Fertilizer
- $res = mysql_query("SELECT * FROM `inventory` WHERE `userid`='".$user_class->id."' AND `itemid`='46'");
- $howmany = mysql_num_rows($res);
- if($howmany > 0) {
- $result = mysql_query("UPDATE `grpgusers` SET `hospital` = `hospital` - 600 WHERE `hospital` > 0 AND `id`='".$_SESSION['id']."'");
- Take_Item(46, $user_class->id, 1); # Take away the Fertilizer
- echo Message("You used your health pill and removed 10 minutes of your hospital time.");
- }
- }
- if($_GET['use'] == 47) { # if they are trying to use Caffeine
- $res = mysql_query("SELECT * FROM `inventory` WHERE `userid`='".$user_class->id."' AND `itemid`='47'");
- $howmany = mysql_num_rows($res);
- if($howmany > 0) {
- $result = mysql_query("UPDATE `grpgusers` SET `hospital` = `hospital` - 600 WHERE `hospital` > 0 AND `id`='".$_SESSION['id']."'");
- Take_Item(47, $user_class->id, 1); # Take away the Caffeine
- echo Message("You used your health pill and removed 10 minutes of your hospital time.");
- }
- }
- if($_GET['use'] == 48) { # if they are trying to use Mercenary
- $res = mysql_query("SELECT * FROM `inventory` WHERE `userid`='".$user_class->id."' AND `itemid`='48'");
- $howmany = mysql_num_rows($res);
- if($howmany > 0) {
- $result = mysql_query("UPDATE `grpgusers` SET `hospital` = `hospital` - 600 WHERE `hospital` > 0 AND `id`='".$_SESSION['id']."'");
- Take_Item(48, $user_class->id, 1); # Take away the Mercenary
- echo Message("You used your health pill and removed 10 minutes of your hospital time.");
- }
- }
- if($_GET['use'] == 49) { # if they are trying to use Cocaine
- $res = mysql_query("SELECT * FROM `inventory` WHERE `userid`='".$user_class->id."' AND `itemid`='49'");
- $howmany = mysql_num_rows($res);
- if($howmany > 0) {
- $result = mysql_query("UPDATE `grpgusers` SET `hospital` = `hospital` - 600 WHERE `hospital` > 0 AND `id`='".$_SESSION['id']."'");
- Take_Item(49, $user_class->id, 1); # Take away the Cocaine
- echo Message("You used your health pill and removed 10 minutes of your hospital time.");
- }
- }
- if($_GET['use'] == 50) { # if they are trying to use Generic Steroids
- $res = mysql_query("SELECT * FROM `inventory` WHERE `userid`='".$user_class->id."' AND `itemid`='50'");
- $howmany = mysql_num_rows($res);
- if($howmany > 0) {
- $newstrength = $user_class->strength * .15;
- $time = 3600;
- $result = mysql_query("UPDATE `grpgusers` SET `strength` = '".$newstrength."',`time` = '$time' WHERE `id`='".$_SESSION['id']."'");
- Take_Item(50, $user_class->id, 1); # Take away the Generic Steroids
- echo Message("You used your health pill and removed 10 minutes of your hospital time.");
- }
- }
- if($_GET['use'] == 51) { # if they are trying to use Steroid Cocktail
- $res = mysql_query("SELECT * FROM `inventory` WHERE `userid`='".$user_class->id."' AND `itemid`='51'");
- $howmany = mysql_num_rows($res);
- if($howmany > 0) {
- $result = mysql_query("UPDATE `grpgusers` SET `hospital` = `hospital` - 600 WHERE `hospital` > 0 AND `id`='".$_SESSION['id']."'");
- Take_Item(51, $user_class->id, 1); # Take away the Steroid Cocktail
- echo Message("You used your health pill and removed 10 minutes of your hospital time.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment