|
You last visited: Today at 12:18
Advertisement
Fixed rebirth script
Discussion on Fixed rebirth script within the Dekaron Private Server forum part of the Dekaron category.
01/08/2010, 21:27
|
#1
|
elite*gold: 0
Join Date: Dec 2007
Posts: 26
Received Thanks: 10
|
Fixed rebirth script
Hi everyone,
First of all, my apologies for the text wall, but you'll get to know the root of the problem and hopefully learn something new.
The following script is based on  . However, there is a big difference between this one and the original one: the original one can be exploited, this one can't. I'm not sure if this was documented before and/or if anyone released a fixed one, so I decided to post this up anywayz.
To get started, let me explain to you what's not right about the original one. Most parts of it are doing what they should perfectly fine. However, the way it handles the actual reborns is what causes it to bug. And with bug I mean: giving out more stats than it should and skipping rebirths. For example someone who would make his first rebirth suddenly gets 1000 stats and is set to 4th RB.
This is where it all goes wrong (small excerpt from the script):
Code:
SET wStatPoint = 250 * (Reborn + 1), Reborn = Reborn + 1
What happens is that a player reaches the RB level (let's say 180), so he logs out to make his RB. Now there are a few options: he either logs out completely or he goes to the char select screen.
When he logs out completely, all will be good and the rebirth will be done.
When he goes to the char select screen, that's where things can go wrong.
The player can either log out from the character select screen or log back in from the character select screen. In case he logs out from there without logging back in, all will be good. But when he logs back in from the char select screen, he'll still be at the same RB. Or so he thinks...
When the player logs out, to either character select screen or completely, the script kicks in and performs the RB job (might take a minute, depends on what shedule the SQL job is running). That means that the row of data containing the character's info gets changed: the stats get set according to the value in the reborn column and the RB column goes +1. "Fine!" is what you're probably thinking...
Well now, when the player decides to log in again without being fully logged out, the following will happen:
the stats data gets rolled back to what it originally was, because the data wasn't commited (account was logged in, so changes to char data couldn't be made, BUT the 'Reborn' column does not roll back, since that column isn't actual game data.
If the player repeats the proces of logging in - going to char select - logging - ... a few times, then he can go from 0 RB to 5th RB. He just has to log out completely at the time that the RB column is set to 5 and his stats will be written to his character. When he fails to fully log out in time, because he did the relogging process too many times, he will be 'stuck'. With the RB column at 5 he won't RB anymore and his stats didn't go up either, because he never fully logged out.
So now that you know the 'bugging-process', let's look at a solution. I know that there are probably other ways to solve this, but the easiest and fail-proof way that I can recommend is to not base the amount of stats given out on the value in the rebirth column, but on the sum of stats that the player already has. That way, it's independant from non-game data and never misses.
An example of this, based on RB at level 180 and a default 5 stats per level, for the first 2 RBs (I wouldn't want you to be lazy and just copy the whole thing  ):
Code:
USE [character];
GO
UPDATE dbo.user_character
SET wLevel = 1, dwExp = 0, wStatPoint = 250, nHP=106, nMP=16, dwMoney = dwMoney - (500), wStr = 6, wDex = 3, wCon = 4, wSpr = 2, wPosX = 336, wPosY = 366, Reborn = 1, wMapIndex = 7, wSkillPoint = 0, bySkillClearCount = 0
WHERE (wlevel >= 180) AND (dwMoney >= (500)) AND ((wStr + wDex + wCon + wSpr + wStatPoint) BETWEEN 900 AND 1015) ;
UPDATE dbo.user_character
SET wLevel = 1, dwExp = 0, wStatPoint = 500, nHP=106, nMP=16, dwMoney = dwMoney - (500), wStr = 6, wDex = 3, wCon = 4, wSpr = 2, wPosX = 336, wPosY = 366, Reborn = 2, wMapIndex = 7, wSkillPoint = 0, bySkillClearCount = 0
WHERE (wlevel >= 180) AND (dwMoney >= (500)) AND ((wStr + wDex + wCon + wSpr + wStatPoint) BETWEEN 1150 AND 1265) ;
Just complete it for the rest of the RBs and adjust the rest accordingly to what you want RBs to require. Calcute the minimum amount of stats at the base RB level (180 here) and the maximum amount of stats that anyone can have at the max RB level (if they decide the level past 180 for some reason and log out then - max lvl 200 in this example). Also take the initial 15 stats into account, that u get after every rebirth, when calculating the stat cap for that rebirth. Then fill in the numbers for each rebirth, where it says "BETWEEN xxx AND xxx" in the above script.
No rocket-science, but I hope that this helps some people that were struggling with this problem.
Best regards,
Razgriz
DK Rusaki admin
|
|
|
01/08/2010, 21:54
|
#2
|
elite*gold: 0
Join Date: Jun 2008
Posts: 472
Received Thanks: 277
|
friend congratulations for the script that I asked for help several times here for people to understand qeu slq and not getting any help but you solved all my problems thank you and this topic deserves its fixed because you took the initiative to solve a problem that no one at least tried to keep growing and thank you!!
|
|
|
01/08/2010, 22:18
|
#3
|
elite*gold: 20
Join Date: Jan 2008
Posts: 1,346
Received Thanks: 355
|
You explained it very well, the problem with it and how you could exploit it.
|
|
|
01/09/2010, 00:50
|
#4
|
elite*gold: 0
Join Date: Aug 2009
Posts: 1,297
Received Thanks: 928
|
Quote:
Originally Posted by Razgr!z
Hi everyone,
First of all, my apologies for the text wall, but you'll get to know the root of the problem and hopefully learn something new.
The following script is based on  . However, there is a big difference between this one and the original one: the original one can be exploited, this one can't. I'm not sure if this was documented before and/or if anyone released a fixed one, so I decided to post this up anywayz.
To get started, let me explain to you what's not right about the original one. Most parts of it are doing what they should perfectly fine. However, the way it handles the actual reborns is what causes it to bug. And with bug I mean: giving out more stats than it should and skipping rebirths. For example someone who would make his first rebirth suddenly gets 1000 stats and is set to 4th RB.
This is where it all goes wrong (small excerpt from the script):
Code:
SET wStatPoint = 250 * (Reborn + 1), Reborn = Reborn + 1
What happens is that a player reaches the RB level (let's say 180), so he logs out to make his RB. Now there are a few options: he either logs out completely or he goes to the char select screen.
When he logs out completely, all will be good and the rebirth will be done.
When he goes to the char select screen, that's where things can go wrong.
The player can either log out from the character select screen or log back in from the character select screen. In case he logs out from there without logging back in, all will be good. But when he logs back in from the char select screen, he'll still be at the same RB. Or so he thinks...
When the player logs out, to either character select screen or completely, the script kicks in and performs the RB job (might take a minute, depends on what shedule the SQL job is running). That means that the row of data containing the character's info gets changed: the stats get set according to the value in the reborn column and the RB column goes +1. "Fine!" is what you're probably thinking...
Well now, when the player decides to log in again without being fully logged out, the following will happen:
the stats data gets rolled back to what it originally was, because the data wasn't commited (account was logged in, so changes to char data couldn't be made, BUT the 'Reborn' column does not roll back, since that column isn't actual game data.
If the player repeats the proces of logging in - going to char select - logging - ... a few times, then he can go from 0 RB to 5th RB. He just has to log out completely at the time that the RB column is set to 5 and his stats will be written to his character. When he fails to fully log out in time, because he did the relogging process too many times, he will be 'stuck'. With the RB column at 5 he won't RB anymore and his stats didn't go up either, because he never fully logged out.
So now that you know the 'bugging-process', let's look at a solution. I know that there are probably other ways to solve this, but the easiest and fail-proof way that I can recommend is to not base the amount of stats given out on the value in the rebirth column, but on the sum of stats that the player already has. That way, it's independant from non-game data and never misses.
An example of this, based on RB at level 180 and a default 5 stats per level, for the first 2 RBs (I wouldn't want you to be lazy and just copy the whole thing  ):
Code:
USE [character];
GO
UPDATE dbo.user_character
SET wLevel = 1, dwExp = 0, wStatPoint = 250, nHP=106, nMP=16, dwMoney = dwMoney - (500), wStr = 6, wDex = 3, wCon = 4, wSpr = 2, wPosX = 336, wPosY = 366, Reborn = 1, wMapIndex = 7, wSkillPoint = 0, bySkillClearCount = 0
WHERE (wlevel >= 180) AND (dwMoney >= (500)) AND ((wStr + wDex + wCon + wSpr + wStatPoint) BETWEEN 900 AND 1015) ;
UPDATE dbo.user_character
SET wLevel = 1, dwExp = 0, wStatPoint = 500, nHP=106, nMP=16, dwMoney = dwMoney - (500), wStr = 6, wDex = 3, wCon = 4, wSpr = 2, wPosX = 336, wPosY = 366, Reborn = 2, wMapIndex = 7, wSkillPoint = 0, bySkillClearCount = 0
WHERE (wlevel >= 180) AND (dwMoney >= (500)) AND ((wStr + wDex + wCon + wSpr + wStatPoint) BETWEEN 1150 AND 1265) ;
Just complete it for the rest of the RBs and adjust the rest accordingly to what you want RBs to require. Calcute the minimum amount of stats at the base RB level (180 here) and the maximum amount of stats that anyone can have at the max RB level (if they decide the level past 180 for some reason and log out then - max lvl 200 in this example). Also take the initial 15 stats into account, that u get after every rebirth, when calculating the stat cap for that rebirth. Then fill in the numbers for each rebirth, where it says "BETWEEN xxx AND xxx" in the above script.
No rocket-science, but I hope that this helps some people that were struggling with this problem.
Best regards,
Razgriz
DK Rusaki admin 
|
well, its a good addition, but(and correct me if i am wrong) wouldnt it just be easier to make a simple condition statement to check if the account is logged out?
i have a php based rebirth system that i coded, and its very simple to check to see if the account is logged out b4 continuing with the rest of the function, much easier than to see if the character in question is between a certain amount of stats, its 1 check compared to several checks, and conditional statements work the pretty much the same in SQL as they do in PHP.
|
|
|
01/09/2010, 07:34
|
#5
|
elite*gold: 20
Join Date: Aug 2008
Posts: 1,227
Received Thanks: 132
|
thx alot bro..
|
|
|
01/09/2010, 07:59
|
#6
|
elite*gold: 0
Join Date: Dec 2009
Posts: 123
Received Thanks: 29
|
Quote:
Originally Posted by Decima
well, its a good addition, but(and correct me if i am wrong) wouldnt it just be easier to make a simple condition statement to check if the account is logged out?
i have a php based rebirth system that i coded, and its very simple to check to see if the account is logged out b4 continuing with the rest of the function, much easier than to see if the character in question is between a certain amount of stats, its 1 check compared to several checks, and conditional statements work the pretty much the same in SQL as they do in PHP.
|
Please tell me how or can you share it. I don't know much about php. That is my problem because some of my players do that exploit. And it so unfair. Please teach me because I find your solution much more easier and effective.
The most effective way is to check if the player is logged out. If yes, then reborn process will proceed. Please share because It's a problem on my server. Though I only host my server locally.
|
|
|
01/09/2010, 10:23
|
#7
|
elite*gold: 0
Join Date: Aug 2009
Posts: 1,297
Received Thanks: 928
|
its only gonna work if you have a site based RB system, it wont work for the type of system that the thread starter is speaking of
its rather simple even if you dont know much about php tho, there is only one check u need to make
Quote:
$logincheck = mssql_query("SELECT login_flag FROM account.dbo.USER_PROFILE WHERE user_no = '".$accountid."'",$ms_con);
$lcrow1 = mssql_fetch_row($logincheck);
if ($lcrow1[0] == '1100') {
//rebirth stuff here
} else {
echo 'You are not logged out, please log out to continue';
}
|
|
|
|
01/09/2010, 11:13
|
#8
|
elite*gold: 0
Join Date: Dec 2007
Posts: 26
Received Thanks: 10
|
Like I said, there are probably different solutions for the problem. Calculating a few stats isn't much work and it makes it so the system does not depend on non-game data, so to me that looks a lot simpler than coding in checks.
|
|
|
01/09/2010, 12:18
|
#9
|
elite*gold: 0
Join Date: Dec 2009
Posts: 123
Received Thanks: 29
|
Quote:
Originally Posted by Decima
its only gonna work if you have a site based RB system, it wont work for the type of system that the thread starter is speaking of
its rather simple even if you dont know much about php tho, there is only one check u need to make
|
Thank you!
|
|
|
01/09/2010, 14:00
|
#10
|
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
|
after checking  it does not have a check inside to see if char is online or not ....
ill update the script 
thx for that
but the reborn system is not fullproof
after loggin into your account, we noticed at dkveterans server that your skills are still there
so i dont know how good your mssql is but is there a was to delete them ?
|
|
|
01/09/2010, 14:59
|
#11
|
elite*gold: 0
Join Date: Dec 2007
Posts: 26
Received Thanks: 10
|
Yes, it should be possible to completely clear a player's skilltree after an RB. In order to do so, you would have to set it up to delete all the entries for the character_no that makes the RB in the user_skill table.
The script that I posted won't do so though, it just resets the free reskill that players can get at the NPC. So it's not broken if that's what you meant by saying it's not 'fullproof'.
|
|
|
01/09/2010, 15:08
|
#12
|
elite*gold: 0
Join Date: Dec 2009
Posts: 123
Received Thanks: 29
|
omg yeah your right. How do we clear skillstree so it starts empty. Anyone know how?
|
|
|
01/09/2010, 16:38
|
#13
|
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
|
easy peezy
PHP Code:
} elseif($_POST['select'] == '1') { $ms_con = mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']); $result1 = mssql_query("SELECT * FROM character.dbo.user_character WHERE character_name = '".$_POST['charname']."'",$ms_con); $count1 = mssql_num_rows($result1);
if($count1 < '1') { echo "<br>Could not find the character name.<br><a href='javascript:history.back()'>Back</a>";
} else { $ms_con = mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']); $result2 = mssql_query("SELECT character_no FROM character.dbo.user_character WHERE character_name = '".$_POST['charname']."'",$ms_con); $row2 = mssql_fetch_row($result2); mssql_query("DELETE FROM character.dbo.user_skill WHERE character_no = '".$row2[0]."'",$ms_con); echo "<br><center>The characters skills has been successfully deleted.</center>";
|
|
|
01/09/2010, 18:38
|
#14
|
elite*gold: 0
Join Date: Dec 2009
Posts: 123
Received Thanks: 29
|
thanks janvier123. It's very nice to see an updated reborn script from your website. I hope that you'll implement these featues. Please notify us if you have updated it. Thanks for sharing!
I'll be waiting for your very nice release!
|
|
|
01/09/2010, 19:58
|
#15
|
elite*gold: 0
Join Date: Jun 2008
Posts: 472
Received Thanks: 277
|
Quote:
Originally Posted by janvier123
easy peezy
PHP Code:
} elseif($_POST['select'] == '1') {
$ms_con = mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']);
$result1 = mssql_query("SELECT * FROM character.dbo.user_character WHERE character_name = '".$_POST['charname']."'",$ms_con);
$count1 = mssql_num_rows($result1);
if($count1 < '1') {
echo "<br>Could not find the character name.<br><a href='javascript:history.back()'>Back</a>";
} else {
$ms_con = mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']);
$result2 = mssql_query("SELECT character_no FROM character.dbo.user_character WHERE character_name = '".$_POST['charname']."'",$ms_con);
$row2 = mssql_fetch_row($result2);
mssql_query("DELETE FROM character.dbo.user_skill WHERE character_no = '".$row2[0]."'",$ms_con);
echo "<br><center>The characters skills has been successfully deleted.</center>";
|
script dont work.
|
|
|
 |
|
Similar Threads
|
[RELEASE]Fixed Wall Hack Script
06/07/2010 - Dekaron Exploits, Hacks, Bots, Tools & Macros - 43 Replies
I don't know if anybody else has this issue, but I did, and I fixed the wall hack script. When I tried to turn off wall hack and then re-load to a new map, my game would crash. This script allows you to turn wall hack on or off without crashing.
My Script: (doesn't put walls back, but lets you stop using wall hack if you're going to DF or something)
Bottomy's Script (allows turn-off, and puts walls back to original):
|
REBIRTH Client Patch , REBIRTH share Patch ,SERVER
01/07/2010 - Dekaron Private Server - 34 Replies
REBIRTH Client SKILL Patch
MEGAUPLOAD - The leading online storage and file delivery service
REBIRTH share SKILL Patch
MEGAUPLOAD - The leading online storage and file delivery service
:rolleyes:
|
olly convert your CE script to ollydbg repair fuction that anantasia fixed
11/05/2007 - Conquer Online 2 - 4 Replies
was wondering f u could do the olly convert your CE script just like what u did on sv 1.17 this is the code anantasia made hope u can help me really appriciate it :P
//code from here to '' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(exit)
label(check1)
label(check2)
|
All times are GMT +1. The time now is 12:20.
|
|