Cronwerks MCCode/MCCodes Forums

Please login or register.

Login with username, password and session length

News:

Have you purchased a mod and lost your copy? Just file a support ticket through your "My Mods" page.


AuthorTopic: Drug Mod Add-On  (Read 270 times)

Maketextgames.com

  • Active Member
  • **
  • Reputation Power: 112
  • Maketextgames.com is working their way up.Maketextgames.com is working their way up.Maketextgames.com is working their way up.
  • Offline Offline
  • Posts: 204
    • MSN Messenger - immortalthug4ever@hotmail.com
    • View Profile
    • WWW
Drug Mod Add-On
« on: March 01, 2010, 04:49:41 PM »
This is an add-on for my drug mod

http://www.cronwerks.com/forum/free-user-created-mccode-mccodes-mods/elite-drug-mod/


Add-On to this mod.

Drug Rehab and Drug Addiction with Drug tests !

Users will now have an addiction level.  The addiction level will determine on how fast your will rises.

The normal rate for will increase is 10 per 5 minutes.

Each time you use a drug your addiction level goes up.  Once it reaches 10, your will will only go up 8 points.

If it reaches 20 or above your will only increases 5 points.

To make this go away you must check yourself into a rehab center.   There is a Bill to pay, a timer to sit out, and once both of these are done the user must take a multiple choice drug questionaire.

There are only 11 questions right now, feel free to google / make up some more and drop them into php my admin until i set up a staff function for it.

the test is only 10 questions long, questions are chosen at random and the user will not get the same question twice.  User must score at LEAST an 80 on the test to pass  80/100.

If they fail they have to wait another day to retry the test.  i'd suggest making about 50 questions so it's dificult to know the answers to all easily :-)

SQLS

Code: [Select]
-- --------------------------------------------------------

--
-- Table structure for table `userstesting`
--

