View Single Post
  #25  
Old 09-22-2005, 09:28 PM
Magoth78
Discordant
 
Join Date: Jun 2003
Posts: 345
Default

Code:
<?php

$host = 'dbhost';
$dbuser = 'dbuser';
$dbpass = 'dbpass';
$db = 'dbname';

$link = mysql_connect($host, $dbuser, $dbpass)
   OR die(mysql_error());

if (!mysql_select_db($db, $link))
	{
    	echo 'Unable to connect to the database.';
	echo mysql_errno($link) . ": " . mysql_error($link). "\n";
    	exit;
	}


$charname = $_POST['charname'];
$accountname = $_POST['accountname'];


$query3 = mysql_query("SELECT account_id FROM character_ WHERE name='$charname';");
	if (!$query3) {
   	die('Could not query:' . mysql_error());
	}
	$find_accountid = mysql_result($query3, 0);
	

$query3a = mysql_query("SELECT id FROM account WHERE name='$accountname';");
	if (!$query3a) {
   	die('Could not query:' . mysql_error());
	}
	$verifyaccount_id = mysql_result($query3a, 0);
	


		if($find_accountid != $verifyaccount_id)
		{
		echo ("Account name matched with this char ...  <b> Failed! </b> \r\n <br> <b> Verify your Character's name and your's Account's name!"); 
		mysql_close($link);
		exit;
		}
		

		if($find_accountid = $verifyaccount_id)
		{
			echo ("Account name matched with this char ...  <b> Ok! </b> \r\n <br>");
			$corpsemove = mysql_query("UPDATE player_corpses  SET zoneid='your_zone_id', x='0', y='0', z='0', rezzed='1'  WHERE charname='$charname';");
			if (!$corpsemove) {
   			die('Could not query:' . mysql_error());
			echo ("Error moving the corpses... \r\n");
			}
			echo "Corpse(s) moved to the sanctuary. \r\n";
			mysql_close($link);
		}

?>
Here's the script. You can change the zone where you want to move the corpse, change the locations, the rezz status etc...

You have to make a html page with a form and 2 entries: charname and accountname so it verifies if the entries match before sending the corpse.

Mag
__________________
User's projects:
-- Original EMPIRE I/II and Factions! servers
-- Web GM Portal
-- EQoffline/bots
Reply With Quote