|
You last visited: Today at 01:31
Advertisement
[Question] Undelete a Character
Discussion on [Question] Undelete a Character within the Dekaron Private Server forum part of the Dekaron category.
08/24/2009, 20:05
|
#1
|
elite*gold: 0
Join Date: Jun 2009
Posts: 6
Received Thanks: 5
|
[Question] Undelete a Character
Dear ePvPers community,
i have a little question, does anyone knows an SQL - script to "undelete" a deletet character.
My problem:
If an player on my server was hacked and his character is deleted after this, i want to recover the character and all Items.
I tryed to write an script with PHP but after this i became an ridiculous error message...
Code:
Warning: mssql_query() [function.mssql-query]: message: Unclosed quotation mark before the character string '?'. (severity 15) in C:\Inetpub\vhosts\xp-dekaron.de\httpdocs\include\includes\recoverchar.php on line 79
Warning: mssql_query() [function.mssql-query]: message: Line 1: Incorrect syntax near '?'. (severity 15) in C:\Inetpub\vhosts\xp-dekaron.de\httpdocs\include\includes\recoverchar.php on line 79
Warning: mssql_query() [function.mssql-query]: Query failed in C:\Inetpub\vhosts\xp-dekaron.de\httpdocs\include\includes\recoverchar.php on line 79
Warning: mssql_query() [function.mssql-query]: Query failed in C:\Inetpub\vhosts\xp-dekaron.de\httpdocs\include\includes\recoverchar.php on line 97
Warning: mssql_query() [function.mssql-query]: message: Unclosed quotation mark before the character string ''. (severity 15) in C:\Inetpub\vhosts\xp-dekaron.de\httpdocs\include\includes\recoverchar.php on line 97
Warning: mssql_query() [function.mssql-query]: message: Line 1: Incorrect syntax near ''. (severity 15) in C:\Inetpub\vhosts\xp-dekaron.de\httpdocs\include\includes\recoverchar.php on line 97
Warning: mssql_query() [function.mssql-query]: message: Unclosed quotation mark before the character string ''. (severity 15) in C:\Inetpub\vhosts\xp-dekaron.de\httpdocs\include\includes\recoverchar.php on line 173
Warning: mssql_query() [function.mssql-query]: message: Line 1: Incorrect syntax near ''. (severity 15) in C:\Inetpub\vhosts\xp-dekaron.de\httpdocs\include\includes\recoverchar.php on line 173
Warning: mssql_query() [function.mssql-query]: Query failed in C:\Inetpub\vhosts\xp-dekaron.de\httpdocs\include\includes\recoverchar.php on line 173
Warning: mssql_query() [function.mssql-query]: message: Disallowed implicit conversion from data type varchar to data type varbinary, table 'character.dbo.user_slot', column 'info'. Use the CONVERT function to run this query. (severity 16) in C:\Inetpub\vhosts\xp-dekaron.de\httpdocs\include\includes\recoverchar.php on line 173
I am not so crazy to post my whole script but for the PHP-scripters i will post the important CODEs
Line 78 + 79
Code:
$setbagquery = "INSERT INTO user_bag ([character_no], [line_no], [byHeader], [wIndex], [upt_time], [reg_bindate], [exp_bindate]) VALUES ('".$recchar["character_no"]."', '".$bag["line_no"]."', '".$bag["byHeader"]."', '".$bag["wIndex"]."', '".$bag["upt_time"]."', '".$bag["reg_bindate"]."', '".$bag["exp_bindate"]."')";
$setbag = mssql_query($setbagquery);
Line 96 + 97
Code:
$setsuitquery = "INSERT INTO user_suit ([character_no], [line_no], [byHeader], [wIndex], [upt_time], [reg_bindate], [exp_bindate]) VALUES ('".$recchar["character_no"]."', '".$suit["line_no"]."', '".$suit["byHeader"]."', '".$suit["wIndex"]."', '".$suit["upt_time"]."', '".$suit["reg_bindate"]."', '".$suit["exp_bindate"]."')";
$setsuit = mssql_query($setsuitquery);
Line 172 + 173
Code:
$setslotquery = "INSERT INTO user_slot ([character_no], [line_no], [info], [ipt_time], [upt_time]) VALUES ('".$recchar["character_no"]."', '".$slot["line_no"]."', '".$slot["info"]."', '".$slot["ipt_time"]."', '".$slot["upt_time"]."')";
$setslot = mssql_query($setslotquery);
A short info to read the CODEs:
all this CODEs are scripted like this:
Code:
if (mssql_num_rows ($searchbagausf) > 0) {
while ($bag = mssql_fetch_array($searchbagausf)) {
$setbagquery = "INSERT INTO user_bag ([character_no], [line_no], [byHeader], [wIndex], [upt_time], [reg_bindate], [exp_bindate]) VALUES ('".$recchar["character_no"]."', '".$bag["line_no"]."', '".$bag["byHeader"]."', '".$bag["wIndex"]."', '".$bag["upt_time"]."', '".$bag["reg_bindate"]."', '".$bag["exp_bindate"]."')";
$setbag = mssql_query($setbagquery);
}
$delbagquery = "DELETE FROM user_bag_secede WHERE [character_no] = '".$recchar["character_no"]."' ";
$delbag = mssql_query($delbagquery);
}
The variable "$recchar" is an array with the query from the user_character_secede.
I hope someone can help me with this problem,
thanks in advanced
Yours Crystal
|
|
|
08/24/2009, 20:44
|
#2
|
elite*gold: 0
Join Date: Jul 2009
Posts: 1,750
Received Thanks: 248
|
i think if its deleted, its deleted
|
|
|
08/24/2009, 21:05
|
#3
|
elite*gold: 0
Join Date: Jun 2009
Posts: 6
Received Thanks: 5
|
@Bakloma:
No, you are wrong,
deleted characters are saved in the *name*_secede tables like character_secede.
And my question is not: is it possible.
My question is how.
BTW, my script is working in one point:
The deleted character is 'undeleted' after this script.
i only have a problem with the data-types in the database and i need them to "undelete" the skills and items to.
This way i can say it posslible to "undelete" characters
|
|
|
08/24/2009, 21:23
|
#4
|
elite*gold: 35
Join Date: Aug 2009
Posts: 5,822
Received Thanks: 1,958
|
i dont get this how do you undelete if its deleted in database, once you delete ingame you can create another char with same name so that means that char does not exsist in database, so im just asking ...you can seriously undelete the deleted char lol....?
|
|
|
08/24/2009, 22:02
|
#5
|
elite*gold: 0
Join Date: Jun 2009
Posts: 6
Received Thanks: 5
|
You can use a little trick for this:
1. the script have to check if the charname is available.
if yes, the script will be use the 'original' name,
if not, the script will ask you to rename the character
then the script will test the new name,
if the name is free, it will use the name, other way, it will ask you again.
2. There is also the posibility that a character name is twice or more in the user_character_secede.
In this case, ths script ask which of these characters should be recovered.
thats the way
|
|
|
08/24/2009, 22:11
|
#6
|
elite*gold: 35
Join Date: Aug 2009
Posts: 5,822
Received Thanks: 1,958
|
Quote:
Originally Posted by Crystal1990
You can use a little trick for this:
1. the script have to check if the charname is available.
if yes, the script will be use the 'original' name,
if not, the script will ask you to rename the character
then the script will test the new name,
if the name is free, it will use the name, other way, it will ask you again.
2. There is also the posibility that a character name is twice or more in the user_character_secede.
In this case, ths script ask which of these characters should be recovered.
thats the way 
|
very nice then, it will most likey be very helpfull
|
|
|
 |
