Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 15:55

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Unlocking character error

Discussion on Unlocking character error within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2008
Posts: 69
Received Thanks: 3
Unlocking character error

Hy everyone,I have a problem with my server,with some characters,some characters work,others don't.At the login the character stays with his hand up.I have resolved it changing the map where the character is found out.But i can't always complete them manually.So I found a script:



<?php
$pwd = Array();
$query = Array();
$db = Array();
$results = Array();

$db['host'] = "host";
$db['user'] = "user";
$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" /> Introdu numele caracterului </label><br />
<label><input type="text" name="pw" /> Introdu parola contului </label><br />
<input type="hidden" name="sbug" value="1" />
<input type="submit" value="Sbugga personaggio" />
</form>
<br />

<?php
if($_POST['sbug']) {
mysql_select_db($db['database']['account']) or die('Could not select database: '.mysql_error());
echo '$_POST[\'sbug\'] trovato e connesso al database account'."<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_fetch_row($pwd['fromdb']);
echo $pwd['fromdb']."<br />\n";
echo $results['pwd'][0]."<br />\n";

if($pwd['user'] == $results['pwd'][0]) {#$pwd['fromdb']) { #&& $menge == "1") {
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";
} else {
echo "PG NON Sbuggato";
}
}
}
}
?>




And I implemented it in my site,but whatever I write in it it shows
$_POST['sbug'] trovato e connesso al database account
Resource id #4
What can I modify in it?Can you please tell me? Thank you very much.
Cosmyn2010 is offline  
Old 10/06/2011, 00:55   #2


 
Benhero's Avatar
 
elite*gold: 964
Join Date: Mar 2008
Posts: 2,634
Received Thanks: 1,637
EDIT###

Sry fail...

I watch the script...


Mfg. Benhero

Have you try this...
1. Charakter Name!
2. Account Password from your Charakter.

Mfg
Benhero is offline  
Old 10/06/2011, 01:01   #3
 
elite*gold: 0
Join Date: Dec 2008
Posts: 69
Received Thanks: 3
Still $_POST['sbug'] trovato e connesso al database account
Resource id #4
Any other ideas? Thank you anyway for helping.
EDIT: I've tried anything,even correct and false names and passwords,nothing,at everyone of them it appears the same.Obviously it shoul appear PG Sbuggato or PG NON Sbuggato isn't that right?
Cosmyn2010 is offline  
Old 10/06/2011, 01:06   #4


 
Benhero's Avatar
 
elite*gold: 964
Join Date: Mar 2008
Posts: 2,634
Received Thanks: 1,637
okok^^ Try this one:
PHP Code:
<?php
$pwd 
= Array();
$query = Array();
$db = Array();
$results = Array();

$db['host'] = "host";
$db['user'] = "user";
$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" /> Introdu numele caracterului </label><br />
<label><input type="text" name="pw" /> Introdu parola contului </label><br />
<input type="hidden" name="sbug" value="1" />
<input type="submit" value="Sbugga personaggio" />
</form>
<br />

<?php
if($_POST['sbug']) {
mysql_select_db($db['database']['account']) or die('Could not select database: '.mysql_error());
echo 
"$_POST[\'sbug\'] trovato e connesso al database account"."<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_fetch_row($pwd['fromdb']);
echo 
$pwd['fromdb']."<br />\n";
echo 
$results['pwd'][0]."<br />\n";

if(
$pwd['user'] == $results['pwd'][0]) {#$pwd['fromdb']) { #&& $menge == "1") {
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";
} else {
echo 
"PG NON Sbuggato";
}
}
}
}
?>
Mfg. Benhero
Benhero is offline  
Old 10/06/2011, 01:14   #5
 
elite*gold: 0
Join Date: Dec 2008
Posts: 69
Received Thanks: 3
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/advance7/public_html/deblocare.php on line 28
I've tried to look out to the line 28..but what to modify? :-??
Cosmyn2010 is offline  
Old 10/06/2011, 01:17   #6


 
Benhero's Avatar
 
elite*gold: 964
Join Date: Mar 2008
Posts: 2,634
Received Thanks: 1,637
Hmm... Delete line 28 ... and try again O.o

Soo... i think... here is the fix.. try it x,x sry when its fail..

PHP Code:
<?php
$pwd 
= Array();
$query = Array();
$db = Array();
$results = Array();

$db['host'] = "localhost";
$db['user'] = "benhero";
$db['password'] = "made2507";
$db['database'] = Array();
$db['database']['player'] = "player";
$db['database']['account'] = "benhero";

$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" /> Introdu numele caracterului </label><br />
<label><input type="text" name="pw" /> Introdu parola contului </label><br />
<input type="hidden" name="sbug" value="1" />
<input type="submit" value="Sbugga personaggio" />
</form>
<br />

