• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

(PHP) Finding cheaters script

alkamenes

New Member
Joined
Jul 15, 2007
Messages
115
Reaction score
2
hi,
thats my first code and proud of that, even it may look noobish.

What it does?


Account: *******
Password: *******

Name: Gryment
Level: 207
Vocation: Elite Knight
Id: 877

Name: Sasza zbieracz lapek
Level: 12
Vocation: Paladin
Id: 3777

Gryment has got 1028000 gold.
Sasza zbieracz lapek has got 0 gold.
Complete money on account:
_________________

1028000

And here is the code:

search.php
Code:
<form action="form3.php" method="get">
  <input type="text" size="17" name="playername">
  <br><br>
  <center>
  <input type="submit" value="Search">


  </center>
  </form>
form3.php
Code:
<?php
$pname = $_GET["playername"];



mysql_connect("localhost","a","b") or die(mysql_error());
mysql_select_db("undeads") or die(mysql_error());

$abfrage = "SELECT name, account_id FROM players WHERE name = '".$pname."'";





$ergebnis = mysql_query($abfrage); 
if(mysql_num_rows($ergebnis)==0) {
    echo "This character does not exists.";
}
else
{
    $array1 = mysql_fetch_array($ergebnis);


$acc = $array1["account_id"] ;

echo "Account: $acc <br>";




$abfrage2 = "SELECT id, password FROM accounts WHERE id = '".$acc."'";

$ergebnis2 = mysql_query($abfrage2);
$array2 = mysql_fetch_array($ergebnis2);
$pw = $array2["password"];

echo "Password: $pw <br>";



$abfrage3 = "SELECT id, name, account_id, level, vocation FROM players WHERE account_id = '".$acc."'";

$ergebnis3 = mysql_query($abfrage3);

$vocs = array("None", "Sorcerer", "Druid", "Paladin", "Knight", "Master Sorcerer", "Elder Druid", "Royal Paladin", "Elite Knight");

    $id = array();
    
    $namen = array();

while($row = mysql_fetch_array($ergebnis3))
{

 echo "<br> Name: ".$row["name"]." <br>";
 echo "Level: ".$row["level"]." <br>";
 $voc = $row["vocation"];
  echo "Vocation: ".$vocs[$voc]." <br>";
  echo "Id: ".$row["id"]." <br>";

 array_push($id, $row["id"]);
 array_push($namen, $row["name"]);

}

$namen2 = next($namen);


   $money_on = array();


   
  

  $name_ord = 0;
  $money_each_chara = array();

      foreach ($id as $key3 => $wert2)
  {

  if($name_ord == $key3)
  
  {

      
      
 $abfrage7 = "SELECT player_id, itemtype, count FROM player_depotitems WHERE player_id = '".$wert2."' AND itemtype = '2148'";

 $ergebnis7 = mysql_query($abfrage7);
 
 $abfrage8 = "SELECT player_id, itemtype, count FROM player_depotitems WHERE player_id = '".$wert2."' AND itemtype = '2152'";

 $ergebnis8 = mysql_query($abfrage8);
 
 $abfrage9 = "SELECT player_id, itemtype, count FROM player_depotitems WHERE player_id = '".$wert2."' AND itemtype = '2160'";

 $ergebnis9 = mysql_query($abfrage9);
 
 

     while($row5 = mysql_fetch_array($ergebnis7))
{

    $money2 = $money2 + $row5["count"];

}

     while($row6 = mysql_fetch_array($ergebnis8))
{

    $money3 = $money3 + $row6["count"]*100;

}

     while($row7 = mysql_fetch_array($ergebnis9))
{

    $money4 = $money4 + $row7["count"]*10000;

}

        $money_all = $money2 + $money3 + $money4;
        array_push($money_each_chara, $money_all);
        $money2 = 0;
        $money3 = 0;
        $money4 = 0;
        $money_all = 0;
        $name_ord++;

    }
    
      }

     
        foreach ($money_each_chara as $key5 => $wertung)
         {

        echo "<br> $namen[$key5] has got $wertung gold.";
      }



         echo "<br> Complete money on account: <br> _________________ <br> <br> ".array_sum($money_each_chara)."";




}
 ?>


I hope its useful ;) .
 
Last edited:
Enter a name of somone.

1. You will get his account data
2. A list with all characters on that account with name, level, vocation, id
3. It will count the money of these characters
4. And count the complete money of all characters
 
Its nice code for Middle Exp-rate Servers! Great..
by the way:
Can i see all accounts via IP?
like i Type : 127.0.0.1 Than i can see Logs from that ip.
 
You should make LUA script to save how long player play every day and how much exp he gained in this time. Then show list of power-bot gamers (low exp, long online) :)
-------
I'll use system like this on my OT to find botters who make runes at night (and script to find players who login from same IP).
 
You should make LUA script to save how long player play every day and how much exp he gained in this time. Then show list of power-bot gamers (low exp, long online) :)
-------
I'll use system like this on my OT to find botters who make runes at night (and script to find players who login from same IP).

Nice idea, Im gonna try that next.
 
Back
Top