weapon+1); $protection = round($verdediger->protection+1); $detective1 = mysql_query("SELECT * FROM `[detective]` WHERE `zoeker`='{$data->login}' AND `status`='1' AND `naam`='{$verdediger->login}'"); $detective = mysql_num_rows($detective1); $lastattempt1 = mysql_query("SELECT *,UNIX_TIMESTAMP(`date`) AS `date` FROM `attempts` WHERE `defender`='{$verdediger->login}' ORDER BY `date` DESC LIMIT 0,1"); $lastattempt = mysql_fetch_object($lastattempt1); if($_POST['modkill'] != yes OR $data->level < 50) { echo ""; if($detective ==0) print "* You don't know where this guy is! Hire a detective to find out where he is!"; elseif($weapon <= 1) echo "* You need to buy a kill weapon!"; elseif($controle < 1) echo "* Invalid username!"; elseif($kogels > $data->bullets) print "* You haven't got that many bullets."; elseif($kogels < 0) print "* You need to shoot atleast 100 bullets at a time!"; elseif($verdediger->health == 0) print "* This person is already dead!"; elseif($naam == $data->login) print "* You can't shoot yourself."; elseif($verdediger->level > 50) print "* You can't shoot at admins."; elseif(round($lastattempt->date/3600-time()/3600) + 3 > 0) print "* This person is still running away!"; elseif($data->City != $verdediger->City) print "* You need to be in the same state as $naam."; else { echo ""; $totalpower = round(($data->attack+$data->defence)/2+$data->clicks*5); if ($totalpower <= 1500 AND $totalpower >= 0) { $rank = "1"; } elseif ($totalpower > 1500 AND $totalpower <= 3000) { $rank = "2"; } elseif ($totalpower > 3000 AND $totalpower <= 7000) { $rank = "3"; } elseif ($totalpower > 7000 AND $totalpower <= 15000) { $rank = "4"; } elseif ($totalpower > 15000 AND $totalpower <= 23000) { $rank = "5"; } elseif ($totalpower > 23000 AND $totalpower <= 30000) { $rank = "6"; } elseif ($totalpower > 30000 AND $totalpower <= 45000) { $rank = "7"; } elseif ($totalpower > 45000 AND $totalpower <= 60000) { $rank = "8"; } elseif ($totalpower > 60000 AND $totalpower <= 100000) { $rank = "9"; } elseif ($totalpower > 100000 AND $totalpower <= 150000) { $rank = "10"; } elseif ($totalpower > 150000 AND $totalpower <= 250000) { $rank = "11"; } elseif ($totalpower > 250000) { $rank = "12"; } else { $rank = "0"; } $totalpower = round(($verdediger->attack+$verdediger->defence)/2+$verdediger->clicks*5); if ($totalpower <= 1500 AND $totalpower >= 0) { $vrank = "1"; } elseif ($totalpower > 1500 AND $totalpower <= 3000) { $vrank = "2"; } elseif ($totalpower > 3000 AND $totalpower <= 7000) { $vrank = "3"; } elseif ($totalpower > 7000 AND $totalpower <= 15000) { $vrank = "4"; } elseif ($totalpower > 15000 AND $totalpower <= 23000) { $vrank = "5"; } elseif ($totalpower > 23000 AND $totalpower <= 30000) { $vrank = "6"; } elseif ($totalpower > 30000 AND $totalpower <= 45000) { $vrank = "7"; } elseif ($totalpower > 45000 AND $totalpower <= 60000) { $vrank = "8"; } elseif ($totalpower > 60000 AND $totalpower <= 100000) { $vrank = "9"; } elseif ($totalpower > 100000 AND $totalpower <= 150000) { $vrank = "10"; } elseif ($totalpower > 150000 AND $totalpower <= 250000) { $vrank = "11"; } elseif ($totalpower > 250000) { $vrank = "12"; } else { $vrank = "0"; } $rank1 = round($rank*$rank); $vrank1 = round($vrank*$rank); $requiredbullets = round((((124000/$rank1)/$weapon)*$vrank1)*$protection); $damage1 = $kogels/$requiredbullets; $damage = round($damage1*100); if($damage >= $verdediger->health) { if($verdediger->clanlevel == 9) { $dbres = mysql_query("SELECT * FROM `[users]` WHERE `clan`='{$verdediger->clan}' AND `clanlevel`<'9' ORDER BY `clanlevel` DESC,(`attack`+`defence`)/2+`clicks`*5 DESC,`login` ASC LIMIT 1,1"); $aantalmembers = mysql_num_rows($dbres); if($aantalmembers >= 1) { $newowner = mysql_fetch_object($dbres); mysql_query("UPDATE `[clans]` SET `owner`='{$newowner->login}' WHERE `name`='{$verdediger->clan}'"); mysql_query("UPDATE `[users]` SET `clanlevel`='9' WHERE `login`='{$newowner->login}'"); mysql_query("UPDATE `[users]` SET `clanlevel`='8' WHERE `login`='{$verdediger->login}'"); } else { mysql_query("DELETE FROM `[clans]` WHERE `name`='{$verdediger->clan}' AND `owner`='{$verdediger->login}'"); mysql_query("UPDATE `[users]` SET `clan`='',`clanlevel`='1' WHERE `login`='{$verdediger->login}'"); } } $hitlist = mysql_query("SELECT SUM(prijs) AS `prijs` FROM `hitlist` WHERE `naam`='{$verdediger->login}'"); $extrahitlistmoney = mysql_fetch_object($hitlist); print "You shot at $naam. He died from the shots."; $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `activated`='1' AND `health`!='0' AND `level`>='1' AND `login`!='{$data->login}'"); $members1 = mysql_num_rows($dbres); $members = round($members1-$witnesn); $witnesn = rand(2,5); $begin = rand(1,$members); $witnes1 = mysql_query("SELECT * FROM `[users]` WHERE `activated`='1' AND `health`!='0' AND `level`>='1' AND `login`!='{$data->login}' ORDER BY `id` DESC LIMIT $begin,$witnesn"); while($whitnes = mysql_fetch_object($witnes1)) { mysql_query("INSERT INTO `[getuige]` (`naam`,`vermoord`,`moorder`) values('{$whitnes->login}','{$verdediger->login}','{$data->login}')"); mysql_query("INSERT INTO `[messages]`(`time`,`IP`,`from`,`to`,`subject`,`message`) values(NOW(),'{$_SERVER['REMOTE_ADDR']}','{$data->login}','{$whitnes->login}','Witnes','You witnessed [b]{$data->login}[/b] kill [b]{$verdediger->login}[/b].')"); } mysql_query("INSERT INTO `attempts` (`login`,`defender`,`date`,`bullets`,`result`) values('{$data->login}','{$verdediger->login}',NOW(),'{$kogels}','1')"); mysql_query("DELETE FROM `hitlist` WHERE `naam`='{$verdediger->login}'"); mysql_query("UPDATE `[users]` SET `cash`=`cash`+$extrahitlistmoney->prijs WHERE `login`='{$data->login}'"); mysql_query("UPDATE `[users]` set `bullets`=`bullets`-{$kogels} WHERE `login`='{$data->login}'"); mysql_query("UPDATE `[users]` SET `health`='0' WHERE `login`='{$verdediger->login}'"); } else { print "You shot at {$verdediger->login}. But he survived from the shots."; mysql_query("INSERT INTO `[messages]`(`time`,`IP`,`forwardedFor`,`from`,`to`,`subject`,`message`) values(NOW(),'{$_SERVER['REMOTE_ADDR']}','$forwardedFor','{$data->login}','$verdediger->login','Kill Attempt','{$data->login} shot at you with $kogels bullets. You lost $damage% health!')"); mysql_query("UPDATE `[users]` set `kogels`=`kogels`-{$kogels} WHERE `login`='{$data->login}'"); mysql_query("UPDATE `[users]` SET `health`=`health`-'$damage' WHERE `login`='{$verdediger->login}'"); mysql_query("INSERT INTO `attempts` (`login`,`defender`,`date`,`bullets`,`result`) values('{$data->login}','{$verdediger->login}',NOW(),'{$kogels}','0')"); } } } else { if($verdediger->clanlevel == 9) { $dbres = mysql_query("SELECT * FROM `[users]` WHERE `clan`='{$verdediger->clan}' AND `clanlevel`<'9' ORDER BY `clanlevel` DESC,(`attack`+`defence`)/2+`clicks`*5 DESC,`login` ASC LIMIT 1,1"); $aantalmembers = mysql_num_rows($dbres); if($aantalmembers >= 1) { $newowner = mysql_fetch_object($dbres); mysql_query("UPDATE `[clans]` SET `owner`='{$newowner->login}' WHERE `name`='{$verdediger->clan}'"); mysql_query("UPDATE `[users]` SET `clanlevel`='9' WHERE `login`='{$newowner->login}'"); mysql_query("UPDATE `[users]` SET `clanlevel`='8' WHERE `login`='{$verdediger->login}'"); } else { mysql_query("DELETE FROM `[clans]` WHERE `name`='{$verdediger->clan}' AND `owner`='{$verdediger->login}'"); mysql_query("UPDATE `[users]` SET `clan`='',`clanlevel`='1' WHERE `login`='{$verdediger->login}'"); } } $hitlist = mysql_query("SELECT SUM(prijs) AS `prijs` FROM `hitlist` WHERE `naam`='{$verdediger->login}'"); $extrahitlistmoney = mysql_fetch_object($hitlist); print "You shot at $naam. He died from the shots."; $witnesn = rand(5,3); $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `activated`='1' AND `health`!='0' AND `level`>='1' AND `login`!='{$data->login}'"); $members1 = mysql_num_rows($dbres); $members = round($members1-$witnesn); $begin = rand(1,$members); $witnes1 = mysql_query("SELECT * FROM `[users]` WHERE `activated`='1' AND `health`!='0' AND `level`>='1' AND `login`!='{$data->login}' ORDER BY `id` DESC LIMIT $begin,$witnesn"); while($whitnes = mysql_fetch_object($witnes1)) { mysql_query("INSERT INTO `[getuige]` (`naam`,`vermoord`,`moorder`) values('{$whitnes->login}','{$verdediger->login}','{$data->login} - MODKILL')"); mysql_query("INSERT INTO `[messages]`(`time`,`IP`,`from`,`to`,`subject`,`message`) values(NOW(),'{$_SERVER['REMOTE_ADDR']}','{$data->login}','{$whitnes->login}','Witnes','You witnessed [b]{$data->login}[/b] kill [b]{$verdediger->login}[/b].')"); } mysql_query("INSERT INTO `attempts` (`login`,`defender`,`date`,`bullets`,`result`) values('{$data->login}','{$verdediger->login} - MODKILL',NOW(),'{$kogels}','1')"); mysql_query("DELETE FROM `hitlist` WHERE `naam`='{$verdediger->login}'"); mysql_query("UPDATE `[users]` SET `cash`=`cash`+$extrahitlistmoney->prijs WHERE `login`='{$data->login}'"); mysql_query("UPDATE `[users]` set `kogels`=`kogels`-{$kogels} WHERE `login`='{$data->login}'"); mysql_query("UPDATE `[users]` SET `health`='0' WHERE `login`='{$verdediger->login}'"); } } print << Kill
Target: Bullets: ENDHTML; if($data->level < 50) { print << ENDHTML; } else { print << Modkill*: Yes - No
* Abuse will be punished! ENDHTML; } ?>   Detective tijd+$delete->uren*60*60-time(); } $prijspuur = "7500"; $prijspuur1 = number_format($prijspuur); print << Name: Hours: Cost: \$$prijspuur1,- per hour.   ENDHTML; if(isset($_POST['submit1']) && $_POST['naam'] != "" && $_POST['uren'] == 1 OR $_POST['uren'] == 2 OR $_POST['uren'] == 3 OR $_POST['uren'] == 4) { $naam2 = htmlspecialchars($_POST['naam']); $uren = htmlspecialchars($_POST['uren']); $naam1 = mysql_query("SELECT * FROM `[users]` WHERE `login`='{$naam2}'"); $naam = mysql_fetch_object($naam1); $naamaantal = mysql_num_rows($naam1); print ""; if($naamaantal < 1){ print "* Invalid username!"; } elseif($uren*$prijspuur > $data->cash){ print "* You haven't got enough moeny!."; } else{ $geld = round($uren*$prijspuur); $vind2 = round(4/$uren); $vind1 = rand(1,$vind2); if($vind1 == 1 && $naam->level <= 50) { $vind = rand(900,$uren*60*60); } else{ $vind = 0; } mysql_query("INSERT INTO `[detective]` (`tijd`,`uren`,`zoeker`,`naam`,`status`,`vind`,`land`) values(NOW(),'$uren','{$data->login}','{$naam->login}','0','$vind','')"); mysql_query("UPDATE `[users]` SET `cash`=`cash`-'$geld' WHERE `login`='{$data->login}'"); print "You hired a Detective."; } print ""; } echo ""; echo ""; if(isset($_POST['wis']) && isset($_POST['id'])) { $id = htmlspecialchars($_POST['id']); $dbres = mysql_query("SELECT * FROM `[detective]` WHERE `id`='$id' AND `zoeker`='{$data->login}'"); $aantal = mysql_num_rows($dbres); if($aantal >= 1) { mysql_query("DELETE FROM `[detective]` WHERE `id`='$id' AND `zoeker`='{$data->login}'"); print "* You stopped the Detective."; } else echo "* Invalid id!"; } print " "; ?>
"; print " "; $detectives2 = mysql_query("SELECT *,UNIX_TIMESTAMP(`tijd`) AS `tijd`,0 FROM `[detective]` WHERE `zoeker`='{$data->login}'"); while($detectives = mysql_fetch_object($detectives2)) { $tijd = $detectives->tijd+$detectives->uren*60*60-time(); $tijd2 = $tijd-3600; $tijd3 = date("H", "$tijd2"); $tijd1 = date("H:i:s", "$tijd2"); $zoeker = mysql_query("SELECT * FROM `[users]` WHERE `login`='{$detectives->naam}'"); $zoeker = mysql_fetch_object($zoeker); if($detectives->tijd + $detectives->vind < time() && $detectives->vind !=0){ mysql_query("UPDATE `[detective]` SET `land`='{$zoeker->City}', `status`='1' WHERE `id`='{$detectives->id}'"); } $deletetime = round(time()-($detectives->tijd+(($detectives->uren*3600)+(7*3600)))); if($deletetime >= 0) { mysql_query("DELETE FROM `[detective]` WHERE `id`='$detectives->id'"); } if($tijd3 > $detectives->uren) $tijd1 = "Unable to find"; if($detectives->status == 1) { $tijd1 = "Found"; $land = "$detectives->land"; } else { $land = "Searching"; } print ""; } print "
  Name: Time left: State:
id}\"> naam}\">{$detectives->naam} {$tijd1} {$land}