• 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!

[Request] Send to Temple

Gangsta-jr

You are an elite knight
Senator
Joined
Jan 13, 2008
Messages
1,547
Reaction score
3
Location
Bottrop, Germany
Okay , i got a request.
I know that from Eloth.
It was like eloth.mine.nu/temp/spawn.php
It appeared a window , in which u could write any name.
This char , in case it existed , got teleportet to Temple.
e.g
Noob
"Noob got teleported to temple"

Can someone make that?
Or Gesior could u add this to your AAC?
 
I cant make an exact script due to lack of information, but this might work.
This should work for TFS (MYSQL)

temple.php
Code:
<?PHP
echo '<h1>Send Character to Temple</h1>';
echo '<form name="temple" method="post" action="templescript.php">';
echo '<table>';
echo '<tr><td>Account Number:</td> <td><input name="id" type="text" value="" class="form"></td></tr>';
echo '<tr><td>Password:</td> <td><input name="password" type="text" value="" class="form"></td></tr>';
echo '<tr><td>Name:</td> <td><input name="name" type="text" value="" class="form"></td></tr>';
echo '<tr><td></td><td><input name="temple" type="submit" value="Send Character to Temple" class="form"></td></tr>';
echo '</table>';
echo '</form>';
?>
templescript.php
Code:
<?PHP
$MySQL['serv'] = 'localhost';  	// MySQL server address
$MySQL['user'] = 'root'; 	// MySQL user name
$MySQL['pass'] = 'PASSWORD';	// MySQL password
$MySQL['db'] = 'DATABASE'; 	// MySQL database name
mysql_connect($MySQL['serv'],$MySQL['user'],$MySQL['pass']) or die("Could not connect to mysql server: ".mysql_error());
mysql_select_db($MySQL['db']) or die("Could not connect to mysql database: ".mysql_error());

$id = $_POST['id'];
$password = $_POST['password'];
$name = $_POST['name'];
$posx = CHANGE THIS TO X POS;
$posy = CHANGE THIS TO Y POS;
$posz = CHANGE THIS TO Z POS;

$query = mysql_query('SELECT id,password FROM accounts WHERE (id = '.$id.') AND (password = '.$password.')'); 
if (mysql_num_rows($query) != 0) {

mysql_query("UPDATE `players` SET `posx` = '$posx' WHERE `name` = '$name'") or die("Could not edit position! ".mysql_error());
mysql_query("UPDATE `players` SET `posy` = '$posy' WHERE `name` = '$name'") or die("Could not edit position! ".mysql_error());
mysql_query("UPDATE `players` SET `posz` = '$posz' WHERE `name` = '$name'") or die("Could not edit position! ".mysql_error());

echo '<h1>Teleported</h1>';
echo 'Your character has been sent to the temple. Click <href="temple.php">here</a> to go back.';
} else {
	echo '<h1>Error</h1>';
	echo 'Wrong account number or password. Please go <a href="temple.php">back</a>.';
	die();
}
?>
Change the following:
$MySQL['pass'] = 'PASSWORD'; - Replace PASSWORD with your mysql password
$MySQL['db'] = 'DATABASE'; - Replace DATABASE with your mysql database
$posx = CHANGE THIS TO X POS; - Change this to the x pos
$posy = CHANGE THIS TO Y POS; - Change this to the y pos
$posz = CHANGE THIS TO Z POS; - Change this to the z pos

Sorry if its a bit sloppy I made it at 2am really fast
 
Back
Top