|
You last visited: Today at 07:30
Advertisement
[Release]Bunch of Useful Queries for MsSql Database Return Results
Discussion on [Release]Bunch of Useful Queries for MsSql Database Return Results within the SRO PServer Guides & Releases forum part of the SRO Private Server category.
02/14/2012, 08:37
|
#1
|
elite*gold: 0
Join Date: Aug 2007
Posts: 191
Received Thanks: 109
|
[Release]Bunch of Useful Queries for MsSql Database Return Results
- Finds Inventory Items Based on Char name and some additional info
Code:
Use SRO_VT_SHARD_INIT
Select CH.CharName16, INV.CharID, INV.ItemID, IT.OptLevel, IT.RefItemID, INV.Slot, REF.ReqGender, REFC.ReqLevel1, REFC.CodeName128 From _Inventory As INV
Right Join _Items As IT On INV.ItemID = IT.ID64
Right Join _RefObjItem As REF On IT.RefItemID = REF.ID
Right Join _RefObjCommon As REFC On REFC.ID = REF.ID
Right Join _Char As CH On CH.CharID = INV.CharID
Where CH.CharName16 = 'Pal2aDoX' And INV.Slot <= '12'
Order By Slot Asc
(If you understand the queries you can change _Inventory to _Chest, GuildChest, InvCOS to check other storage places for items. You can also remove the <='12' so it shows all items etc.)
- Finds Items Not Wanted or otherwise (Used for finding items to delete)
Code:
Use SRO_VT_SHARD_INIT
Select IT.RefItemID, REF.CodeName128, IT.ID64 From _RefObjCommon AS Ref
Right Join _Items As IT On IT.RefItemID = Ref.ID
Where Ref.CodeName128 Like 'ITEM_CH_%09%'
Or REF.CodeName128 Like 'ITEM_CH_%10%'
Or REF.CodeName128 Like 'ITEM_EU%'
Order By CodeName128 Asc
- Finds items in inventory based on stated item
Code:
Use SRO_VT_SHARD_INIT
Select IT.ID64, IT.OptLevel As Plus, INV.CharID, CH.CharName16, REF.CodeName128 From _RefObjCommon As REF
Right Join _Items As IT On IT.RefItemID = REF.ID
Right Join _Inventory As INV On INV.ItemID = IT.ID64
Right Join _Char as CH On CH.CharID = INV.CharID
Where CodeName128 like '%SHIELD_08_C_RARE'
- Searches for mobs
Code:
Use SRO_VT_SHARD_INIT
Select REF.CodeName128, REF.ID, REF.Link, CH.Lvl From _RefObjCommon AS REF
Right Join _RefObjChar As CH On CH.ID = REF.Link
Where REF.CodeName128 like 'MOB_SD%'
and CH.Lvl Between 105 and 109
and REF.Rarity Not Between 3 and 9
Order By CH.Lvl Asc
(Ignores uniques and searches between mob levels 105-109. You can change these 2 to what ever you like)
- Finds registered guilds for fw, leader, fw name, etc
Code:
Use SRO_VT_SHARD_INIT
Select Distinct SG.GuildID, GM.CharName as GuildMaster, G.Name as GuildName, SG.FortressID, REFSG.CodeName128 As FortressName From _SiegeFortressRequest as SG
Right Join _RefSiegeFortress As REFSG On SG.FortressID = REFSG.FortressID
Right Join _Guild as G On G.ID = SG.GuildID
Right Join _RefSiegeFortress on REFSG.FortressID = SG.FortressID
Right Join _GuildMember as GM On GM.GuildID = SG.GuildID
Where GM.MemberClass = 0 and SG.RequestType = 0
Order By REFSG.CodeName128 Asc
- Resets Guild penalty when leaving
Code:
Delete From _TimedJob Where ChardID = 'CharID' and JobID = '1'
- Finds Username, jid, charname based from charname
Code:
Select SRO_VT_SHARD_INIT.dbo._Char.CharName16 As CharName, U.StrUserID As UserName, UserJID As JID From SRO_VT_SHARD_INIT.dbo._User
Right Join SRO_VT_SHARD_INIT.dbo._Char
On SRO_VT_SHARD_INIT.dbo._User.CharID = SRO_VT_SHARD_INIT.dbo._Char.CharID
Right Join SRO_VT_ACCOUNT.dbo.TB_User As U
On U.JID = SRO_VT_SHARD_INIT.dbo._User.UserJID
Where _Char.CharName16 = 'CharNameHere'
- Finds Item Names and Durability for Adding to RefScrap
Code:
Use SRO_VT_SHARD_INIT
Select REF.CodeName128, I.Dur_L From _RefObjCommon As REF
Right Join _RefObjItem As I On I.ID = REF.Link
Where REF.CodeName128 like 'ITEM_CH_W_%_03_%_C_RARE'
and REF.CodeName128 Not Like '%_HA_%'
Order By REF.CodeName128 Asc
|
|
|
05/21/2013, 22:50
|
#2
|
elite*gold: 0
Join Date: Nov 2012
Posts: 32
Received Thanks: 0
|
NICE Thanks
|
|
|
11/10/2013, 22:36
|
#3
|
elite*gold: 460
Join Date: Jul 2012
Posts: 394
Received Thanks: 272
|
nice but query of - Finds Inventory Items Based on Char name and some additional info
let me fix it to you ^_^
Select INV.CharID, CH.CharName16, INV.ItemID, IT.OptLevel, IT.RefItemID, INV.Slot, REF.ReqGender, REFC.AssocFileICon128, REF.Dur_L, REF.Dur_U, REF.PD_L, REF.PD_U, REF.MD_L, REF.MD_U, REF.ER_L, REF.ER_U, REF.PDStr_L, REF.PDStr_U, REF.MDInt_L, REF.MDInt_U, REF.MaxMagicOptCount, REF.PAttackMin_L, REF.PAttackMin_U, REF.PAttackMax_L, REF.PAttackMin_U, REF.MAttackMin_L, REF.MAttackMin_U, REF.MAttackMax_L, REF.MAttackMin_U, REF.Range, REF.HR_L, REF.HR_U, REF.CHR_L, REF.CHR_U, REF.PAStrMin_L, REF.PAStrMin_U, REF.PAStrMax_L, REF.PAStrMax_U, REF.MAInt_Min_L, REF.MAInt_Min_U, REF.MAInt_Max_L, REF.MAInt_Max_U, REF.PAR_L, REF.PAR_U, REF.MAR_L, REF.MAR_U, REFC.ReqLevel1, REFC.CodeName128 From _Inventory As INV
Right Join _Items As IT On INV.ItemID = IT.ID64
Right Join _RefObjCommon As REFC On REFC.ID = IT.RefItemID
Right Join _RefObjItem As REF On REFC.Link = REF.ID
Right Join _Char As CH On CH.CharID = INV.CharID
Where CH.CharName16 = 'Test2'
Order By Slot Asc
|
|
|
11/11/2013, 10:18
|
#4
|
elite*gold: 0
Join Date: Nov 2013
Posts: 74
Received Thanks: 9
|
NICE Thanks
|
|
|
12/07/2015, 07:30
|
#5
|
elite*gold: 0
Join Date: Dec 2012
Posts: 92
Received Thanks: 3
|
anyone know the Query to place again the Job/Guild Penalty?
|
|
|
 |
