Register for your free account! | Forgot your password?


Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server
You last visited: Today at 05:45

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

Advertisement



How do I get ranking information from DB?

Discussion on How do I get ranking information from DB? within the SRO Private Server forum part of the Silkroad Online category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2010
Posts: 36
Received Thanks: 2
How do I get ranking information from DB?

So I'm a web developer, I have no experience at all with this game and some dude hired me to create a complete React site for his game's private server. This guy has absolutely no idea how anything about the game's server works and his developers aren't available

I'm done with most of the site, including the forum. I'm left with the leaderboards but I can't figure out how the game's ranking system works.

So my questions are
  1. How do I calculate unique ranks? Does every character have different points for each unique monster and then I have to add all of those to sort by rank?
  2. And where are PvP ranks stored? or how is that calculated? Is it calculated from DailyPK, TotalPK and PKPenaltyPoint in SRO_VT_SHARD._Char table?
  3. How are player ranks calculated? From Item strength? Level? total experience points?
  4. And how do u calculate Guild rank points? With level? GatheredSP? Booty? Gold?
  5. How are Wanted levels calculated? Or where are they stored? Couldn't find them..

Thanks for your time
King_Dud is offline  
Old 11/01/2018, 15:06   #2
 
elite*gold: 0
Join Date: Sep 2017
Posts: 1,039
Received Thanks: 750
1- About unique rank: There's already gameservers who logs the unique kills at the account database, so ask your dude about the gameserver he's using, if Evangelion then you'll find a table called "Evangelion_uniques", else if srZor the table name is "srZor_uniques". Nah, there's no specific points for each unique but you can define that yourself. You can do something like this to get the top record by unique kills: .


2- About pvp rank: Well, actually you can get the amount of pvp kills like what I've done above but with shardlog's _LogEventChar table like: .
But I actually prefer making a new table and altering _AddLogChar procedure to insert into that new table, which will be smoother and easier to control.


3- About player rank: PPL at past used to compare level and exp offset, but newer they made a system called item points. This might be quite deep for you, since you got no experience at sro's database. First, there's 3 rarity types at SRO. Arranged by strength/power (Normal A, Normal B, Normal C, Star (Rare A), Moon (Rare B), Sun (Rare C)), you're gonna make a specific amount of points for each rarity type of them. And calculate the amount of points checking each item for each character. Like this: .

(Note: The query of player rank is kinda dump behaving, it was an old code of me. @ kinda not working as it should tho. You can make much better one, I am just giving an example.)


Note: You might find the code stupid and complex. If you use inner join or table as, it would be much quicker and smoother. And as I said before, I am just giving an example. ATN it was an old code.

I will respond to your other questions later.
#HB is offline  
Thanks
1 User
Old 11/02/2018, 01:28   #3
 
elite*gold: 0
Join Date: Aug 2010
Posts: 36
Received Thanks: 2
I got the basic idea about point 3 now, I might be able to google around for some examples. That was very helpful, thanks.
I'll be waiting for the other answers.
King_Dud is offline  
Old 11/02/2018, 09:34   #4
 
elite*gold: 0
Join Date: Sep 2017
Posts: 1,039
Received Thanks: 750
4- About guild rank: It's the most simple one actually. We aren't going to use item points system here, so we're gonna do it with GuildLevel/GuildSP/GuildMembersCount. You can just work with this one: .


5- Wanted? Do you mean job wanted system?
#HB is offline  
Thanks
1 User
Old 11/06/2018, 02:03   #5
 
elite*gold: 1700
Join Date: Oct 2014
Posts: 432
Received Thanks: 396
Unique ranking => It is easier to explain in code for me.
Code:
UPDATE UR SET points+=UI.Points,
	UR.Kills += 1
FROM SRO_VT_SHARD.._UniqueRanking UR
JOIN SRO_VT_SHARD.._UniqueInfo UI ON UR.CodeName128=UI.CodeName128
WHERE [email protected] AND [email protected]
PvP Kills => EventID = 20 in _AddLogChar means character death. You basically create a table with columns. CharID, PvP Points, Job Points, and also I prefer to add Item points to this table (will explain how to calculate that below) and in AddLogChar you basically += 1 the points for Killer CharID. How to get KillerID?
Code:
SELECT  [MENTION=3271931]killername[/MENTION] = (SELECT SUBSTRING  [MENTION=316630]DEsc[/MENTION], CHARINDEX('('  [MENTION=316630]DEsc[/MENTION])+1, CHARINDEX(')'  [MENTION=316630]DEsc[/MENTION]) - CHARINDEX('('  [MENTION=316630]DEsc[/MENTION])-1))
SELECT  [MENTION=2490155]killerid[/MENTION]   = (SELECT CharID FROM REDIC_SHARD.._Char WHERE CharName16 =  [MENTION=3271931]killername[/MENTION])
To check for job or free mode you can do
Code:
SELECT  [MENTION=2703943]killtyp[/MENTION]e = 
CASE
	WHEN     [MENTION=316630]DEsc[/MENTION] LIKE '%My: Trader%') 
		OR   [MENTION=316630]DEsc[/MENTION] LIKE '%My: Robber%')
		OR   [MENTION=316630]DEsc[/MENTION] LIKE '%My: Hunter%')
		THEN 'Job'
	WHEN   [MENTION=316630]DEsc[/MENTION] LIKE '%Murderer%')
		THEN 'Murder'
	ELSE 'Free'
