|
You last visited: Today at 13:05
Advertisement
To Private Server administrators/DBA
Discussion on To Private Server administrators/DBA within the Shaiya Private Server forum part of the Shaiya category.
08/03/2012, 16:35
|
#1
|
elite*gold: 150
Join Date: Apr 2010
Posts: 9,739
Received Thanks: 8,977
|
To Private Server administrators/DBA
Hello community,
This post is to gather some information that I am needing to know right now, the question is simple, can you -administrators/GM/database administrators- let me know which are the most used scripts you all use on your daily tasks on the database?
With this I mean, for example that you say "Ban an account/IP ban someone", this with all the ones you use the most.
Hopefully I will get all the information I am needed by now, and in the case I need some further information I will let you all know.
Gathered so far:
Accounts | Characters | Items | Guilds | Mobs | Logs |
---|
Give Points | Stat Pad check | | | | | Look for account | GM Enchants | | | | | Look for IP | GM Links | | | | | Password Change | Look for Toon | | | | | | Character Resurrection | | | | | | Remove Guild Penalty | | | | | | Change Name | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
|
|
08/03/2012, 19:16
|
#2
|
elite*gold: 6
Join Date: Oct 2011
Posts: 914
Received Thanks: 421
|
Every 12h Database Backup
Everyday Stadpadder Search
and DP Give Querie
Those 3 Scripts im using mostly
|
|
|
08/03/2012, 21:19
|
#3
|
elite*gold: 0
Join Date: May 2012
Posts: 95
Received Thanks: 56
|
GM Enchants
SELECT TOP (20000000) CharID, ItemID, Type, TypeID, Bag, Craftname
FROM CharItems
WHERE (CharID = ???) AND (Bag = ?)
OR
SELECT TOP (20000000) UserUID, ItemID, Type, TypeID, Slot, Craftname, Del
FROM UserStoredItems
WHERE (UserUID = ???) AND (Slot < ?)<------ i have used the < sign as we do our Enchants from WH with Forum posts
USE PS_UserData;
UPDATE Users_Master
SET Point = (Point + ?)
WHERE UserID = '?'
the above can have Gems included too if you do GM links
these are probably our most used scripts.
|
|
|
08/03/2012, 21:36
|
#4
|
elite*gold: 0
Join Date: Apr 2011
Posts: 216
Received Thanks: 127
|
SELECT * FROM PS_Gamedata.dbo.Chars WHERE CharName='charname'
SELECT * FROM PS_UserData.dbo.Users_Master WHERE UserID='UserID'
SELECT * FROM PS_GameLog.dbo.actionlog WHERE CharName='charname'
SELECT * FROM PS_UserData.dbo.Users_Master WHERE UserIp='IPHere'
This what i use when i server restart: UPDATE PS_UserData.dbo.Users_Master SET Leave = 0
I use this scripts most.
|
|
|
08/03/2012, 22:43
|
#5
|
elite*gold: 150
Join Date: Apr 2010
Posts: 9,739
Received Thanks: 8,977
|
I don't need the script itself, just what they do, still wouldn't say no if you post the full script though.
Thanks for the information so far, hopefully I will be able to gather the information I am needing soon.
Update
I have added a table containing what I see could be more used from all the information given, will be updating every time someone provides any query/script
|
|
|
08/06/2012, 16:37
|
#6
|
elite*gold: 150
Join Date: Apr 2010
Posts: 9,739
Received Thanks: 8,977
|
Wouldn't like to not get any more replies in here, if there is any script/query that you think is useful and something that is used on "daily tasks" let me know
|
|
|
08/07/2012, 00:03
|
#7
|
elite*gold: 0
Join Date: Oct 2011
Posts: 103
Received Thanks: 63
|
there is also the toon res,
|
|
|
08/07/2012, 00:14
|
#8
|
elite*gold: 0
Join Date: Apr 2011
Posts: 216
Received Thanks: 127
|
Remove Guild Penalty
Password Change
Name Change
Script for deleteing items from invertory, WH, GWH. ^
|
|
|
08/07/2012, 16:37
|
#9
|
elite*gold: 150
Join Date: Apr 2010
Posts: 9,739
Received Thanks: 8,977
|
Haven't thought about deleting items from inventory, how often do you use that script?
|
|
|
08/13/2012, 08:15
|
#10
|
elite*gold: 0
Join Date: Oct 2009
Posts: 942
Received Thanks: 1,066
|
This thread needs a...
-Snuggle Bump- >.>
(hell yea I'm naming my own bumps after myself..got an issue with it?)
|
|
|
10/09/2012, 05:13
|
#11
|
elite*gold: 150
Join Date: Apr 2010
Posts: 9,739
Received Thanks: 8,977
|
Let's bump this thread, more answers would be greatly appreciated.
Let's think about every important script you all would like to have ready to be used for any circumstance; thinking about :
- Accounts
- Characters
- Guilds
- Mobs
- Items
- Logs
Let's see if I can get some more replies in here
|
|
|
10/09/2012, 05:22
|
#12
|
elite*gold: 0
Join Date: Oct 2009
Posts: 942
Received Thanks: 1,066
|
Checking for corrupt GMs would be a good one. o.o
|
|
|
10/09/2012, 08:36
|
#13
|
elite*gold: 10
Join Date: May 2012
Posts: 1,857
Received Thanks: 2,627
|
char change
-- 1. First: Put Character Name in.
Declare @Name as varchar(255)
Set @Name='name here' --Place Character name of the person here.
-- This searches for their Current Family and Job (and to see if it is the right person) when script is Executed.
--(Theres after change checkup too, to see if the Family and Job changed to right ones.)
Select UserID, UserUID, CharID, CharName, Del, Family, Job, Level, LoginStatus From PS_GameData.dbo.Chars Where CharName=@Name and Del='0'
-- 2. Second: Put the New Family Value they want.
Update PS_GameData.dbo.Chars
Set Family='0' -- Warning:If runned empty then changes value to 0.
-- For Family: 0 Human / 1 Elves / 2 Vail / 3 Nordein
Where CharName=@Name and Del='0'
-- 3. Third: Put the New Job Value they want.
Update PS_GameData.dbo.Chars
Set Job='5' -- Warning:If runned empty then changes value to 0.
-- For Job: 0 Warrior-Fighter / 1 Guardian-Defender / 2 Assassin-Ranger
-- 3 Hunter-Archer / 4 Pagan-Mage / 5 Oracle-Priest
Where CharName=@Name and Del='0'
-- This is the After change checkup to compare Old Family and Job to New values when script is Executed.
Select UserID, UserUID, CharID, CharName, Del, Family, Job, Level, LoginStatus From PS_GameData.dbo.Chars Where CharName=@Name and Del='0'
--When Script is Executed, This will show items they had in Inventory before change.
--(Theres same chekup after Script too to get new Values and to compare them 2 to look for possible errors.)
Select CharID, ci.Type, ci.TypeID, i.ItemName, Bag, ci.Slot from PS_GameData.dbo.CharItems ci
inner join PS_GameDefs.dbo.Items i
on ci.Type=i.Type and ci.TypeID = i.TypeID
WHERE
CharID in ( SELECT
CharID
FROM
PS_GameData.dbo.Chars
Where
CharName=@Name
and Del='0')
deleating duped items with originals
---Löscht gedubte und die Originale---
---Character-Items-Löschen---
USE PS_GameData
DELETE FROM dbo.CharItems
WHERE EXISTS (SELECT ItemUID FROM dbo.Charitems dub WHERE dbo.Charitems.ItemUID = dub.ItemUID and dbo.Charitems.CharID <> dub.CharID);
---Warenlager-Items-Löschen---
USE PS_GameData
DELETE FROM dbo.UserStoredItems
WHERE EXISTS (SELECT ItemUID FROM dbo.UserStoredItems dub WHERE dbo.UserStoredItems.ItemUID = dub.ItemUID and dbo.UserStoredItems.UserUID <> dub.UserUID);
---Auctionshaus-Items-Löschen---
USE PS_GameData
DELETE FROM dbo.MarketItems
WHERE EXISTS (SELECT ItemUID FROM dbo.MarketItems dub WHERE dbo.MarketItems.ItemUID = dub.ItemUID and dbo.MarketItems.MarketID <> dub.MarketID);
---Gildenlager-Items-Löschen---
USE PS_GameData
DELETE FROM dbo.GuildStoredItems
WHERE EXISTS (SELECT ItemUID FROM dbo.GuildStoredItems dub WHERE dbo.GuildStoredItems.ItemUID = dub.ItemUID and dbo.GuildStoredItems.GuildID <> dub.GuildID);
tag adding
UPDATE [PS_GameData].[dbo].[Chars]
SET CharName= 'newname'
WHERE CharName= 'oldname'
search charname with inventory infos
Declare @Name as varchar(255)
Set @Name='xxx' --Place Character name of the person here.
SELECT
ci.CharID
,ci.Type
,ci.TypeID
,i.ItemName
,ci.Bag
,ci.Slot
,ci.ItemUID
,ci.Craftname
,ci.Gem1
,ci.Gem2
,ci.Gem3
,ci.Gem4
,ci.Gem5
,ci.Gem6
,ci.Quality
,ci.Count
,ci.Del
From PS_GameData.dbo.CharItems ci
inner join PS_GameDefs.dbo.Items i
on ci.Type=i.Type and ci.TypeID = i.TypeID
WHERE
CharID in ( SELECT
CharID
FROM
PS_GameData.dbo.Chars
Where
CharName=@Name
and Del='0')
having lapis linked wich got a special ID ( this lapis are on my server 31 + and i use that to check if some1 used a prog to link them in a lower gear)
/* Clookup script for how a ppl link with special lapis. change it so it works for your db */
SELECT *
into #SpecLapis
FROM [PS_GameDefs].[dbo].[Items]
where [Type] = 30 and TypeID >= 233 and TypeID <= 250 and TypeID not in (240,241,242,243)
SELECT
UserID
,CharName
,i.ItemName
,l1.ItemName as 'Lapis1'
,L2.ItemName as 'Lapis2'
,L3.ItemName as 'Lapis3'
,L4.ItemName as 'Lapis4'
,L5.ItemName as 'Lapis5'
,L6.ItemName as 'Lapis6'
,SUBSTRING(Craftname,1,2) as 'Str'
,SUBSTRING(Craftname,3,2) as 'Dex'
,SUBSTRING(Craftname,5,2) as 'Rec'
,SUBSTRING(Craftname,7,2) as 'Int'
,SUBSTRING(Craftname,9,2) as 'Wis'
,SUBSTRING(Craftname,11,2) as 'Luc'
,SUBSTRING(Craftname,13,2)+'00' as 'HP'
,SUBSTRING(Craftname,15,2)+'00' as 'MP'
,SUBSTRING(Craftname,17,2)+'00' as 'SP'
,case when cast(SUBSTRING(Craftname,19,2) as int) >= 50
then cast(SUBSTRING(Craftname,19,2) as int) - 50
else cast(SUBSTRING(Craftname,19,2) as int)
end as 'Enchant'
-- ,ci.* ,i.* ,c.*
FROM [PS_GameData].[dbo].[CharItems] ci with (nolock)
inner join [PS_GameDefs].[dbo].[Items] i with (nolock)
on i.ItemID = ci.ItemID
inner join [PS_GameData].[dbo].[Chars] c with (nolock)
on c.CharID = ci.CharID
left join [PS_GameDefs].[dbo].[Items] L1 with (nolock)
on L1.TypeID = ci.Gem1
and L1.Type = 30
left join [PS_GameDefs].[dbo].[Items] L2 with (nolock)
on L2.TypeID = ci.Gem2
and L2.Type = 30
left join [PS_GameDefs].[dbo].[Items] L3 with (nolock)
on L3.TypeID = ci.Gem3
and L3.Type = 30
left join [PS_GameDefs].[dbo].[Items] L4 with (nolock)
on L4.TypeID = ci.Gem4
and L4.Type = 30
left join [PS_GameDefs].[dbo].[Items] L5 with (nolock)
on L5.TypeID = ci.Gem5
and L5.Type = 30
left join [PS_GameDefs].[dbo].[Items] L6 with (nolock)
on L6.TypeID = ci.Gem6
and L6.Type = 30
where
Gem1 in ( select TypeID from #SpecLapis )
or Gem2 in ( select TypeID from #SpecLapis )
or Gem3 in ( select TypeID from #SpecLapis )
or Gem4 in ( select TypeID from #SpecLapis )
or Gem5 in ( select TypeID from #SpecLapis )
or Gem6 in ( select TypeID from #SpecLapis )
order by
UserID, CharName
drop table #SpecLapis
ip bann
UPDATE PS_UserData.dbo.Users_Master set Status = -5 WHERE UserIp = 'ip here'
that are my most used quiery´s
|
|
|
10/09/2012, 13:46
|
#14
|
elite*gold: 0
Join Date: Sep 2010
Posts: 520
Received Thanks: 1,286
|
I have a function I use (named "BackupDB") that will backup any and all databases when executed (apart from the sys databases). Quite useful for a python script I threw together that backs everything up (including server files), makes a RAR archive and uploads it.
A simple query to check GM commands (bit different since I log them to a different table, same as kills)
I can't think of others offhand, maybe later.
|
|
|
10/09/2012, 15:34
|
#15
|
elite*gold: 0
Join Date: Apr 2011
Posts: 216
Received Thanks: 127
|
There are also:
Script for checking drops: Example, you wanna check what drops under grade 02, and runnin the script will show you what all Items drop from It. It's what I use sometimes to search the not used ones.
Script for checking logs, action type.
Quote:
Haven't thought about deleting items from inventory, how often do you use that script?
|
Just seen this that you asked me before, lol. Anyway, well not really often, but let's say some of your staff quits or you fire him, you would want to remove he's name changes stones or messages to server, so you would just type ItemID and CharID, execute and done. that was an example.
There Is script for rerroll as well.
SELECT CharName, ActionTime, Text1
FROM PS_GameLog.dbo.ActionLog
WHERE ActionType = 107 and charname = 'charname' This would be IP checker..
|
|
|
|
|
Similar Threads
|
Administrators please move discussion
09/08/2011 - WarRock Hacks, Bots, Cheats & Exploits - 0 Replies
http://www.elitepvpers.com/forum/warrock/1422777-v ip-hax-pubblico-d3d-vixbox-tiomasos.html
Administrators please move discussion!!!
|
For the ECSRO server administrators!
05/17/2008 - SRO Private Server - 4 Replies
Dear Admins!
I was wondering what do you guys do with money you gain from silk,gold...etc.
If im right there is now 1000 slot on the server.And 500 ppl buys silk,gold,sp...
for 5 dollar=2500$/month or week.It would be very nice the slot will be increased to 2000-3000 slots.I found a server enough performance.See it The Dell Online Store: Build Your System
You can easyli affordthis prize.More slot,more ppl,more silk,gold...etc buyer.
Ps:Sry for my english i never learnd this...
|
Administrators plz take a look
05/10/2008 - Metin2 - 1 Replies
ok so heres the thing...i found a exp hack program but cudnt run it coz its rigged with a backdoor trojan and still dont know if it works..but i do know that in order to hack server side codes u neet to have a backdoor and it also tries to modify a file that..i think is patchw32.dll
plz take a look at this program and tell me if its legit or wether i shud just delete it
i have uploaded it to a website and given the link below:
Metin2 Exp Hack.rar
thnx a lot in advance and looking forward...
|
All times are GMT +2. The time now is 13:05.
|
|