I've used the same description/introduction as in the Nation Transfer topic since incase others didn't read both topics etc.
Due to the panel being totally re-written, I've decided to release some of the older scripts from the SnoxdKO Panel. By common request I've began with Nation Transfer and Character Restat(Which will be posted momentarily).
All I ask is that the credits in the title are left intact, or the releases will stop.
There's a few things for example Killing connected users which can't be released as they communicate with another application which currently is private.
Also, you'll need to remove the logging unless you're gonna reproduce the table (I'll post the SQL for it here, later).
Both scripts are 100% as were used on SnoxdKO (I haven't modified any of it, including the comments)
Anyway, enjoy:
Due to the panel being totally re-written, I've decided to release some of the older scripts from the SnoxdKO Panel. By common request I've began with Nation Transfer and Character Restat(Which will be posted momentarily).
All I ask is that the credits in the title are left intact, or the releases will stop.
There's a few things for example Killing connected users which can't be released as they communicate with another application which currently is private.
Also, you'll need to remove the logging unless you're gonna reproduce the table (I'll post the SQL for it here, later).
Both scripts are 100% as were used on SnoxdKO (I haven't modified any of it, including the comments)
Anyway, enjoy:
PHP:
<?php
// Restat - Not really commented it much atm - I'll finish commenting later.
require('./anti_inject.php');
require('./kill_user.php');
parth1tr();
parth1('100%', 2, 'center');
echo 'Character Restat - Beta - by BlaDe @ Snoxd.net';
parth2();
parth2tr();
//ini_set('error_reporting', '1');
//ini_set('display_errors', '1');
if (isset($_SESSION['sesuser'])) {
if ($_GET['Confirmed'] == 1) {
$user = trim($_POST['Character']);
$stat = trim($_POST['stat']);
$user = test($user);
$stat = test($stat);
$connect = odbc_connect($dbname, $dbuser, $dbpass);
$query = "SELECT COUNT(*) FROM RESTAT_LOG WHERE DATEDIFF(hh,[Date],GETDATE()) < 24 AND AccountID = '" . $_SESSION['sesuser'] . "'";
$results = odbc_exec($connect, $query);
while (odbc_fetch_row($results)) {
$logcheck = odbc_result($results, 1);
}
if ($logcheck > 0) {
part1('100%', 1, 1, 'center');
echo '</br>You may only use this feature once every 24hours.';
echo '</br></br><a href="./index.php">Back</a></br>';
part2();
die();
}
$getuser = "SELECT strCharID FROM CURRENTUSER where strAccountID = '" . $_SESSION['sesuser'] . "'";
$getusere = odbc_exec($connect, $getuser);
$characterID = odbc_result($getusere, 1);
if (strlen(trim($characterID)) > 0) {
$killed = 1;
KillUserAndWait(trim($characterID), $connect);
}
if (strlen($user) == 0) {
part1('100%', 1, 1, 'center');
echo '</br>You\'r Character was invalid!';
echo '</br></br><a href="./index.php">Back</a></br>';
part2();
die();
}
if (strlen($stat) == 0) {
part1('100%', 1, 1, 'center');
echo '</br>You havn\'t selected a basic stat point!';
echo '</br></br><a href="./index.php">Back</a></br>';
part2();
die();
}
// Anti SQL Inject poop - I'm not sure if it's even possible to manipulate the values of a combo
// However - I'd personally rather not risk it.
// Get the current stats n race ;o
$query = "SELECT Strong, Cha, Dex, Intel, Sta, Points, Race, Gold, strItem FROM USERDATA WHERE strUserID ='" . $user . "'";
$results = odbc_exec($connect, $query);
while (odbc_fetch_row($results)) {
$str = odbc_result($results, 1);
$mp = odbc_result($results, 2);
$dex = odbc_result($results, 3);
$int = odbc_result($results, 4);
$hp = odbc_result($results, 5);
$rem = odbc_result($results, 6);
$race = odbc_result($results, 7);
$cash = odbc_result($results, 8);
$items = odbc_result($results, 9);
}
if ($cash < 500000000) {
part1('100%', 1, 1, 'center');
echo '</br>You havn\'t got enough money!';
echo '</br>You must have 500 Million GP in your inventory.';
echo '</br></br><a href="./index.php">Back</a></br>';
part2();
die();
}
// lame slow method by Goat