PENTAGRAMA Posted June 18, 2015 Report Share Posted June 18, 2015 Encontre un script para Desbugear un personaje. pero el problema es que no la hago funcionar. Alguien sabe como hacerla funcionar? Script <?php $pwd = Array(); $query = Array(); $db = Array(); $results = Array(); $db['host'] = "***"; $db['user'] = "root"; $db['password'] = "Password"; $db['database'] = Array(); $db['database']['player'] = "player"; $db['database']['account'] = "account"; $db['conn'] = mysql_connect($db['host'], $db['user'], $db['password']) or die('Could not connect: '.mysql_error()); ?> <form method="post" action=""> <label><input type="text" name="pg" /> Introduzca el nombre del personaje</label><br /> <label><input type="text" name="pw" /> Introduzca la contraseña de la Cuenta</label><br /> <input type="hidden" name="sbug" value="1" /> <input type="submit" value="Enviar" /> </form> <br /> <?php if($_POST['sbug']) { mysql_select_db($db['database']['account']) or die('Could not select database: '.mysql_error()); echo '$_POST[\'sbug\'] encontrado y conectado a la base de datos de cuenta'."<br />\n"; $pg = mysql_real_escape_string($_POST['pg']); $pwd['user'] = mysql_real_escape_string($_POST['pw']); $query['pwd'] = "SELECT password FROM account WHERE login = '$pg'"; $pwd['fromdb'] = mysql_query($query['pwd']); // $menge = mysql_num_rows($pwd['fromdb']); $results['pwd'] = mysql_result($pwd['fromdb'], 0); echo '$pwd[\'fromdb\'] : '.$pwd['fromdb']." <br />\n"; echo '$results[\'pwd\']'.$results['pwd']."<br />\n"; if($pwd['user'] == $results['pwd']) { echo 'Le due password coincidono'; $query['id'] = "SELECT id FROM account WHERE login = '$pg' AND password = '".$pwd['user']."'"; $id = mysql_query($query['id']); if ($id != "") { mysql_select_db($db['database']['player']) or die('Could not select database: '.mysql_error()); echo '$id diverso da "" e connesso al database player'; $query['sbug'] = "UPDATE `player`.`player` SET `x`=436377, `y`=215769, `map_index`=61, `exit_x`=436378, `exit_y`=215769, `exit_map_index`=61 WHERE (`name`='$pg') AND (`account_id`='$id')"; $success = mysql_query($query['sbug']); if($success != "") { echo "PG Sbuggato torna a giocare!!"; } else { echo "PG non Sbuggato riprova più tardi"; } } } } ?> Error, Cuando dejas los campos Sin poner nada. Error Cuando pones un usuario y password Alguien Puede Arreglarla? Quote Link to comment Share on other sites More sharing options...
escrapy01 Posted July 30, 2015 Report Share Posted July 30, 2015 Xd primero tu lo estas intetando abrir en .html y se abre en php, 2do deves modificar los datos de acceso que te pide, saludos Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.