Im not sure this will help but i found character name change command code

Go down

Im not sure this will help but i found character name change command code

Post by <LA> on Fri Jun 18, 2010 10:01 pm

// process the script only if the form has been submitted
if (array_key_exists('reset', $_POST)) {
// start the session
$username = trim($_POST['username']);
$password = trim($_POST['password']);
$username = mysql_real_escape_string($username);
$char = trim($_POST['char']);
$name = trim($_POST['name']);
$result = mysql_query("SELECT meso, accountid FROM characters WHERE name = '$char' LIMIT 1");
list($meso, $accountid) = mysql_fetch_row($result);

$result = mysql_query("SELECT id, password, salt FROM accounts WHERE name = '$username' LIMIT 1");
list($id, $realpass, $salt) = mysql_fetch_row($result);

$sql = "SELECT * FROM accounts WHERE name = '$username'";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);

$namecheck = mysql_query("SELECT id FROM characters WHERE name=$name;");

if(mysql_num_rows(mysql_query("SELECT id FROM characters WHERE name = '$name'")))
echo "The name you have chosen is already taken. Please choose another one";
if (ereg('[^A-Za-z0-9]', $name))
echo "The name you have chosen needs to only have letters or numbers";
if (strlen($name) < 4)
echo "The name you have chosen is to short. Please make sure it is over 4 characters long.";
if($realpass == hash('sha512',$password.$salt) && $accountid == $id && $meso >= 100000000 && $loggedin < 1){
mysql_query("UPDATE characters SET meso = meso - 100000000 WHERE name = '$char' LIMIT 1");
mysql_query("UPDATE characters SET name = '$name' WHERE name = '$char' LIMIT 1");
echo "You have payed 100 mil to change $char's name to $name!";
} else if($meso < 100000000)
echo "You do not have enough money";
else if($loggedin = 0)
echo "Please log out of your character";
echo "There was an error changing your name. You have provided the wrong information or the character you have listed is not on the account you listed.";

Welcome to the Name changer! 100,000,000 mesos to change your name. Credits to Spyker710 of RageZone

if (isset($message)) {
echo '
    foreach ($message as $item) {
    echo "
  • $item
  • ";
    echo '

Username :
Password :
Character's Current Name :
Character's New Name :

Please leave the credits in there, because of my last script I said you didn't need to put the credits in, people just stole it and released it themselves.

If you do try to steal and release, I will know if it's mine. I DO recognize my own coding...

Posts : 23
Reputation : 0
Join date : 2010-05-27

View user profile

Back to top Go down

Re: Im not sure this will help but i found character name change command code

Post by WhiteDragonWD on Sat Aug 20, 2011 10:35 pm


Posts : 249
Reputation : 0
Join date : 2011-03-08
Age : 22
Location : Brazil

View user profile

Back to top Go down

Back to top

Permissions in this forum:
You cannot reply to topics in this forum