Similar Threads
|
[Question]Character Ban
08/14/2010 - SRO Private Server - 3 Replies
how to know if you where banned??
is it crashing in game everytime in logging in?
i got problem with my char... everytime i logged in my character, it always crashes... but my other char in the same account does not...
is it a bugged or ban?
|
character lass question
06/16/2010 - Grand Chase Philippines - 6 Replies
Well, first of all, im a noob, and sorry if it irritates you but please answer my questions... here are my questions:
1. How do i get the character "lass", do i have to go through a hard mission?
2.well, i dont spend real money on online games, can i get him through in game money?
3. How much is it?
4. If it is really expensive, can someone give me tips on how to get the desired amount to buy lass really fast?
|
question has Character.cs edited
12/16/2009 - CO2 Private Server - 1 Replies
plase help me
|
GM character question
09/29/2009 - Dekaron Private Server - 2 Replies
ok I have a couple guys that aren't GMs there mods. So is there anyway that i can give them some of the GM powers like ghostmode or tele. if its already setup that way but with VGM Dev Mod or gm all have different codes could someone please post it so that i know what to change. Any help is appreciated
|
[question] deleting character
02/01/2009 - Dekaron Private Server - 4 Replies
How to delete character? when i press delete I need to write something. What must be written in there?
thx
|
All times are GMT +1. The time now is 01:32.
|
|