|
You last visited: Today at 23:58
Advertisement
[RELEASE] PVP statistics view query without any triggers/hooks.
Discussion on [RELEASE] PVP statistics view query without any triggers/hooks. within the SRO PServer Guides & Releases forum part of the SRO Private Server category.
06/26/2020, 16:52
|
#1
|
elite*gold: 133
Join Date: Nov 2013
Posts: 454
Received Thanks: 455
|
[RELEASE] PVP statistics view query without any triggers/hooks.
Whats this?
- Will output you data from shard logs like this:
Code:
USE SRO_VT_SHARDLOG
SELECT
EventTime,
CASE EventID
WHEN 19 THEN 'pk'
WHEN 20 THEN 'vs'
WHEN 101 THEN 'trade'
END AS cateogory,
CASE
WHEN strDesc LIKE '%Robber%' THEN 'job'
WHEN strDesc LIKE '%Trader%' THEN 'job'
WHEN strDesc LIKE '%Hunter%' THEN 'job'
ELSE 'pvp'
END as mode,
cnl.CharName16 as Killer,
REPLACE(REPLACE(strDesc, LEFT(strDesc, CHARINDEX('(', strDesc)), ''), RIGHT(REPLACE(strDesc, LEFT(strDesc, CHARINDEX('(', strDesc)), ''), CHARINDEX(')', REVERSE(REPLACE(strDesc, LEFT(strDesc, CHARINDEX('(', strDesc)), '')))), '') as Dead,
lec.CharID as KillerID,
cnl2.CharID as DeadID,
CASE
WHEN c.NickName16 = '' THEN '-'
ELSE c.Nickname16
END as KillerJobName,
CASE
WHEN c2.NickName16 = '' THEN '-'
ELSE c2.Nickname16
END as DeadJobName,
c.MaxLevel as KillerLevel,
c2.MaxLevel as DeadLevel
FROM SRO_VT_SHARDLOG.dbo._LogEventChar lec
LEFT JOIN SRO_VT_SHARD.dbo._CharNameList cnl on cnl.CharID = lec.CharID
LEFT JOIN SRO_VT_SHARD.dbo._Char c on c.CharID = lec.CharID
LEFT JOIN SRO_VT_SHARD.dbo._Char c2 on CONVERT(varchar(50), c2.CharName16) COLLATE Latin1_General_CI_AS = REPLACE(REPLACE(strDesc, LEFT(strDesc, CHARINDEX('(', strDesc)), ''), RIGHT(REPLACE(strDesc, LEFT(strDesc, CHARINDEX('(', strDesc)), ''), CHARINDEX(')', REVERSE(REPLACE(strDesc, LEFT(strDesc, CHARINDEX('(', strDesc)), '')))), '')
LEFT JOIN SRO_VT_SHARD.dbo._CharNameList cnl2 on CONVERT(varchar(50), cnl2.CharName16) COLLATE Latin1_General_CI_AS = REPLACE(REPLACE(strDesc, LEFT(strDesc, CHARINDEX('(', strDesc)), ''), RIGHT(REPLACE(strDesc, LEFT(strDesc, CHARINDEX('(', strDesc)), ''), CHARINDEX(')', REVERSE(REPLACE(strDesc, LEFT(strDesc, CHARINDEX('(', strDesc)), '')))), '')
WHERE strDesc IS NOT NULL AND strDesc LIKE '%Neutral, no freebattle team%' AND strDesc NOT LIKE '%Monster%'
I hardly suggest storing this query as a VIEW so that you can fetch this data & filter however you like
Love
|
|
|
06/26/2020, 17:40
|
#2
|
elite*gold: 0
Join Date: Jun 2020
Posts: 104
Received Thanks: 44
|
good job mate , keep it up
|
|
|
06/26/2020, 20:48
|
#3
|
elite*gold: 393
Join Date: Feb 2009
Posts: 694
Received Thanks: 414
|
welcome back !!!!!!!!!! waiting for something special like VSRO 1.274 serverfiles
|
|
|
06/26/2020, 21:48
|
#4
|
elite*gold: 0
Join Date: May 2010
Posts: 376
Received Thanks: 211
|
this can be very useful, thanks!
|
|
|
06/27/2020, 00:10
|
#5
|
elite*gold: 0
Join Date: Oct 2013
Posts: 663
Received Thanks: 209
|
good idea mate
|
|
|
 |
Similar Threads
|
[Release][Query] Query _InvCOS Items WITH _Char Connection
12/29/2015 - SRO PServer Guides & Releases - 1 Replies
Ok, so i needed to write this query for a procedure im working on and not many people know how to connect the pet inventory table to the character table.... so this query will explain how its done...
im not going to explain every single detail, like how there is no charcos when pet is despawned / dead... but yea you can probably figure that all out from this query...
The code...
USE
SELECT pet_invo.
,pet_invo. PetSlot
|
Query to Modify Anything in Any Column of Any Table in Any DB
06/08/2014 - Shaiya PServer Guides & Releases - 15 Replies
Damn this post was old already but it helped me alot, in fact not only helped me but also I'm a bit less nub in query stuff thanks to the advises that you guys gave me in the comments and thanks to my hard work (it will seem not hard for you but I guess you guys will understand what I'm saying) :). Well those 2 query mean nothing compared to the changes I made at this one grabing what everyone said in comments here specialy what nubness said here my ty to you friend. Anyway here is the true...
|
[RELEASE] Character(s) Statistics Query
12/23/2012 - Shaiya PServer Guides & Releases - 4 Replies
What this query does:
Calculates a character(s) total statistics and displays them one row per character.
What this query does not account for:
Skills that passively add attack power.
Currently applied buffs and nostrums.
Characters with no items are left out of the results of this query.
Multiple of the same lapis in a single item (like if an item was GM linked with two or more Craft 7s in it, only one would be counted).
Any lapis GM linked to your mount.
Anything I forgot to account...
|
[DB] problem ' Triggers for table `player`.`item` have no creation context'
05/26/2012 - Metin2 Private Server - 0 Replies
Triggers for table `player`.`item` have no creation context
Dadurch wird bei mir in der Tabelle item keine items gespeichert
Folge : EQ verschwindet
Kann mir wer sagen wie ich das behebe?
Skype : mafasaphir
Wäre sehr nett!
|
All times are GMT +1. The time now is 23:59.
|
|