I have another practically useless script that you guys might want =o
To begin with, run this:
Code:
USE [PS_GMTool]
GO
/****** Object: StoredProcedure [dbo].[usp_Char_Find] Script Date: 02/05/2011 17:50:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
/*==================================================
@author Tyler
@date 2011-02-05
==================================================*/
CREATE Proc [dbo].[usp_Char_Find]
@CharName varchar(30)
AS
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
DECLARE
@UserIP varchar(30),
@UserUID int
SET @UserUID=(SELECT UserUID FROM PS_GameData.dbo.Chars WHERE CharName=@CharName AND DEL=0)
SET @UserIP=(SELECT UserIP FROM PS_UserData.dbo.Users_Master WHERE UserUID=@UserUID)
SELECT U.[UserIP], U.[UserID], C.[CharName],C.[K1],C.[K2],
CASE C.[Family]
WHEN 0 THEN 'Light'
WHEN 1 THEN 'Light'
WHEN 2 THEN 'Fury'
WHEN 3 THEN 'Fury'
END AS [Faction]
FROM [PS_UserData].[dbo].[Users_Master] U
INNER JOIN [PS_GameData].[dbo].[Chars] C
ON C.[UserUID] = U.[UserUID]
WHERE UserIP=@UserIP
ORDER BY U.[UserUID]
Then use this to run it:
Code:
EXEC PS_GMTool.dbo.usp_Char_Find '' --CharName goes here
Aren't the CharName unique in your DB ??
if they are (as expected) the 1st request is useless
The 2nd request is a bad idea - UserIP is read a 2nd time in 3rd request and using a varchar as join key is ... not nice.
According uniqueness of name, the final sort is useless since you obtain a single record response.
so ...
SELECT C.[CharName],U.[UserID],U.[UserIP],
CASE C.[Family]
WHEN 0 THEN 'Light'
WHEN 1 THEN 'Light'
WHEN 2 THEN 'Fury'
WHEN 3 THEN 'Fury'
END Faction,C.[K1],C.[K2]
FROM [PS_GameData].[dbo].[Chars] C
INNER JOIN [PS_UserData].[dbo].[Users_Master] U ON U.[UserUID]=C.[UserUID]
WHERE C.CharName=@CharName
One possible flaw I see with this, is that it appears you are only checking the IP addresses of what the accounts were registered under.
It does not appear you are checking what IP address the users are currently logged in with.
The reason this is a big flaw, is that when registering an account, it is very easy to use a proxy to show up under a different IP address than you use to connect to the game with.
Theoretically one could register any number of accounts under different IP addresses using a simple web proxy. Then when you check for other accounts under the same IP address, you always find only one.
This is why it is important to know which IP address(es) the person logged into the game with, because it is MUCH harder to fake. The IP address that created the account is of little significance overall.
That's what I wanted to do Abrasive, but I couldn't figure out how to pull that data easily.
Usually it takes a bit for it to scan that table, I've thought about trying to get it to store that data in another table though, if possible. ;o *Not the whole actionlog, just actiontype for login)
You didin't explain your goal Tnelis - except to say it's "practically useless".
Abrasive is right to highlight the fact that Users_Master.UserIP contains a single IP, the one used at registration (assuming the script does store it).
If your goal is to track all IP used by one toon you should scan the UserLoginLog table (assuming here again that you fill-in that table during login/logout).
Also, relying on IP can be a weak solution and it's better to identify an user with a MAC address (the unique address of his ethernet card), but that info can be harder to obtain.
The login IP is stored in the gamelog, you can get it from there. I would post a script but i completly destroyed my SQl with 3 partial 2k5's and 2 partial 2k8 installs. Gonna take sometime to fix it lol.
The sole valuable info is: in which table ps_login.exe does insert a record (if any) or which stored proc. does it invoke.
It's that entry point that must be checked, beyond that point it depends strongly on the configuration of the server and its databases.
Note that I'm not saying that server config is always unpredictable, I just remember that individual adjustments can be made.
the first proc (ups_try_gamelogin7_r) does *not* exist in my PS_UserData DB.
so I guess ps_login.exe call the second (directly or after failure of the 1st call).
ups_Try_GameLogin_Taiwan does exist and indeed has 4 mandatory parameters:
here (may) come the mess, in (one of) my DB, that proc. inserts a record into PS_UserLog_yyyymm.dbo.UserLog with 'yyyy' the current year, 'mm' the month.
of course there is no 'create database' within that script and such DB likely does not exist.
so you may want to change that proc (usp_Insert_LoginLog_E) to insert a record into PS_GameLog.dbo.UserLog (instead of a date based DB) but ... second issue UserLog (at least mine) does not contains an UserIP field; so you will have to add it and modify the insert statement of usp_Insert_LoginLog_E accordingly.
after all these checks, modif. and updates, if your purpose is to "Find all Chars connected to IP" you will have a proc (or a immediate script) doing:
assuming:
Code:
declare @UserIP varchar(20)
do:
Code:
select um.UserID,ch.CharName,ul.UserIP
from PS_GameLog.dbo.UserLog ul
inner join PS_UserData.dbo.Users_Master um ON um.UserUID=ul.UserUID
inner join PS_GameData.dbo.Chars ch on ch.UserUID=ul.UserUID
where ul.UserIP=@UserIP
There's no need to check for player's IP. Just check what the UserUID is and then do a JOIN between Chars and ActionLog tables. This will show you which IP's the players logged in with.
Every login attempt is registered in ActionLog table, with UserUID, CharName, UserIP, etc.
Code:
DECLARE @UserUID int;
SELECT @UserUID=UserUID FROM PS_GameData.dbo.Chars WHERE CharName LIKE '%%';
SELECT C.UserUID, AL.UserID, C.CharID, C.CharName, AL.Text1 AS UserIP
FROM PS_GameLog.dbo.ActionLog AS AL INNER JOIN PS_GameData.dbo.Chars AS C
ON AL.UserUID=C.UserUID
WHERE AL.ActionType=107 AND AL.UserUID=@UserUID
ORDER BY C.UserUID, AL.Text1
there are plenty of cases in daily life where it is perfectly true
now, what about cases where we are looking for information on a specific IP ?...
to quote myself:
Quote:
You didn't explain your goal Tnelis
if the goal is to know which accounts were used with one specific IP - because GM is suspecting abusive accounts (to get free DP for instance); or which toons were played with one specific IP (for instance coz someone complains that one of his toon was used by someone else) then you are looking for "all Chars connected to IP", you do need an IP and you will definitively want a search on that criterion.
OOH, if the goal is to know which IPs (IPs not IP) were used by an account, and the original request shows this type of research (in contradiction with the title of the thread) then you do not need an IP as a search criterion.
PM me about this. I am not feeling well today and tomorrow I have work. On Wednesday, unless someone is faster, I can work on those two problems and post working queries.
I still don't understand what you guys are trying to do but if you want all unique IP's connected with your server say on a particular day then simple use the UNIQUE function on the Text1 coloumn and the required date.
[RELEASE] FIND THE PM EVENT! 11/16/2010 - EO PServer Guides & Releases - 19 Replies Good Afternoon Elitepvpers
This is my release Find The PM Event
This is how this Event Works
The Owner of the game Example "PM!!!!!" Goes Hide in a map Which is a maze!
so this makes it alot of places for players to find the pm
i usally do this on my server to reward players with ep,its also good event,got you on the verge of findign them!
All you got to do is insert this into your SQL Command line i navicat
Release Hack Find 02/16/2010 - Combat Arms Hacks, Bots, Cheats & Exploits - 4 Replies Sorry Have forget ^^
New Hack not from me Test it
Features:
-Spammer
-Tapper
-CBL Checker
-Crosshair
-AFK BOT
-Aimbot
[Release]How to find Item Quality 12/16/2009 - CO2 PServer Guides & Releases - 3 Replies Right, decided i would release this, anyone with common sense is probably already doing this but hopefully it will help someone.
public static int GetQuality(int ItemID)
{
return ItemID % 10;
}
Give the function the Static Item ID, and it will return the quality (1-9), this can be addapted to use an enum and return Super, Elite, Unique etc:
public static ItemQuality GetQuality(uint ItemID)
{