END
The best way to do the player ranking. calculate the optlevel + item point + reqlevel1.

Guild points => SUM of item points of chars in a specific guild.

If you mean wanted system ingame you basically insert CharID & Points in a table then you += 1 that and depends on the points you assign a skill id for it using a case statement and maybe reward them. Also, make sure you set the points to 0 and delete the skill for that char if he is dead.

Btw, MENTION == @ which declares a variable in SQL. I hope I made myself clear, and if you are missing something do not ever hesitate to drop a DM on my Discord

P.S: #HB I think you should stop writing queries
Crayon* is offline  
Thanks
1 User
Old 11/06/2018, 11:40   #6
 
elite*gold: 950
Join Date: Aug 2015
Posts: 1,960
Received Thanks: 1,153
Quote:
Originally Posted by Crayon* View Post
P.S: #HB I think you should stop writing queries
I think you should stop writing queries aswell (not that you wrote these)
OP said #HB helped him get the basic idea i believe he's not looking for a "COPY PASTE" solution
B1Q is offline  
Old 11/06/2018, 15:35   #7
 
elite*gold: 1700
Join Date: Oct 2014
Posts: 432
Received Thanks: 396
Quote:
Originally Posted by B1Q View Post
I think you should stop writing queries aswell (not that you wrote these)
OP said #HB helped him get the basic idea i believe he's not looking for a "COPY PASTE" solution
Did I even provide complete code for anything? If you copy-paste what I wrote it wouldn't make sense LOL. I was just explaining the idea in code, and did you even read his queries?
Crayon* is offline  
Old 11/06/2018, 19:29   #8
 
elite*gold: 950
Join Date: Aug 2015
Posts: 1,960
Received Thanks: 1,153
Quote:
Originally Posted by Crayon* View Post
Did I even provide complete code for anything? If you copy-paste what I wrote it wouldn't make sense LOL. I was just explaining the idea in code, and did you even read his queries?
your queries are equally as bad.
good luck
B1Q is offline  
Old 11/07/2018, 23:26   #9
 
elite*gold: 0
Join Date: Aug 2010
Posts: 36
Received Thanks: 2
Quote:
Originally Posted by #HB View Post
5- Wanted? Do you mean job wanted system?
Thanks again. And honestly, I don't know what "wanted rank" is. But I was given as an example to what ranks to include.

@ Thanks a lot.

@ Yeah, copy paste ready queries aren't necessary but using them in explanation doesn't hurt even if it's awfully written..

Thanks a lot. I managed to complete it, I'll mark this as solved.
King_Dud is offline  
Thanks
1 User
Closed Thread


Similar Threads Similar Threads
Can you see the game inside the open window to see the player ranking, ranking, VIP s
08/14/2018 - Flyff Private Server - 2 Replies
Can you see the game inside the open window to see the player ranking, ranking, VIP source code is sent out
[Help] Honor Ranking aka Job Ranking
01/02/2017 - SRO Private Server - 2 Replies
Hello experts well im doing honor ranking to show the jobbers top kills based on Graduate count every kill = graduate but somehow ingame Ranking didnt show the right grad count on the db ? here is the SP
[Selling] OW Account - actual ranking 3200 max - 3900 ranking credits
09/23/2016 - Overwatch Trading - 14 Replies
Selling OW account - Last Season #74 ranked ( 3800 ranked credits left on Acc ) No weapons buyed - This Season #3200 max - #3180 now Battlenet Acc also includes
[B][RANKING TEAM] SUCHE EIN GUTES RANKING TEAM[B]
02/20/2012 - League of Legends - 2 Replies
Suche ein gutes ranking Team mit skype oder TS wo auch immer Übungszeiten für Ranking haben und vllt auch und zu mal ELS spielen zu können. Ich habe bisher noch keine ELO wertung und habe 1050 normale Wins und bin ein sehr erfahrener Spieler. Hoffe es melden sich einige:) LG



All times are GMT +2. The time now is 05:45.


Powered by vBulletin®
Copyright ©2000 - 2021, 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 ©2021 elitepvpers All Rights Reserved.