unstuck one logon two character db and two worlds menu

Shout-Out

User Tag List

Results 1 to 2 of 2
  1. #1
    snake eyes's Avatar Active Member
    Reputation
    66
    Join Date
    Oct 2008
    Posts
    171
    Thanks G/R
    10/20
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    unstuck one logon two character db and two worlds

    hi
    i made a php script unstuck u can use it at one relam with two database and one logon the only proplem with it that if a player got the same char name at both database it will chose the first but at least its tested and it works
    here the config
    Code:
    <?php
    
    //account database info
    $aHost = "127.0.0.1";
    $aDatabase = "logon";
    $aPort = "3307";
    $aUsername = "root";
    $aPass = "mangos";
    
    //character database info
    $cHost = "127.0.0.1";
    $cDatabase = "char_blizz";
    $cDatabase2 = "char_fun";
    $cPort = "3307";
    $cUsername = "root";
    $cPass = "mangos";
    
    ?>
    and the php script it self as follow (dont forget to reply)
    Code:
    the right one as in the next replay
    as u see its masy but it works i have been working on it for the last three days
    and there is some variable that i did not use but i wanted to be the first to release such a thing
    Last edited by snake eyes; 03-05-2009 at 12:13 PM. Reason: wrong script

    unstuck one logon two character db and two worlds
  2. #2
    snake eyes's Avatar Active Member
    Reputation
    66
    Join Date
    Oct 2008
    Posts
    171
    Thanks G/R
    10/20
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    bleave it or not my computer crashed before ibackup the right script sorry about that i have relaised i posted the wrong one here it is the right script nad it's only for reviving wishing u good luck
    <?php


    echo "<html><body>";
    echo "<center><table>";
    echo "<tr><td colspan=2 align=center></td></tr>";


    include('_config.php');
    global $aHost, $aDatabase, $aPort, $aUsername, $aPass, $cHost, $cDatabase, $cDatabase2, $cPort, $cUsername, $cPass;

    if(isset($_POST['submit']))
    {
    $account = $_POST['account'];
    $password = $_POST['password'];
    $character = $_POST['character'];


    $acct = "";

    //get make sure the character exists on the correct account and password is the same
    $con = mysql_connect($aHost.":".$aPort, $aUsername, $aPass) or die(mysql_error());
    mysql_select_db($aDatabase) or die(mysql_error());

    //Remove bullshit characters from user entered data
    $account = mysql_real_escape_string($account);
    $password = mysql_real_escape_string($password);
    $acct = mysql_real_escape_string($acct);





    $query = "SELECT acct FROM accounts WHERE login ='".$account."' AND password = '".$password."'";

    $result = mysql_query($query) or die(mysql_error());
    $numrows = mysql_num_rows($result);

    //if no rows, user entered invalid data
    if ($numrows == 0)
    {
    die("Account name or password is incorrect!");
    }
    elseif ($numrows == 1)
    {

    $row = mysql_fetch_array($result);
    $acct = $row[0];



    //get accnt# from characters table where the name is character $character
    $con = mysql_connect($cHost.":".$cPort, $cUsername, $cPass) or die(mysql_error());
    mysql_select_db($cDatabase) or die(mysql_error());

    //Remove bullshit characters from user entered data
    $character = mysql_real_escape_string($character);

    $query = "SELECT acct FROM characters WHERE name = '".$character."'";

    $result = mysql_query($query) or die(mysql_error());
    $numrows = mysql_num_rows($result);

    echo "<tr><td align=center>";

    //if no rows exist, the character does not exist

    if($numrows == 0)
    {



    $con = mysql_connect($cHost.":".$cPort, $cUsername, $cPass) or die(mysql_error());
    mysql_select_db($cDatabase2) or die(mysql_error());

    $character = mysql_real_escape_string($character);

    $query = "SELECT acct FROM characters WHERE name = '".$character."'";

    $result = mysql_query($query) or die(mysql_error());
    $numrows = mysql_num_rows($result);

    echo "<tr><td align=center>";

    //if no rows exist, the character does not exist
    if($numrows == 0)

    {
    die("No such character exists on that account!");
    }

    elseif($numrows == 1)




    {


    $row = mysql_fetch_array($result);
    $acct = $row[0];
    }
    }



    //update the character table to set the character to hearth location
    $query = "UPDATE `characters` SET `deathstate` = 0 , `player_flags` =0 , `auras` =0 WHERE name = '".$character."'";
    mysql_query($query) or die(mysql_error());

    }
    $query = "UPDATE `characters` SET `deathstate` = 0 , `player_flags` =0 , `auras` =0 WHERE name = '".$character."'";
    mysql_query($query) or die(mysql_error());
    echo "<center>";
    echo "<br />";
    echo "<br />";
    echo "The Character with the name '<b>".$character."</b>' under Account '<b>".$account."</b>' has been revived!<br>";
    echo "<a href='/playertools/revive.php'>Back</a>";

    echo "</td></tr>";

    //close mysql connection
    mysql_close();

    }
    //if page is loaded, display unstuck form
    else
    {


    echo "<center>";
    echo "<form name=myform method=post action'/revive.php'>";

    echo "<br />";
    echo "<h1><u><b>Character Revive</b></u></h1>";
    echo "<br />";
    echo "<tr><td width=125>Account: </td><td><input type=text name=account value=''></td></tr>";
    echo "<br />";
    echo "<tr><td width=125>Character: </td><td><input type=text name=character value=''></td></tr>";
    echo "<br />";
    echo "<tr><td width=125>Password: </td><td><input type=password name=password value=''></td></tr>";
    echo "<br />";
    echo "<tr><td colspan=2 align=center><br><input type=submit name=submit value=Revive></td></tr>";
    echo "</form>";
    }

    echo "<center>";
    echo "</table>";
    echo "<br />";
    echo "<br />";
    echo "<small>You <b>MUST</b> be offline for this tool to successfully work</small><br /><br />";
    echo "<br />";
    echo " ";
    echo "<br />";
    echo "</center>";

    ?>

Similar Threads

  1. [Selling] Atlantiss account with two characters (Rogue and Warrior, both on horde)
    By ringadingbaby in forum WoW Private Server Buy Sell Trade
    Replies: 1
    Last Post: 08-02-2016, 07:00 PM
  2. Looking for one or two people to help me get a 3.3.5a WOTLK Server up and running.
    By cowman1 in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 06-15-2011, 03:23 PM
  3. [SQL] How can i transfer characters from and arcemu server to one of trinity?
    By kenito24 in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 05-23-2011, 10:37 AM
  4. Glitchy's Model Swapper One Handed - Two Handed Problem!
    By Drugoh in forum WoW ME Questions and Requests
    Replies: 10
    Last Post: 05-14-2010, 06:46 AM
  5. 2.4.3 and 3.0.9 whit one logon
    By kenefcho in forum WoW EMU Questions & Requests
    Replies: 10
    Last Post: 04-27-2009, 04:03 PM
All times are GMT -5. The time now is 02:55 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search