CREATE TABLE IF NOT EXISTS `userstesting` (
  `tuserid` int(11) NOT NULL,
  `uSCORE` int(11) NOT NULL,
  `qID` varchar(255) NOT NULL,
  `questions` int(11) NOT NULL,
  PRIMARY KEY  (`tuserid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Code: [Select]
-- Table structure for table `tests`
--

CREATE TABLE IF NOT EXISTS `tests` (
  `qID` int(11) NOT NULL auto_increment,
  `qQUESTION` longtext NOT NULL,
  `qANSWER1` varchar(255) NOT NULL,
  `qANSWER2` varchar(255) NOT NULL,
  `qANSWER3` varchar(255) NOT NULL,
  `qCORRECT` varchar(255) NOT NULL,
  PRIMARY KEY  (`qID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ;

--
-- Dumping data for table `tests`
--

INSERT INTO `tests` (`qID`, `qQUESTION`, `qANSWER1`, `qANSWER2`, `qANSWER3`, `qCORRECT`) VALUES
(1, 'Does marijuana affect the human reproductive system?', 'most studies have proven this true', 'most studies have proven this false', 'most studies are undecided', 'most studies have proven this true'),
(2, 'Can marijuana cause cancer?', 'in laboratory test, the tars from marijuana smoke have yet to produce tumors when applied to animal skin.', 'marijuana smoke has been found to contain more cancer-causing agents than is found in tobacco smoke', 'marijuana smoke has been found to contain less cancer-causing agents than is found in tobacco smoke', 'marijuana smoke has been found to contain more cancer-causing agents than is found in tobacco smoke'),
(3, 'Which of the following is not a common known street name for the drug PCP', 'angel dust', 'shermans', 'powder', 'powder'),
(4, 'Due to the possible sedative effects of PCP, if the drug is taken with other depressants, such as alcohol or benzodiazepines, it can cause__________', 'a heart attack', 'a stroke', 'a coma', 'a coma'),
(5, 'Which of the following is NOT a long term side effect from using PCP', 'weight gain', 'memory loss', 'depression', 'weight gain'),
(6, 'Cocaine is an extraction of the leaves of the following plant\r\n\r\n,', 'etherlynon coca bush', 'erythroxylon coca bush', 'coca bush', 'erythroxylon coca bush'),
(7, 'cocaine is the second most commonly used illicit drug in the United States. What is the First?', 'pcp', 'marijuana', 'loretabs', 'marijuana'),
(8, 'The famous nineteenth-century literary character Sherlock Holmes was a frequent user of this drug', 'pcp', 'marijuana', 'cocaine', 'cocaine'),
(9, 'Psychoanalyst Sigmund Freud is one of the more famous proponents of _______. After trying the drug for the first time in 1884, he recommended it as a useful treatment for depression, alcoholism, and morphine addiction', 'pcp', 'marijuana', 'cocaine', 'cocaine'),
(10, 'This drug appeared in the mid 1980s and became an instant hitĀ among poor and young users, due to its relatively inexpensive street price and quick euphoric effects.', 'crack', 'pcp', 'marijuana', 'crack'),
(11, 'There is just as much exposure to cancer-causing chemicals from smoking one marijuana joint as smoking ______ tobacco cigarettes.', 'one', 'three', 'five', 'five');

Code: [Select]
-- --------------------------------------------------------

--
-- Table structure for table `rehab`
--

CREATE TABLE IF NOT EXISTS `rehab` (
  `rID` int(11) NOT NULL auto_increment,
  `rUSERID` int(11) NOT NULL,
  `rTIME` int(11) NOT NULL,
  `rBILL` int(11) NOT NULL,
  `test` int(11) NOT NULL,
  PRIMARY KEY  (`rID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;


Code: [Select]
ALTER TABLE `users` ADD `addiction` int(11) NOT NULL;
open up druglab.php

find

$db->query("UPDATE `users` SET `expire`=$expires WHERE `userid`=".$_SESSION['userid']."");

change to

$db->query("UPDATE `users` SET `addiction`,=`addiction`+1,`expire`=$expires WHERE `userid`=".$_SESSION['userid']."");


open up cron_minute.php
add
Code: [Select]
$db->query("UPDATE `rehab` SET `rTIME`=`rTIME`-1 WHERE `rTIME`>0");

open up cron_day.php
Code: [Select]
$db->query("UPDATE `rehab` SET `test`=0 WHERE `test`!=0");
$db->query("TRUNCATE TABLE `userstesting`");


rehab.php

Code: [Select]
<?php
require_once("globals.php");


  
$_GET['action'] = isset($_GET['action']) && is_string($_GET['action']) ? strtolower(trim($_GET['action'])) : false;
  
$_GET['ID'] = isset($_GET['ID']) && ctype_digit($_GET['ID']) ? abs((int) $_GET['ID']) : false;



switch(
$_GET['action']) 
{
case 
"reception":reception();break;
case 
'rehablist'rehablist(); break;
case 
'checkin'checkin(); break;
case 
'confirm'confirm(); break;
case 
'checkout'checkout(); break;
default:
reception();break;
}
      function 
reception()
      {
      global 
$db,$h;

echo 
"<center><strong><h2>Welcome to the Rehab Center</h2></strong></center><br />
      Please Select an option below on on what you wish to do while you are here.<br />
      <table width=80% class=ttable><tr>
                                    <th colspan=4><center>Reception Desk</center></th>
                                    </tr>
                                    <tr>
                                    <td><a href='rehab.php?action=rehablist'><u>Rehab List</u></a></td>
                                    <td><a href='rehab.php?action=checkin'><u>Check-In</u></a></td>
                                    </tr>
                                    <tr>
                                    <td><a href='drugtest.php'>Take Drug Test</a></td>
                                    <td><a href='rehab.php?action=checkout'><u>Check-Out</u></a></td>
                                    </tr>"
;
}
                                              
      function 
rehablist()
      {
      global 
$db,$h;

      
$userstuff $db->query("SELECT 
                        rh.`rID`,rh.`rUSERID`,rh.`rTIME`,rh.`rBILL`,u.`username` 
                        FROM `rehab` rh 
                        LEFT JOIN `users` u 
                        ON rh.`rUSERID`=u.`userid` 
                        ORDER BY rh.`rTIME` ASC"
);

echo 
"<center><strong><h2>Users in Rehab</h2></strong></center>
      <table width=100% class=ttable>
      <tr>
      <th>UserName</th>
      <th>Time Remaining</th>
      <th>Users Bill</th>
      </tr>"
;
while(
$dx $db->fetch_row($userstuff))
     {
echo 
"<tr>
      <td><a href='viewuser.php?u="
.$dx['rUSERID']."'>".$dx['username']."</a></td>
      <td>"
.$dx['rTIME']." Minutes</td>
      <td>"
.$dx['rBILL']." cash</td>
      </tr>"
;
     }
     }
      function 
checkin()
      {
      global 
$db,$h;
     
$addicted $db->query("SELECT `addiction` FROM `users` WHERE `userid`=".$_SESSION['userid']." && (`addiction` > 0)");
     
$xid $db->fetch_row($addicted);
        if(!
$db->num_rows($addicted))
          {
      echo 
"Being as you are not addicted to any drugs at this moment, There is no reason to check yourself in!<br /><a href='index.php'><strong>Back</strong></a>";
      
$h->endpage();
      exit;
          }
      
$inyet $db->query("SELECT `rUSERID` FROM `rehab` WHERE (`rUSERID`=".$_SESSION['userid'].")");
        if(
$db->num_rows($inyet))
          {
          echo 
"You are already checked into rehab.<br /><strong><a href='index.php'>Back</a></strong>";
         
$h->endpage();
         exit;
          }
          
$time $xid['addiction']*2;     //Change This to determine the Length of Time they are set for Rehab.--IT.
          
$bill $xid['addiction']*2000;  //Change This To determine the Cost of their Check-Out Bill.--IT.
          
    
echo "You are about to Check-In to the Rehabilitation Facility<br />
          The Cost for your stay adds up to the sum of : "
.number_format($bill)." cash.<br />
          The Length of Your stay will be : "
.number_format($time)." minutes.<br />
          If you accept these terms click&nbsp;<a href='rehab.php?action=confirm'><strong><u>Here Now</u></strong></a>&nbsp;to confirm.<br />
          Please Note.  If you cannot afford the Bill, you will not be released until it is paid.  Be sure of your decision."
;
          }
      function 
confirm()
      {
      global 
$db,$h;
     
$addict $db->query("SELECT `addiction` FROM `users` WHERE `userid`=".$_SESSION['userid']." && (`addiction` > 0)");
     
$xit $db->fetch_row($addict);
        if(!
$db->num_rows($addict))
          {
     echo 
"You are not suffering from an addiction, lets leave the help center to those who need it!<br /><a href='index.php'><strong><u>Back</u></strong></a>";
     
$h->endpage();
     exit;
          }
     
$alreadyin $db->query("SELECT `rUSERID` FROM `rehab` WHERE `rUSERID`=".$_SESSION['userid']."");
     if(
$db->num_rows($alreadyin))
          {
     echo 
"You are already checked in.<br /><a href='index.php'><strong><u>Back</u></strong></a>";
     
$h->endpage();
     exit;
          }
       
$time $xit['addiction']*2;     //Change This to determine the Length of Time they are set for Rehab.--IT.
       
$bill $xit['addiction']*2000;  //Change This To determine the Cost of their Check-Out Bill.--IT.
echo "You have successfully checked yourself into the Rehab Center.<br />
      Your remaining time to be granted a clean bill of health is: "
.number_format($time)." minutes.<br />
      To finish your rehabilitation your total bill will be : "
.number_format($bill)." cash.<br />
      Once your time is up you can head to the reception desk to pay your bill.<br />
      You will not be fully released until this bill is paid.
      <a href='rehab.php'><strong><u>Back</u></strong></a>"
;
     
$db->query("INSERT INTO `rehab` VALUES('',".$_SESSION['userid'].",$time,$bill)");
}
     function 
checkout()
     {
     global 
$db,$h;
    
$status $db->query("SELECT 
                          t.`uSCORE`,u.`money`,u.`addiction`,r.`rUSERID`,r.`rTIME` 
                          FROM `userstesting` t 
                          LEFT JOIN `users` u 
                          ON t.`tuserid`=u.`userid` 
                          LEFT JOIN `rehab` r
                          ON u.`userid`=r.`rUSERID`  
                          WHERE `userid`="
.$_SESSION['userid']."");
    if(!
$db->num_rows($status))
   {
      echo 
"You either A.  Must pass the drug test still.  Or B.  You have not checked in to rehab.<br /><a href='drugtest.php'><strong>Drug Test</strong></a>";
      
$h->endpage();
      exit;
   }
     
$dscore $db->fetch_row($status);
     if(
$dscore['uSCORE'] < 80)
   {
     echo 
"You unfortunately did not pass the exam.  Please wait until the next day to take the test again.  You must score at least an 80 to pass the exams.  Your score sadly was ".number_format($dscore['uSCORE'])." out of a possible 100.<br /><a href='rehab.php'><strong>Back</strong></a>"
     
$h->endpage();
     exit;
   }
   if(
$dscore['rTIME'] !=0)
   {
   echo 
"You must serve all your time asked in rehab to be granted a clean bill of health.<br /><a href='index.php'><strong>Back</strong></a>";
    
$h->endpage();
    exit;
   }
   
$bill $dscore['addiction']*2000;  //Change This To determine the Cost of their Check-Out Bill.--IT.
   
if(!$dscore['money'] || $dscore['money'] < $bill)
   {
   echo 
"You do not have enough money to afford the bill at this time.<a href='index.php'><strong>Back</strong></a>";
   
$h->endpage();
   exit;
   }  
   echo 
"You successfully completed your rehab course!  All stats and stat gains will return back to normal and you will be released from the center.  Try not to come back!  Drugs are bad!  <a href='index.php'><strong>Mmkay?</strong></a>";
   
$db->query("UPDATE `users` SET `money`=`money`-".$bill.",`addiction`=0 WHERE `userid`=".$_SESSION['userid']."");
   
$db->query("DELETE FROM `rehab` WHERE `rUSERID`=".$_SESSION['userid']."");
   
$db->query("DELETE FROM `userstesting` WHERE `tuserid`=".$_SESSION['userid']."");
  
$h->endpage();
exit;
}
?>


Maketextgames.com

  • Active Member
  • **
  • Reputation Power: 112
  • Maketextgames.com is working their way up.Maketextgames.com is working their way up.Maketextgames.com is working their way up.
  • Offline Offline
  • Posts: 204
    • MSN Messenger - immortalthug4ever@hotmail.com
    • View Profile
    • WWW
Re: Drug Mod Add-On
« Reply #1 on: March 01, 2010, 04:51:02 PM »
drugtest.php
Code: [Select]
<?php
require_once("globals.php");

             
$_POST['a'] = isset($_POST['a']) && is_string($_POST['a']) ? strtolower(trim($_POST['a'])) : false;
             
$_GET['action'] = isset($_GET['action']) && is_string($_GET['action']) ? strtolower(trim($_GET['action'])) : false;
             
$_SESSION['questionid'] = isset($_SESSION['questionid']) && ctype_digit($_SESSION['questionid']) ? abs((int) $_SESSION['questionid']) : false;
   

        switch(
$_GET['action']) 
        {
        case 
"index":index();break;
        case 
'question1'question1(); break;
        case 
'question2'question2(); break;
        case 
'question3'question3(); break;
        case 
'question4'question4(); break;
        case 
'question5'question5(); break;
        case 
'question6'question6(); break;
        case 
'question7'question7(); break;
        case 
'question8'question8(); break;
        case 
'question9'question9(); break;
        case 
'question10'question10(); break;
        case 
'score'score(); break;
        default:
index();break;
        }

      function 
index()
      {
      global 
$h,$db;
    
$already $db->query("SELECT `tuserid`,`uSCORE`,`qID`,`questions` FROM `userstesting` WHERE `tuserid`=".$_SESSION['userid']."");
   if(
$db->num_rows($already))
     {
     echo 
"You have already taken your test for the day.  Please return tomorrow if you did not meet the required score to try again. <br /><a href='index.php'><strong>Back</strong></a>";
     
$h->endpage();
     exit;
     }

echo 
"<center><h2>Welcome to your Rehab Release Quiz</h2></center><br />
      Here you will be tested to determine whether or not you are ready to be granted a clean bill of health.<br />
      You will be given 10 questions.  You must score at least an 8 out of 10 to pass.<br />
      If you fail you will have to wait a full day to take this test again.<br />
      Should you choose to continue, you can start by pressing the confirm link below.<br />
      <a href='drugtest.php?action=question1'><strong>Confirm</strong></a><br /><br>"
;
      
$h->endpage();
      exit;
      }
      function 
question1()
      {
      global 
$db,$h;
      
$already $db->query("SELECT `tuserid`,`uSCORE`,`qID`,`questions` FROM `userstesting` WHERE `tuserid`=".$_SESSION['userid']."");
      
$bleep $db->fetch_row($already);
   if(
$bleep['questions'] != 0)
      {
      echo 
"You have already taken this section of the quiz.  Click the link below to move on to the next one!<br />
      <a href='drugtest.php?action=question2'><strong>Next Question</strong></a>"
;
      
$h->endpage();
      exit;
      }


if (
$_SESSION['questionid'])
    {
    
$testq $db->query("SELECT `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` FROM `tests` WHERE `qID`='" $_SESSION['questionid'] . "'");
    
$tt $db->fetch_row($testq);
    }
else
    {
    
$testq $db->query("SELECT `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` FROM `tests` ORDER BY RAND()");
    
$tt $db->fetch_row($testq);
    
$_SESSION['questionid'] = $tt['qID'];
    }

 
      
if(
$_POST['a'])
      {
if(
$_POST['a'] != $tt['qCORRECT'])
      {
      
$db->query("INSERT INTO `userstesting` VALUES(".$_SESSION['userid'].",0,".$tt['qID'].",1)");
      echo 
"Incorrect Answer.<br />
      Press <a href='drugtest.php?action=question2'><strong>Here</strong></a> To continue to the next question."
;
      unset(
$_SESSION['questionid']);
      } 
else
      {
      
$db->query("INSERT INTO `userstesting` VALUES(".$_SESSION['userid'].",10,".$tt['qID'].",1)");
      echo 
"Correct Answer!<br />
      Click <a href='drugtest.php?action=question2'><strong>Here</strong></a>To proceed."
;
      unset(
$_SESSION['questionid']);
      }
      }
else
      {

      echo 

       <form method='post' action='drugtest.php?action=question1'>
       <b>"
.$tt['qQUESTION']."<BR></B>
       <input type='radio' name='a' value='"
.$tt['qANSWER1']."'>".$tt['qANSWER1']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER2']."'>".$tt['qANSWER2']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER3']."'>".$tt['qANSWER3']."<br>
       <input type='submit' value='Submit Answer!' >
       </form>"
;
      }
      }
      
      function 
question2()
      {
      global 
$db,$h;
      
$already $db->query("SELECT `tuserid`,`uSCORE`,`qID`,`questions` FROM `userstesting` WHERE `tuserid`=".$_SESSION['userid']."");
      
$bleep $db->fetch_row($already);
      
$string $bleep['qID'];
      
$pieces explode(","$string);
if(
$bleep['questions'] != 1)
      {
      echo 
"You have already taken this section of the quiz.  Click the link below to move on to the next one!<br />
      <a href='drugtest.php?action=question3'><strong>Next Question</strong></a>"
;
      
$h->endpage();
      exit;
      }


if (
$_SESSION['questionid'])
    {
    
$testq $db->query("SELECT `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` FROM `tests` WHERE `qID`='" $_SESSION['questionid'] . "'");
    
$tt $db->fetch_row($testq);
    }
else
    {
    
$testq $db->query("SELECT `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` FROM `tests` WHERE `qID`!='$pieces[0]' ORDER BY RAND()");
    
$tt $db->fetch_row($testq);
    
$_SESSION['questionid'] = $tt['qID'];
    }

      
$dbinsert $bleep['qID'] . ',' $tt['qID'];

      
if(
$_POST['a'])
      {
if(
$_POST['a'] != $tt['qCORRECT'])
      {
      
$db->query("UPDATE `userstesting` SET `qID`='{$dbinsert}',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Incorrect Answer.<br />
      Press <a href='drugtest.php?action=question3'><strong>Here</strong></a> To continue to the next question."
;
      unset(
$_SESSION['questionid']);
      } 
else
      {
      
$db->query("UPDATE `userstesting` SET `uSCORE`=`uSCORE`+10,`qID`='{$dbinsert}',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Correct Answer!<br />
      Click <a href='drugtest.php?action=question3'><strong>Here</strong></a>To proceed."
;
      unset(
$_SESSION['questionid']);
      }
      }
else
      {

      echo 
"
       <form method='post' action='drugtest.php?action=question2'>
       <b>"
.$tt['qQUESTION']."<BR></B>
       <input type='radio' name='a' value='"
.$tt['qANSWER1']."'>".$tt['qANSWER1']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER2']."'>".$tt['qANSWER2']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER3']."'>".$tt['qANSWER3']."<br>
       <input type='submit' value='Submit Answer!' >
       </form>"
;
      }
      }
      function 
question3()
      {
      global 
$db,$h;
      
$already $db->query("SELECT `tuserid`,`uSCORE`,`qID`,`questions` FROM `userstesting` WHERE `tuserid`=".$_SESSION['userid']."");
      
$bleep $db->fetch_row($already);
      
$string $bleep['qID'];
      
$pieces explode(","$string);
if(
$bleep['questions'] != 2)
      {
      echo 
"You have already taken this section of the quiz.  Click the link below to move on to the next one!<br />
      <a href='drugtest.php?action=question4'><strong>Next Question</strong></a>"
;
      
$h->endpage();
      exit;
      }


if (
$_SESSION['questionid'])
    {
    
$testq $db->query("SELECT `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` FROM `tests` WHERE `qID`='" $_SESSION['questionid'] . "'");
    
$tt $db->fetch_row($testq);
    }
else
    {
    
$testq $db->query("SELECT 
                         `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` 
                          FROM `tests` 
                          WHERE `qID`!='$pieces[0]' AND `qID`!='$pieces[1]' ORDER BY RAND()"
);
    
$tt $db->fetch_row($testq);
    
$_SESSION['questionid'] = $tt['qID'];
    }

      
$dbinsert $bleep['qID'] . ',' $tt['qID'];

      
if(
$_POST['a'])
      {
if(
$_POST['a'] != $tt['qCORRECT'])
      {
      
$db->query("UPDATE `userstesting` SET `qID`='{$dbinsert}',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Incorrect Answer.<br />
      Press <a href='drugtest.php?action=question4'><strong>Here</strong></a> To continue to the next question."
;
      unset(
$_SESSION['questionid']);
      } 
else
      {
       
$db->query("UPDATE `userstesting` SET `uSCORE`=`uSCORE`+10,`qID`='$dbinsert',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Correct Answer!<br />
      Click <a href='drugtest.php?action=question4'><strong>Here</strong></a>To proceed."
;
      unset(
$_SESSION['questionid']);
      }
      }
else
      {

      echo 
"
       <form method='post' action='drugtest.php?action=question3'>
       <b>"
.$tt['qQUESTION']."<BR></B>
       <input type='radio' name='a' value='"
.$tt['qANSWER1']."'>".$tt['qANSWER1']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER2']."'>".$tt['qANSWER2']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER3']."'>".$tt['qANSWER3']."<br>
       <input type='submit' value='Submit Answer!' >
       </form>"
;
      }
      }
function 
question4()
      {
      global 
$db,$h;
      
$already $db->query("SELECT `tuserid`,`uSCORE`,`qID`,`questions` FROM `userstesting` WHERE `tuserid`=".$_SESSION['userid']."");
      
$bleep $db->fetch_row($already);
      
$string $bleep['qID'];
      
$pieces explode(","$string);
if(
$bleep['questions'] != 3)
      {
      echo 
"You have already taken this section of the quiz.  Click the link below to move on to the next one!<br />
      <a href='drugtest.php?action=question5'><strong>Next Question</strong></a>"
;
      
$h->endpage();
      exit;
      }


if (
$_SESSION['questionid'])
    {
    
$testq $db->query("SELECT `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` FROM `tests` WHERE `qID`='" $_SESSION['questionid'] . "'");
    
$tt $db->fetch_row($testq);
    }
else
    {
    
$testq $db->query("SELECT 
                         `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` 
                          FROM `tests` 
                          WHERE `qID`!='$pieces[0]' AND `qID`!='$pieces[1]' AND `qID`!='$pieces[2]' ORDER BY RAND()"
);
    
$tt $db->fetch_row($testq);
    
$_SESSION['questionid'] = $tt['qID'];
    }

      
$dbinsert $bleep['qID'] . ',' $tt['qID'];

      
if(
$_POST['a'])
      {
if(
$_POST['a'] != $tt['qCORRECT'])
      {
      
$db->query("UPDATE `userstesting` SET `qID`='{$dbinsert}',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Incorrect Answer.<br />
      Press <a href='drugtest.php?action=question5'><strong>Here</strong></a> To continue to the next question."
;
      unset(
$_SESSION['questionid']);
      } 
else
      {
       
$db->query("UPDATE `userstesting` SET `uSCORE`=`uSCORE`+10,`qID`='$dbinsert',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Correct Answer!<br />
      Click <a href='drugtest.php?action=question5'><strong>Here</strong></a>To proceed."
;
      unset(
$_SESSION['questionid']);
      }
      }
else
      {

      echo 
"
       <form method='post' action='drugtest.php?action=question4'>
       <b>"
.$tt['qQUESTION']."<BR></B>
       <input type='radio' name='a' value='"
.$tt['qANSWER1']."'>".$tt['qANSWER1']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER2']."'>".$tt['qANSWER2']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER3']."'>".$tt['qANSWER3']."<br>
       <input type='submit' value='Submit Answer!' >
       </form>"
;
      }
      }
      function 
question5()
      {
      global 
$db,$h;
      
$already $db->query("SELECT `tuserid`,`uSCORE`,`qID`,`questions` FROM `userstesting` WHERE `tuserid`=".$_SESSION['userid']."");
      
$bleep $db->fetch_row($already);
      
$string $bleep['qID'];
      
$pieces explode(","$string);
if(
$bleep['questions'] != 4)
      {
      echo 
"You have already taken this section of the quiz.  Click the link below to move on to the next one!<br />
      <a href='drugtest.php?action=question6'><strong>Next Question</strong></a>"
;
      
$h->endpage();
      exit;
      }


if (
$_SESSION['questionid'])
    {
    
$testq $db->query("SELECT `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` FROM `tests` WHERE `qID`='" $_SESSION['questionid'] . "'");
    
$tt $db->fetch_row($testq);
    }
else
    {
    
$testq $db->query("SELECT 
                         `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` 
                          FROM `tests` 
                          WHERE `qID`!='$pieces[0]' AND `qID`!='$pieces[1]' AND `qID`!='$pieces[2]' AND `qID`!='$pieces[3]' ORDER BY RAND()"
);
    
$tt $db->fetch_row($testq);
    
$_SESSION['questionid'] = $tt['qID'];
    }

      
$dbinsert $bleep['qID'] . ',' $tt['qID'];

      
if(
$_POST['a'])
      {
if(
$_POST['a'] != $tt['qCORRECT'])
      {
      
$db->query("UPDATE `userstesting` SET `qID`='{$dbinsert}',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Incorrect Answer.<br />
      Press <a href='drugtest.php?action=question6'><strong>Here</strong></a> To continue to the next question."
;
      unset(
$_SESSION['questionid']);
      } 
else
      {
       
$db->query("UPDATE `userstesting` SET `uSCORE`=`uSCORE`+10,`qID`='$dbinsert',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Correct Answer!<br />
      Click <a href='drugtest.php?action=question6'><strong>Here</strong></a>To proceed."
;
      unset(
$_SESSION['questionid']);
      }
      }
else
      {

      echo 
"
       <form method='post' action='drugtest.php?action=question5'>
       <b>"
.$tt['qQUESTION']."<BR></B>
       <input type='radio' name='a' value='"
.$tt['qANSWER1']."'>".$tt['qANSWER1']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER2']."'>".$tt['qANSWER2']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER3']."'>".$tt['qANSWER3']."<br>
       <input type='submit' value='Submit Answer!' >
       </form>"
;
      }
      }
function 
question6()
      {
      global 
$db,$h;
      
$already $db->query("SELECT `tuserid`,`uSCORE`,`qID`,`questions` FROM `userstesting` WHERE `tuserid`=".$_SESSION['userid']."");
      
$bleep $db->fetch_row($already);
      
$string $bleep['qID'];
      
$pieces explode(","$string);
if(
$bleep['questions'] != 5)
      {
      echo 
"You have already taken this section of the quiz.  Click the link below to move on to the next one!<br />
      <a href='drugtest.php?action=question7'><strong>Next Question</strong></a>"
;
      
$h->endpage();
      exit;
      }


if (
$_SESSION['questionid'])
    {
    
$testq $db->query("SELECT `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` FROM `tests` WHERE `qID`='" $_SESSION['questionid'] . "'");
    
$tt $db->fetch_row($testq);
    }
else
    {
    
$testq $db->query("SELECT 
                         `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` 
                          FROM `tests` 
                          WHERE `qID`!='$pieces[0]' 
                          AND `qID`!='$pieces[1]' 
                          AND `qID`!='$pieces[2]' 
                          AND `qID`!='$pieces[3]' 
                          AND `qID`!='$pieces[4]' 
                          ORDER BY RAND()"
);
    
$tt $db->fetch_row($testq);
    
$_SESSION['questionid'] = $tt['qID'];
    }

      
$dbinsert $bleep['qID'] . ',' $tt['qID'];

      
if(
$_POST['a'])
      {
if(
$_POST['a'] != $tt['qCORRECT'])
      {
      
$db->query("UPDATE `userstesting` SET `qID`='{$dbinsert}',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Incorrect Answer.<br />
      Press <a href='drugtest.php?action=question7'><strong>Here</strong></a> To continue to the next question."
;
      unset(
$_SESSION['questionid']);
      } 
else
      {
       
$db->query("UPDATE `userstesting` SET `uSCORE`=`uSCORE`+10,`qID`='$dbinsert',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Correct Answer!<br />
      Click <a href='drugtest.php?action=question7'><strong>Here</strong></a>To proceed."
;
      unset(
$_SESSION['questionid']);
      }
      }
else
      {

      echo 
"
       <form method='post' action='drugtest.php?action=question6'>
       <b>"
.$tt['qQUESTION']."<BR></B>
       <input type='radio' name='a' value='"
.$tt['qANSWER1']."'>".$tt['qANSWER1']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER2']."'>".$tt['qANSWER2']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER3']."'>".$tt['qANSWER3']."<br>
       <input type='submit' value='Submit Answer!' >
       </form>"
;
      }
      }
      function 
question7()
      {
      global 
$db,$h;
      
$already $db->query("SELECT `tuserid`,`uSCORE`,`qID`,`questions` FROM `userstesting` WHERE `tuserid`=".$_SESSION['userid']."");
      
$bleep $db->fetch_row($already);
      
$string $bleep['qID'];
      
$pieces explode(","$string);
if(
$bleep['questions'] != 6)
      {
      echo 
"You have already taken this section of the quiz.  Click the link below to move on to the next one!<br />
      <a href='drugtest.php?action=question8'><strong>Next Question</strong></a>"
;
      
$h->endpage();
      exit;
      }


if (
$_SESSION['questionid'])
    {
    
$testq $db->query("SELECT `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` FROM `tests` WHERE `qID`='" $_SESSION['questionid'] . "'");
    
$tt $db->fetch_row($testq);
    }
else
    {
    
$testq $db->query("SELECT 
                         `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` 
                          FROM `tests` 
                          WHERE `qID`!='$pieces[0]' 
                          AND `qID`!='$pieces[1]' 
                          AND `qID`!='$pieces[2]' 
                          AND `qID`!='$pieces[3]' 
                          AND `qID`!='$pieces[4]'
                          AND `qID`!='$pieces[5]' 
                          ORDER BY RAND()"
);
    
$tt $db->fetch_row($testq);
    
$_SESSION['questionid'] = $tt['qID'];
    }

      
$dbinsert $bleep['qID'] . ',' $tt['qID'];

      
if(
$_POST['a'])
      {
if(
$_POST['a'] != $tt['qCORRECT'])
      {
      
$db->query("UPDATE `userstesting` SET `qID`='{$dbinsert}',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Incorrect Answer.<br />
      Press <a href='drugtest.php?action=question8'><strong>Here</strong></a> To continue to the next question."
;
      unset(
$_SESSION['questionid']);
      } 
else
      {
       
$db->query("UPDATE `userstesting` SET `uSCORE`=`uSCORE`+10,`qID`='$dbinsert',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Correct Answer!<br />
      Click <a href='drugtest.php?action=question8'><strong>Here</strong></a>To proceed."
;
      unset(
$_SESSION['questionid']);
      }
      }
else
      {

      echo 
"
       <form method='post' action='drugtest.php?action=question7'>
       <b>"
.$tt['qQUESTION']."<BR></B>
       <input type='radio' name='a' value='"
.$tt['qANSWER1']."'>".$tt['qANSWER1']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER2']."'>".$tt['qANSWER2']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER3']."'>".$tt['qANSWER3']."<br>
       <input type='submit' value='Submit Answer!' >
       </form>"
;
      }
      }
      function 
question8()
      {
      global 
$db,$h;
      
$already $db->query("SELECT `tuserid`,`uSCORE`,`qID`,`questions` FROM `userstesting` WHERE `tuserid`=".$_SESSION['userid']."");
      
$bleep $db->fetch_row($already);
      
$string $bleep['qID'];
      
$pieces explode(","$string);
if(
$bleep['questions'] != 7)
      {
      echo 
"You have already taken this section of the quiz.  Click the link below to move on to the next one!<br />
      <a href='drugtest.php?action=question9'><strong>Next Question</strong></a>"
;
      
$h->endpage();
      exit;
      }


if (
$_SESSION['questionid'])
    {
    
$testq $db->query("SELECT `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` FROM `tests` WHERE `qID`='" $_SESSION['questionid'] . "'");
    
$tt $db->fetch_row($testq);
    }
else
    {
    
$testq $db->query("SELECT 
                         `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` 
                          FROM `tests` 
                          WHERE `qID`!='$pieces[0]' 
                          AND `qID`!='$pieces[1]' 
                          AND `qID`!='$pieces[2]' 
                          AND `qID`!='$pieces[3]' 
                          AND `qID`!='$pieces[4]'
                          AND `qID`!='$pieces[5]'
                          AND `qID`!='$pieces[6]' 
                          ORDER BY RAND()"
);
    
$tt $db->fetch_row($testq);
    
$_SESSION['questionid'] = $tt['qID'];
    }

      
$dbinsert $bleep['qID'] . ',' $tt['qID'];

      
if(
$_POST['a'])
      {
if(
$_POST['a'] != $tt['qCORRECT'])
      {
      
$db->query("UPDATE `userstesting` SET `qID`='{$dbinsert}',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Incorrect Answer.<br />
      Press <a href='drugtest.php?action=question9'><strong>Here</strong></a> To continue to the next question."
;
      unset(
$_SESSION['questionid']);
      } 
else
      {
       
$db->query("UPDATE `userstesting` SET `uSCORE`=`uSCORE`+10,`qID`='$dbinsert',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Correct Answer!<br />
      Click <a href='drugtest.php?action=question9'><strong>Here</strong></a>To proceed."
;
      unset(
$_SESSION['questionid']);
      }
      }
else
      {

      echo 
"
       <form method='post' action='drugtest.php?action=question8'>
       <b>"
.$tt['qQUESTION']."<BR></B>
       <input type='radio' name='a' value='"
.$tt['qANSWER1']."'>".$tt['qANSWER1']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER2']."'>".$tt['qANSWER2']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER3']."'>".$tt['qANSWER3']."<br>
       <input type='submit' value='Submit Answer!' >
       </form>"
;
      }
      }
function 
question9()
      {
      global 
$db,$h;
      
$already $db->query("SELECT `tuserid`,`uSCORE`,`qID`,`questions` FROM `userstesting` WHERE `tuserid`=".$_SESSION['userid']."");
      
$bleep $db->fetch_row($already);
      
$string $bleep['qID'];
      
$pieces explode(","$string);
if(
$bleep['questions'] != 8)
      {
      echo 
"You have already taken this section of the quiz.  Click the link below to move on to the next one!<br />
      <a href='drugtest.php?action=question10'><strong>Next Question</strong></a>"
;
      
$h->endpage();
      exit;
      }


if (
$_SESSION['questionid'])
    {
    
$testq $db->query("SELECT `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` FROM `tests` WHERE `qID`='" $_SESSION['questionid'] . "'");
    
$tt $db->fetch_row($testq);
    }
else
    {
    
$testq $db->query("SELECT 
                         `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` 
                          FROM `tests` 
                          WHERE `qID`!='$pieces[0]' 
                          AND `qID`!='$pieces[1]' 
                          AND `qID`!='$pieces[2]' 
                          AND `qID`!='$pieces[3]' 
                          AND `qID`!='$pieces[4]'
                          AND `qID`!='$pieces[5]'
                          AND `qID`!='$pieces[6]'
                          AND `qID`!='$pieces[7]' 
                          ORDER BY RAND()"
);
    
$tt $db->fetch_row($testq);
    
$_SESSION['questionid'] = $tt['qID'];
    }

      
$dbinsert $bleep['qID'] . ',' $tt['qID'];

      
if(
$_POST['a'])
      {
if(
$_POST['a'] != $tt['qCORRECT'])
      {
      
$db->query("UPDATE `userstesting` SET `qID`='{$dbinsert}',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Incorrect Answer.<br />
      Press <a href='drugtest.php?action=question10'><strong>Here</strong></a> To continue to the next question."
;
      unset(
$_SESSION['questionid']);
      } 
else
      {
       
$db->query("UPDATE `userstesting` SET `uSCORE`=`uSCORE`+10,`qID`='$dbinsert',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Correct Answer!<br />
      Click <a href='drugtest.php?action=question10'><strong>Here</strong></a>To proceed."
;
      unset(
$_SESSION['questionid']);
      }
      }
else
      {

      echo 
"
       <form method='post' action='drugtest.php?action=question9'>
       <b>"
.$tt['qQUESTION']."<BR></B>
       <input type='radio' name='a' value='"
.$tt['qANSWER1']."'>".$tt['qANSWER1']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER2']."'>".$tt['qANSWER2']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER3']."'>".$tt['qANSWER3']."<br>
       <input type='submit' value='Submit Answer!' >
       </form>"
;
      }
      }
      function 
question10()
      {
      global 
$db,$h;
      
$already $db->query("SELECT `tuserid`,`uSCORE`,`qID`,`questions` FROM `userstesting` WHERE `tuserid`=".$_SESSION['userid']."");
      
$bleep $db->fetch_row($already);
      
$string $bleep['qID'];
      
$pieces explode(","$string);
if(
$bleep['questions'] != 9)
      {
      echo 
"You have already completed this course for the day!<br />
      <a href='drugtest.php'><strong>Back</strong></a>"
;
      
$h->endpage();
      exit;
      }
if (
$_SESSION['questionid'])
    {
    
$testq $db->query("SELECT `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` FROM `tests` WHERE `qID`='" $_SESSION['questionid'] . "'");
    
$tt $db->fetch_row($testq);
    }
else
    {
    
$testq $db->query("SELECT 
                         `qID`,`qQUESTION`,`qANSWER1`,`qANSWER2`,`qANSWER3`,`qCORRECT` 
                          FROM `tests` 
                          WHERE `qID`!='$pieces[0]' 
                          AND `qID`!='$pieces[1]' 
                          AND `qID`!='$pieces[2]' 
                          AND `qID`!='$pieces[3]' 
                          AND `qID`!='$pieces[4]'
                          AND `qID`!='$pieces[5]'
                          AND `qID`!='$pieces[6]'
                          AND `qID`!='$pieces[7]' 
                          AND `qID`!='$pieces[8]'
                          ORDER BY RAND()"
);
    
$tt $db->fetch_row($testq);
    
$_SESSION['questionid'] = $tt['qID'];
    }

      
$dbinsert $bleep['qID'] . ',' $tt['qID'];

      
if(
$_POST['a'])
      {
if(
$_POST['a'] != $tt['qCORRECT'])
      {
      
$db->query("UPDATE `userstesting` SET `qID`='{$dbinsert}',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Incorrect Answer.<br />
      Press <a href='drugtest.php?action=score'><strong>Here</strong></a> To continue to your score."
;
      unset(
$_SESSION['questionid']);
      } 
else
      {
       
$db->query("UPDATE `userstesting` SET `uSCORE`=`uSCORE`+10,`qID`='$dbinsert',`questions`=`questions`+1 WHERE `tuserid`=".$_SESSION['userid']."");
      echo 
"Correct Answer!<br />
      Click <a href='drugtest.php?action=score'><strong>Here</strong></a>To proceed to your score."
;
      unset(
$_SESSION['questionid']);
      }
      }
else
      {

      echo 
"
       <form method='post' action='drugtest.php?action=question10'>
       <b>"
.$tt['qQUESTION']."<BR></B>
       <input type='radio' name='a' value='"
.$tt['qANSWER1']."'>".$tt['qANSWER1']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER2']."'>".$tt['qANSWER2']."<br>
       <input type='radio' name='a' value='"
.$tt['qANSWER3']."'>".$tt['qANSWER3']."<br>
       <input type='submit' value='Submit Answer!' >
       </form>"
;
      }
      }
      function 
score()
      {
      global 
$db,$h;
     
$test $db->query("SELECT `uSCORE` FROM `userstesting` WHERE `tuserid`=".$_SESSION['userid']."");
     
$the $db->fetch_row($test);
     if(
$the['uSCORE'] > 70)
      {
 echo 
"Congratulations!  You successfully passed the Rehabilitation Test with a score of ".$the['uSCORE']." out of a possible 100.  You have been granted a plaque which will appear on your profile page beneath your mentors name.<br />
      We wish you all the best in your future endeavors. <br />
      If you have selected a Mentor, you are now able to check out of Rehab <a href='rehab.php'>Here</a>"
;
      }
      else
      {
      echo 
"We are sorry.  Due to a score of ".$the['uSCORE']." out of a possible 100, we cannot in good conscience allow you to leave our facility with a clean bill of health.  Should you wish, you will be able to take this test again tomorrow.  So study hard!<br />
      <a href='index.php'><strong>Back</strong></a>"
;
      }   
      }
?>

     

Maketextgames.com

  • Active Member
  • **
  • Reputation Power: 112
  • Maketextgames.com is working their way up.Maketextgames.com is working their way up.Maketextgames.com is working their way up.
  • Offline Offline
  • Posts: 204
    • MSN Messenger - immortalthug4ever@hotmail.com
    • View Profile
    • WWW
Re: Drug Mod Add-On
« Reply #2 on: March 01, 2010, 04:51:54 PM »

Maketextgames.com

  • Active Member
  • **
  • Reputation Power: 112
  • Maketextgames.com is working their way up.Maketextgames.com is working their way up.Maketextgames.com is working their way up.
  • Offline Offline
  • Posts: 204
    • MSN Messenger - immortalthug4ever@hotmail.com
    • View Profile
    • WWW
Re: Drug Mod Add-On
« Reply #3 on: March 01, 2010, 04:55:10 PM »
Drug Addiction cron_fivemins

Open Cron_Fivemins.php

Find

$query3="UPDATE users SET will=will+10 WHERE will<maxwill";
$query4="UPDATE users SET will=maxwill WHERE will>maxwill";


$db->query($query);
$db->query($query5);
$db->query($query2);
$db->query($query3);
$db->query($query4);



above this add   


$addiction = $db->query("SELECT `addiction` FROM `users`");
while($sad=$db->fetch_row($addiction))
{
if($sad['addiction'] > 9 AND $sad['addiction'] < 20)
{
$query3="UPDATE users SET will=will+8 WHERE will<maxwill";
$query4="UPDATE users SET will=maxwill WHERE will>maxwill";
$db->query($query3);
$db->query($query4);
}
elseif($sad['addiction'] >20)
{
$query3="UPDATE users SET will=will+5 WHERE will<maxwill";
$query4="UPDATE users SET will=maxwill WHERE will>maxwill";
$db->query($query3);
$db->query($query4);
}
else
{
$query3="UPDATE users SET will=will+10 WHERE will<maxwill";
$query4="UPDATE users SET will=maxwill WHERE will>maxwill";
$db->query($query3);
$db->query($query4);
}


Now you want to remove

$query3="UPDATE users SET will=will+10 WHERE will<maxwill";
$query4="UPDATE users SET will=maxwill WHERE will>maxwill";

and

$db->query($query3);
$db->query($query4);

Jordan

  • Active Member
  • **
  • Reputation Power: 55
  • Jordan has no influence.
  • Offline Offline
  • Posts: 103
  • Website Developer for hire;
    • MSN Messenger - Pudda2008@hotmail.co.uk
    • View Profile
    • WWW
    • Email
Re: Drug Mod Add-On
« Reply #4 on: March 02, 2010, 07:14:17 AM »
Looking good I see a few improvements which could be done however good work Immortal
Logged

Pudda2008@hotmail.co.uk - Feel free to add me on MSN