Gå til innhold

Trenger hjelp med "Kriminalitet" script


Anbefalte innlegg

Hei. Det er noe som er feil med dette scriptet. jeg har letet og letet men finner ingenting...

<?php /* ------------------------- */

  include("_include-jail.php");

/* ------------------------- */ ?>
<html>

<link rel="stylesheet" type="text/css" href="css-v1.css">


<head>


<body>
<?php /* ------------------------- */

     $data2            = mysql_query("SELECT *,UNIX_TIMESTAMP(`misdaad`) AS `misdaad`,0 FROM `[users]` WHERE `login`='{$data->login}' AND `level`<='50'");
     $data1            = mysql_fetch_object($data2);

   if($data1->misdaad + 120 > time()){
 echo "<table width=50% align=\"center\" cellspacing=\"0\" cellPadding=2 border=\"1\" borderColor=\"black\">";
 echo "<tr><td class=\"subTitle\" colspan=\"2\"><b>Kriminalitet</b></td></tr>";
   print "<tr><td class=\"mainTxt\"><font color=red><b>* Du kan bare gjøre kriminalitet hvert 2.min!</b></font></td></tr></table>";
   }
   else{
 echo "<table width=30% align=\"center\" cellspacing=\"0\" cellPadding=2 border=\"1\" borderColor=\"black\">";
 echo "<tr><td class=\"subTitle\" colspan=\"2\"><b>Kriminalitet</b></td></tr>";
$totalpower = round((($data->attack+$data->defence)/2)+$data->clicks*5);
   $p1a            = $data->m1;
   $p1             = round($p1a);
   $p2a            = $data->m2*0.7;
   $p2             = round($p2a);
   $p3a            = $data->m3*0.5;
   $p3             = round($p3a);
   $p4a            = $data->m4*0.3;
   $p4             = round($p4a);
   $p5a            = $data->m5*0.25;
   $p5             = round($p5a);
   $p6a            = $data->m6*0.21;
   $p6             = round($p6a);

$em1 = rand(-1,6);
$em2 = rand(-3,8);
$em3 = rand(-6,11);
$em4 = rand(-8,18);
$em5 = rand(-11,21);
$em6 = rand(-13,25);
$exother1 = rand(0,4);
$exother2 = rand(0,6);
$exother3 = rand(-1,8);
$exother4 = rand(-2,9);
$exother5 = rand(-3,11);
$exother6 = rand(-4,12);

if($p1 >=100) {
$p1 = 100;
$em1 = rand(0,-8);
$exother1 = rand(0,-5);
}
if($p2 >=100) {
$p2 = 100;
$em2 = rand(0,-12);
$exother2 = rand(0,-8);
}
if($p3 >=100) {
$p3 = 100;
$em3 = rand(0,-15);
$exother3 = rand(0,-12);
}
if($p4 >=100) {
$p4 = 100;
$em4 = rand(0,-18);
$exother4 = rand(0,-15);
}
if($p5 >=100) {
$p5 = 100;
$em5 = rand(0,-20);
$exother5 = rand(0,-17);
}
if($p6 >=100) {
$p6 = 100;
$em6 = rand(0,-23);
$exother6 = rand(0,-19);
}

if($p1 < 0) {
$p1 = 0;
$em1 = rand(0,6);
$exother1 = rand(0,5);
}
if($p2 < 0) {
$p2 = 0;
$em2 = rand(0,8);
$exother2 = rand(0,7);
}
if($p3 < 0) {
$p3 = 0;
$em3 = rand(0,10);
$exother3 = rand(0,9);
}
if($p4 < 0) {
$p4 = 0;
$em4 = rand(0,12);
$exother4 = rand(0,11);
}
if($p5 < 0) {
$p5 = 0;
$em5 = rand(0,14);
$exother5 = rand(0,13);
}
if($p6 < 0) {
$p6 = 0;
$em6 = rand(0,16);
$exother6 = rand(0,15);
}

   if(isset($_POST['submit'])) {


print "<tr><td class=\"mainTxt\" align=\"center\">";
if($_POST['code2'] != $_POST['codenn']) {
print "<font color=red><b>* Invalid code!</b></font>";
exit;
}
$randchecker = rand(1,15);

mysql_query("UPDATE `[users]` SET `misdaad`=NOW() WHERE `login`='{$_SESSION['login']}'");
mysql_query("UPDATE `[users]` SET `codechecker`='$randchecker' WHERE `login`='{$_SESSION['login']}'");

   if($R1 ==1){
$randa = rand(0,50);
$randb = rand(0,70);

mysql_query("UPDATE `[users]` SET `m1`=`m1`+'$em1' WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m2`=`m2`+'$exother2' WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m3`=`m3`+'$exother3' WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m4`=`m4`+'$exother4' WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m5`=`m5`+'$exother5'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m6`=`m6`+'$exother6'WHERE `login`='{$data->login}'");
$getal      = rand(1,100);

if($getal <$p1+1){
$geld       = rand(5,30);
mysql_query("UPDATE `[users]` SET `cash`=`cash`+'$geld' WHERE `login`='{$_SESSION['login']}'");
mysql_query("UPDATE `[users]` SET `attack`=`attack`+'$randa', `defence`=`defence`+'$randb' WHERE `login`='$data->login'");
print "Du ranet mora di! Du fikk med deg \$$geld.";
exit;
}
else{
$getal            = rand(1,4);

if($getal ==1){
mysql_query("INSERT INTO `[logs]`(login,IP,code,area,time) values('{$data->login}','{$IP}','90','Jail',NOW())");
print "Kriminalitet var ikke så vellyket. Du ble tatt av politiet. <br><b>Du er nå i fengsel!</b>";
exit;
}
else{
print "Du klarte ikke å stjele fra mora di.";
exit;
}
}
}

   if($R1 ==2){
$randa1 = rand(1,5);
$randb1 = rand(2,10);
$randa = round($randa1*10);
$randb = round($randb1*10);

mysql_query("UPDATE `[users]` SET `m2`=`m2`+'$em2'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m1`=`m1`+'$exother1' WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m3`=`m3`+'$exother3' WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m4`=`m4`+'$exother4' WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m5`=`m5`+'$exother5'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m6`=`m6`+'$exother6'WHERE `login`='{$data->login}'");
$getal      = rand(1,100);

if($getal <$p2+1){
$geld       = rand(100,500);
mysql_query("UPDATE `[users]` SET `cash`=`cash`+'$geld' WHERE `login`='{$_SESSION['login']}'");
mysql_query("UPDATE `[users]` SET `attack`=`attack`+'$randa', `defence`=`defence`+'$randb' WHERE `login`='$data->login'");
print "Du klarte å rane Politiet! Du fikk med deg \$$geld.";
exit;
}
else{
$getal            = rand(1,4);

if($getal ==1){
mysql_query("INSERT INTO `[logs]`(login,IP,code,area,time) values('$data->login','$IP','90','Jail',NOW())");
print "Kriminalitet var ikke så vellyket. Du ble tatt av politiet. <br><b>Du er nå i fengsel!</b>";
exit;
}
else{
print "Du klarte ikke å rane politiet.";
exit;
}
}
}

   if($R1 ==3){
$randa1 = rand(3,6);
$randb1 = rand(7,12);
$randa = round($randa1*10);
$randb = round($randb1*10);

mysql_query("UPDATE `[users]` SET `m3`=`m3`+'$em3' WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m4`=`m4`+'$exother4' WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m2`=`m2`+'$exother2' WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m1`=`m1`+'$exother1' WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m5`=`m5`+'$exother5'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m6`=`m6`+'$exother6'WHERE `login`='{$data->login}'");
$getal      = rand(1,100);

if($getal <$p3+1){
$geld       = rand(350,600);
mysql_query("UPDATE `[users]` SET `cash`=`cash`+'$geld' WHERE `login`='{$_SESSION['login']}'");
mysql_query("UPDATE `[users]` SET `attack`=`attack`+'$randa', `defence`=`defence`+'$randb' WHERE `login`='$data->login'");
print "Du Klarte å rane en kiosk og fikk med deg \$$geld.";
exit;
}
else{
$getal            = rand(1,4);

if($getal ==1){
mysql_query("INSERT INTO `[logs]`(login,IP,code,area,time) values('$data->login','$IP','90','Jail',NOW())");
print "Kriminalitet var ikke så vellyket. Du ble tatt av politi. <br><b>Du er nå i fengsel!</b>";
exit;
}
else{
print "Du klarte ikke å rane en kiosk.";
exit;
}
}
}

   if($R1 ==4){
$randa1 = rand(6,9);
$randb1 = rand(11,17);
$randa = round($randa1*10);
$randb = round($randb1*10);

mysql_query("UPDATE `[users]` SET `m4`=`m4`+'$em4'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m1`=`m1`+'$exother1'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m2`=`m2`+'$exother2'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m3`=`m3`+'$exother3'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m5`=`m5`+'$exother5'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m6`=`m6`+'$exother6'WHERE `login`='{$data->login}'");
$getal      = rand(1,100);

if($getal <$p4+1){
$geld       = rand(550,850);
mysql_query("UPDATE `[users]` SET `cash`=`cash`+'$geld' WHERE `login`='{$_SESSION['login']}'");
mysql_query("UPDATE `[users]` SET `attack`=`attack`+'$randa', `defence`=`defence`+'$randb' WHERE `login`='$data->login'");
print "Du klarte å stjele fra en unge! Gratulerer! Du fikk med deg \$$geld.";
exit;
}
else{
$getal            = rand(1,4);

if($getal ==1){
mysql_query("INSERT INTO `[logs]`(login,IP,code,area,time) values('$data->login','$IP','90','Jail',NOW())");
print "Kriminalitet var ikke så vellyket. Du ble tatt av politiet. <br><b>Du er nå i fengsel!</b>";
exit;
}
else{
print "Du klarte ikke å stjele fra en unge! Taper.";
exit;
}
}
}

   if($R1 ==5){
$randa = rand(40,100);
$randb = rand(80,100);
$randa1 = rand(4,10);
$randb1 = rand(8,10);
$randa = round($randa1*10);
$randb = round($randb1*10);

mysql_query("UPDATE `[users]` SET `m5`=`m5`+'$em5'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m1`=`m1`+'$exother1'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m2`=`m2`+'$exother2'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m3`=`m3`+'$exother3'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m4`=`m4`+'$exother4'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m6`=`m6`+'$exother6'WHERE `login`='{$data->login}'");
$getal      = rand(1,100);

if($getal <$p5+1){
$geld       = rand(400,1000);
mysql_query("UPDATE `[users]` SET `cash`=`cash`+'$geld' WHERE `login`='{$_SESSION['login']}'");
mysql_query("UPDATE `[users]` SET `attack`=`attack`+'$randa', `defence`=`defence`+'$randb' WHERE `login`='$data->login'");
print "Du klarte å stjele fra REMA1000! Og fikk med deg \$$geld.";
exit;
}
else{
$getal            = rand(1,4);

if($getal ==1){
mysql_query("INSERT INTO `[logs]`(login,IP,code,area,time) values('$data->login','$IP','90','Jail',NOW())");
print "Kriminalitet var ikke så vellyket. Du ble tatt av politi. <br><b>Du er nå i fengsel!</b>";
exit;
}
else{
print "Du klarte ikke å stjele fra REMA1000!.";
exit;
}
}
}

   if($R1 ==6){
$randa1 = rand(6,13);
$randb1 = rand(4,17);
$randa = round($randa1*10);
$randb = round($randb1*10);

mysql_query("UPDATE `[users]` SET `m6`=`m6`+'$em6'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m1`=`m1`+'$exother1'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m2`=`m2`+'$exother2'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m3`=`m3`+'$exother3'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m4`=`m4`+'$exother4'WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `m5`=`m5`+'$exother5'WHERE `login`='{$data->login}'");

$getal      = rand(1,100);

if($getal <$p6+1){
$geld       = rand(625,1250);
mysql_query("UPDATE `[users]` SET `cash`=`cash`+'$geld' WHERE `login`='{$_SESSION['login']}'");
mysql_query("UPDATE `[users]` SET `attack`=`attack`+'$randa', `defence`=`defence`+'$randb' WHERE `login`='$data->login'");
print "Du ranet banken! Og fikk med deg \$$geld.";
exit;
}
else{
$getal            = rand(1,4);

if($getal <= 2){
mysql_query("INSERT INTO `[logs]`(login,IP,code,area,time) values('$data->login','$IP','90','Jail',NOW())");
print "Kriminalitet var ikke så vellyket. Du ble tatt av politiet. <br><b>Du er nå i fengsel!</b>";
exit;
}
else{
print "Du klarte ikke å rane banken!.";
exit;
}
}
}

}

print "</td></tr>";


$codene = rand(1000,9999); 
$codee = ereg_replace("0", "gsqwq", $codene);
$codee = ereg_replace("1", "ssBjyq", $codee); 
$codee = ereg_replace("2", "gHiq", $codee); 
$codee = ereg_replace("3", "hWqDfA", $codee); 
$codee = ereg_replace("4", "hsqerf", $codee); 
$codee = ereg_replace("5", "Hwsawq", $codee); 
$codee = ereg_replace("6", "hSXaq", $codee); 
$codee = ereg_replace("7", "hgqYt", $codee); 
$codee = ereg_replace("8", "hAsqF", $codee); 
$codee = ereg_replace("9", "hxqSAw", $codee); 
?>
<form method="POST">
       <tr><td class="mainTxt" border="1"><input type="radio" name="R1" value="6" id="6">
       Ran Banken<LABEL id="a6" for="6"></LABEL></td><td class="mainTxt"> <? echo $p6; ?>% </td></tr>
       <tr><td class="mainTxt" border="1"><input type="radio" name="R1" value="5" id="5">
       Ran REMA1000<LABEL id="a5" for="5"></LABEL></td><td class="mainTxt"> <? echo $p5; ?>% </td></tr>
       <tr><td class="mainTxt" border="1"><input type="radio" name="R1" value="4" id="4">
       <LABEL id="a4" for="4">Stjel Fra En Unge </LABEL></td><td class="mainTxt"><? echo $p4; ?>% </td>
 </tr>
       <tr><td class="mainTxt" border="1"><input type="radio" name="R1" value="3" id="3">
       <LABEL id="a3" for="3">Ran En Kiosk </LABEL></td><td class="mainTxt"> <? echo $p3; ?>%  </td></tr>
       <tr><td class="mainTxt" border="1"><input type="radio" name="R1" value="2" id="2">
       <LABEL is="a2" for="2">Ran Politiet </LABEL></td><td class="MainTxt"> <? echo $p2; ?>% </td> 
  </tr>
       <tr><td class="mainTxt" border="1"><input type="radio" name="R1" value="1" id="1" checked>
       <LABEL id="a1" for="1">Ran Mora Di </LABEL></td><td class="mainTxt"> <? echo $p1; ?>%  </td></tr>
       <tr>
         <td class="mainTxt" border="1">

<br><input type="submit" value="Stjel!" name="submit"></td></tr>


<?php
}
?>             

</form>
</table>


</body>
</html>

kan dere hjelpe meg?

Lenke til kommentar
Videoannonse
Annonse
  • 1 måned senere...

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
  • Hvem er aktive   0 medlemmer

    • Ingen innloggede medlemmer aktive
×
×
  • Opprett ny...