Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * Module Maker: JasonTB
- * Module Name: The Corner
- * Module Support: [email protected] or JasonTB on MWG
- */
- require(__DIR__.'/globals.php');
- $error = ' ';
- if($ir['hospital'] > 0){
- $error .= "You can not rob a dealer while in the hospital. " ;
- }
- if($ir['jail'] > 0){
- $error .= "You can not rob a dealer while in the jail. ";
- }
- if($error <> ' ') {
- echo $error;
- $h->endpage();
- exit;
- }
- if (!$_GET['sell'])
- {
- echo"<h3>The Corner</h3><br />
- You bout to head down to the corner to get rid of the drugs you have.<br />
- How much you going to take with you?<br><br>
- <form action='corner.php?sell=weed' method='post'>
- Weed: <input type='text' name='weed' value='{$ir['weed']}' />
- <input type='submit' value='Sell' /></form><br>
- <form action='corner.php?sell=crack' method='post'>
- Crack: <input type='text' name='crack' value='{$ir['crack']}' />
- <input type='submit' value='Sell' /></form><br>
- <form action='corner.php?sell=heroin' method='post'>
- Heroin: <input type='text' name='heroin' value='{$ir['heroin']}' />
- <input type='submit' value='Sell' /></form>";
- }
- if ($_GET['sell'] == 'weed'){
- global $db, $ir, $c, $userid;
- $amt1 = isset($_POST['weed']) && ctype_digit($_POST['weed']) ?
- abs(intval($_POST['weed'])) : 0;
- $gain1 = $_POST['weed'] * 1000;
- $chance = rand(1, 10);
- if ($ir['weed'] <= 0){
- echo "You have no weed to sell on the corner<br>
- <a href='corner.php'>Go Back</a>";
- }
- elseif (empty($amt1)){
- echo"You didn't bring any weed.<br>
- <a href='corner.php'>Go Back</a>";
- }
- elseif ($amt1 <= 0){
- echo"You didn't bring any weed.<br>
- <a href='corner.php'>Go Back</a>";
- }
- elseif($chance >= 4){
- echo"Two hippies come up to you asking for weed you give them $amt1 grams,<br>
- in return they give you ".money_formatter($gain1).".";
- $db->query("UPDATE users SET money = money + {$gain1}, weed = weed - {$amt1} WHERE userid = {$ir['userid']}");
- }
- elseif($chance == 1){
- echo"Two men dressed in ripped up clothes ask if you have weed you have them $amt1 grams,<br>
- they grab your arm and slap handcuffs on you and take you to jail for 20 mins.";
- $db->query("UPDATE users SET jail = 20, jail_reason = 'Busted on The Corner', weed = weed - {$amt1} WHERE userid = {$ir['userid']}");
- }
- else{
- echo"Two thugs come up to you and tell you to hand over your drugs,<br>
- you do in return they put a bullet in your chest putting you in the hospital for 20 mins.";
- $db->query("UPDATE users SET hospital = 20, hospreason = 'Robbed on The Corner', weed = weed - {$amt1} WHERE userid = {$ir['userid']}");
- }
- }
- if ($_GET['sell'] == 'crack'){
- global $db, $ir, $c, $userid;
- $amt2 = isset($_POST['crack']) && ctype_digit($_POST['crack']) ?
- abs(intval($_POST['crack'])) : 0;
- $gain2 = $_POST['crack'] * 2500;
- $chance = rand(1, 10);
- if ($ir['crack'] <= 0){
- echo "You have no crack to sell on the corner<br>
- <a href='corner.php'>Go Back</a>";
- }
- elseif (empty($amt2)){
- echo"You didn't bring any crack.<br>
- <a href='corner.php'>Go Back</a>";
- }
- elseif ($amt2 <= 0){
- echo"You didn't bring any crack.<br>
- <a href='corner.php'>Go Back</a>";
- }
- elseif($chance >= 4){
- echo"Two crack head come up to you asking for weed you give them $amt2 ounces,<br>
- in return they give you ".money_formatter($gain2).".";
- $db->query("UPDATE users SET money = money + {$gain2}, crack = crack - {$amt2} WHERE userid = {$ir['userid']}");
- }
- elseif($chance == 1){
- echo"Two men dressed in ripped up clothes ask if you have crack you have them $amt1 ounces,<br>
- they grab your arm and slap handcuffs on you and take you to jail for 20 mins.";
- $db->query("UPDATE users SET jail = 20, jail_reason = 'Busted on The Corner', crack = crack - {$amt2} WHERE userid = {$ir['userid']}");
- }
- else{
- echo"Two thugs come up to you and tell you to hand over your drugs,<br>
- you do in return they put a bullet in your chest putting you in the hospital for 20 mins.";
- $db->query("UPDATE users SET hospital = 20, hospreason = 'Robbed on The Corner', crack = crack - {$amt2} WHERE userid = {$ir['userid']}");
- }
- }
- if ($_GET['sell'] == 'heroin'){
- global $db, $ir, $c, $userid;
- $amt3 = isset($_POST['heroin']) && ctype_digit($_POST['heroin']) ?
- abs(intval($_POST['heroin'])) : 0;
- $gain3 = $_POST['heroin'] * 5000;
- $chance = rand(1, 10);
- if ($ir['heroin'] <= 0){
- echo "You have no heroin to sell on the corner<br>
- <a href='corner.php'>Go Back</a>";
- }
- elseif (empty($amt3)){
- echo"You didn't bring any heroin.<br>
- <a href='corner.php'>Go Back</a>";
- }
- elseif ($amt3 <= 0){
- echo"You didn't bring any heroin.<br>
- <a href='corner.php'>Go Back</a>";
- }
- elseif($chance >= 4){
- echo"Two druggies come up to you asking for heroin you give them $amt3 grams,<br>
- in return they give you ".money_formatter($gain3).".";
- $db->query("UPDATE users SET money = money + {$gain3}, heroin = heroin - {$amt3} WHERE userid = {$ir['userid']}");
- }
- elseif($chance == 1){
- echo"Two men dressed in ripped up clothes ask if you have heroin you have them $amt3 grams,<br>
- they grab your arm and slap handcuffs on you and take you to jail for 20 mins.";
- $db->query("UPDATE users SET jail = 20, jail_reason = 'Busted on The Corner', heroin = heroin - {$amt3} WHERE userid = {$ir['userid']}");
- }
- else{
- echo"Two thugs come up to you and tell you to hand over your drugs,<br>
- you do in return they put a bullet in your chest putting you in the hospital for 20 mins.";
- $db->query("UPDATE users SET hospital = 20, hospreason = 'Robbed on The Corner', heroin = heroin - {$amt3} WHERE userid = {$ir['userid']}");
- }
- }
- $h->endpage();
Advertisement
Add Comment
Please, Sign In to add comment