<?php
if($_POST['sbug']) {
mysql_select_db($db['database']['account']) or die('Could not select database: '.mysql_error());
echo 
"\$_POST['sbug'] trovato e connesso al database account"."<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_fetch_row($pwd['fromdb']);
echo 
$pwd['fromdb']."<br />\n";
echo 
$results['pwd'][0]."<br />\n";

if(
$pwd['user'] == $results['pwd'][0]) {#$pwd['fromdb']) { #&& $menge == "1") {
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";
} else {
echo 
"PG NON Sbuggato";
}
}
}
}
?>
Mfg
Benhero is offline  
Old 10/06/2011, 01:28   #7
 
elite*gold: 0
Join Date: Dec 2008
Posts: 69
Received Thanks: 3
Still
$_POST['sbug'] trovato e connesso al database account
Resource id #4
Than you very much for your help,any other ideas are welcomed.Thank you.
EDIT
Without line 28
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 4 in /home/advance7/public_html/deblocare.php on line 33
$pwd['fromdb'] : Resource id #4
$results['pwd']
Cosmyn2010 is offline  
Thanks
1 User
Old 10/06/2011, 01:43   #8


 
Benhero's Avatar
 
elite*gold: 964
Join Date: Mar 2008
Posts: 2,634
Received Thanks: 1,637
Here... a other version XD iŽll try everything to fix it...
PHP Code:
<?php
$pwd 
= Array();
$query = Array();
$db = Array();
$results = Array();

$db['host'] = "host";
$db['user'] = "user";
$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" /> Introdu numele caracterului </label><br/>
<label><input type="text" name="pw" /> Introdu parola contului </label><br/>
<input type="hidden" name="sbug" value="1" />
<input type="submit" value="Sbugga personaggio" />
</form>
<br/>

<?php
if($_POST['sbug']) {
mysql_select_db($db['database']['account']) or die('Could not select database: '.mysql_error());
echo 
'$_POST[\'sbug\'] trovato e connesso al database account'."<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_fetch_row($pwd['fromdb']);
echo 
$pwd['fromdb']."<br/>\n";
echo 
$results['pwd']."<br/>\n";

if(
$pwd['user'] == $results['pwd']) {#$pwd['fromdb']) { #&& $menge == "1") {
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";
} else {
echo 
"PG NON Sbuggato";
}
}
}
}
?>
Mfg. Benhero
Benhero is offline  
Old 10/06/2011, 10:29   #9
 
elite*gold: 0
Join Date: Dec 2008
Posts: 69
Received Thanks: 3
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/advance7/public_html/deblocare.php on line 59 srry,it doesn't work either.Got any other idea? Thanks anyway.
Cosmyn2010 is offline  
Old 10/06/2011, 18:00   #10


 
Benhero's Avatar
 
elite*gold: 964
Join Date: Mar 2008
Posts: 2,634
Received Thanks: 1,637
The script dosenŽt have Line 59.


Mfg. Benhero
Benhero is offline  
Reply


Similar Threads Similar Threads
Webzen Dragonscion character unlocking
11/28/2010 - Archlord - 32 Replies
I have enough of the greedy ones so here's the method : Download the Japanese /or Korean /or Chinese version of the game. Then replace the character folder from the respective region to Webzen's Character folder. There you go, you have unlocked the Dragon scion character, but only one is avaible. Don't forget the thanks button :)
Webzen Dragonscion character unlocking
08/11/2010 - Archlord Trading - 25 Replies
Ok, I have enough of all the greedy ones that wanna get money from it even though they aren't the original founders, so here's the method : Download the Japanese /or Korean /or Chinese version of the game. Then replace the character folder from the respective region to Webzen's Character folder. There you go, you have unlocked the Dragon scion character, but only one is avaible. Don't forget the thanks button :)
S2 character error
03/26/2010 - Silkroad Online - 1 Replies
I got this error lately, after i log off from my character and try to log on again, this error appaers when I want to select my character. But with the second try i log on normally. Its not that bad, but it happens also on the clientless mode with ribot. So after i get dc, char log on(Login successful) but its NOT really logged into the game, so I cant bot 24/7, caz im a lot of the time afk. Any solutions, or anyone also have/had s2 error?
Character error.
11/22/2009 - SRO Private Server - 7 Replies
When i try to do in swsro a new character i get error:http://img21.imageshack.us/img21/2140/lolsn. jpg What solution would be for it?
Character Error?
06/24/2009 - Silkroad Online - 4 Replies
Hi.Today i logged in for like 7-10 times and each time i could not see my character :(. Is it possible that they deleted my char? :(



All times are GMT +1. The time now is 15:56.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.