Similar Threads
|
[Release]CLEAN database + MSSQL cleaning script
11/02/2020 - Dekaron Private Server - 31 Replies
My 666th post!
Ok, so I know everyone is expecting the IPbanV2/3 from me as my next release, but I decided I will do this first, because it took me a lot less time.
LINK (megaupload)
ALL info is deleted, except what is required to run the server with all functions like in the silkbotter's database. Tested by myself, and working.
NOTE: Siege is not added, but you can add it easily with the script. I didn't add siege, because I thought that you will want to set the start time like you...
|
[Release]Database D13 Running in Mssql 2005
02/12/2014 - SRO PServer Guides & Releases - 78 Replies
for users who use the mysql 2005 ^ ^ I've seen many topics asking for someone to upload these databases running on mssql 2005 then be here
http://store2.up-00.com/Jan12/8YQ76084.jpg
Download:SRO_VT_SHARD-D13.rar
Password:King$
Create by me no others
http://store2.up-00.com/Jan12/a9j76084.gif
if u found a bug post here ^.^
;)
http://store2.up-00.com/Jan12/a9j76084.gif
|
How to remote connect to mssql database?
10/29/2011 - SRO Private Server - 3 Replies
How can I connect to dedicated server's mssql database?
sqlserver2005 express edition + sql managment studio installed on both computer (dedi server and my pc)
sqlbrowser enabled and running
tcp/ip enabled, remote connections enabled
i tried connecting like
serverip:port
serverip\sqlexpress
serverip:port\sqlexpress
serverip
|
[HOWTO] Logging ALL Queries on a MSSQL Database?
12/25/2010 - Dekaron Private Server - 8 Replies
Hi,
after ALLOT of googling in found a very sweet function in mssql
If you have "Profiler" install here is how you can track almost everything that is going on in the DB
after creating the topic and result from http://www.elitepvpers.com/forum/dekaron-private-se rver/895715-test-response-time-db.html
ive found out that it will take months (YES! months) to analyze all the data that is send from dekaronserver.exe
so here is how you can trace it:
Open SQL Server Profiler or Profiler
|
[ePic-ReLeAsE] Mob Queries ( 359 )
08/14/2009 - CO2 PServer Guides & Releases - 9 Replies
i aint releasing anything anymore,
|
All times are GMT +1. The time now is 07:31.
|
|