Auto Bann StatPadd Release

06/13/2015 11:20 [ADM]Whiite#1
PS_GameLog.dbo.usp.Insert_Action_Log_E

select and copy under the following code:

IF(LEN(@dd) = 1)
BEGIN
SET @dd = '0' + @dd
END

PHP Code:
ELSE IF @ActionType 103 -- pvp kill
BEGIN    
    INSERT INTO Kill_Log VALUES 
(@UserID, @UserUID, @CharID, @CharName, @Value1, @Text1, @MapID, @PosX, @PosY, @PosZ, @ActionTime)    
END

ELSE IF @ActionType 104 -- pvp death
BEGIN    
    INSERT INTO Death_Log VALUES 
(@UserID, @UserUID, @CharID, @CharName, @Value1, @Text1, @MapID, @PosX, @PosY, @PosZ, @ActionTime)
        
    DECLARE @
K1 INT = (SELECT COUNT(*) FROM Kill_Log WHERE CharID = @CharID)
    DECLARE @
K2 INT = (SELECT COUNT(*) FROM Death_Log WHERE CharID = @CharID)
    
    IF (@
K2 50 AND @K1 50 < @K2)
    -- if 
the character died more than 10 times and their kills multiplied by 10 are less than their deaths
    BEGIN
        
-- banning the feeder
        UPDATE PS_UserData
.dbo.Users_Master
        SET Status 
= -5
        WHERE UserUID 
= @UserUID
        
        
-- banning the killer
        
-- uncomment those lines if you want the killer to get banned (not recommended)
        --
UPDATE PS_UserData.dbo.Users_Master
        
--SET Status = -5
        
--WHERE UserUID = (SELECT TOP 1 UserUID FROM PS_GameData.dbo.Chars WHERE CharID = @Value1)        
    
END
END 
And Execute the following procedures.

PHP Code:
USE [PS_GameLog]
GO

/****** Object:  Table [dbo].[Death_Log]    Script Date: 6/13/2015 11:26:20 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE 
[dbo].[Death_Log](
    [
RowID] [intIDENTITY(1,1NOT NULL,
    [
UserID] [varchar](18NOT NULL,
    [
UserUID] [intNOT NULL,
    [
CharID] [intNOT NULL,
    [
CharName] [nvarchar](50NOT NULL,
    [
KillerCharID] [intNOT NULL,
    [
KillerCharName] [nvarchar](50NOT NULL,
    [
MapID] [tinyintNOT NULL,
    [
PosX] [realNOT NULL,
    [
PosY] [realNOT NULL,
    [
PosZ] [realNOT NULL,
    [
ActionTime] [datetimeNOT NULL,
 
CONSTRAINT [PK_Death_LogPRIMARY KEY CLUSTERED 
(
    [
RowIDASC
)WITH (PAD_INDEX OFFSTATISTICS_NORECOMPUTE OFFIGNORE_DUP_KEY OFFALLOW_ROW_LOCKS ONALLOW_PAGE_LOCKS ONON [PRIMARY]
ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO 
PHP Code:
USE [PS_GameLog]
GO

/****** Object:  Table [dbo].[Kill_Log]    Script Date: 6/13/2015 11:28:13 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE 
[dbo].[Kill_Log](
    [
RowID] [intIDENTITY(1,1NOT NULL,
    [
UserID] [varchar](20NOT NULL,
    [
UserUID] [intNOT NULL,
    [
CharID] [intNOT NULL,
    [
CharName] [nvarchar](50NOT NULL,
    [
DeadCharID] [intNOT NULL,
    [
DeadCharName] [nvarchar](50NOT NULL,
    [
MapID] [tinyintNOT NULL,
    [
PosX] [realNOT NULL,
    [
PosY] [realNOT NULL,
    [
PosZ] [realNOT NULL,
    [
ActionTime] [datetimeNOT NULL,
 
CONSTRAINT [PK_Kill_LogPRIMARY KEY CLUSTERED 
(
    [
RowIDASC
)WITH (PAD_INDEX OFFSTATISTICS_NORECOMPUTE OFFIGNORE_DUP_KEY OFFALLOW_ROW_LOCKS ONALLOW_PAGE_LOCKS ONON [PRIMARY]
ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO 
Credits to nubness
06/13/2015 12:33 [DEV]_Yűko#2
Why one automobile proclamation Statpadd(round of applause Statpadd) you would do better to make a script for removed kil by identical IP or a script which disconnects express die that a kil this fact with the grandma IP
06/13/2015 14:24 andr3y_you96#3
Im pretty sure that this was alredy released by nubness here [Only registered and activated users can see links. Click Here To Register...]
06/13/2015 20:28 [Alcatraz]#4
Nice little release I read through all the scripts and its nice and clean and it will do the job but I agree with shineo on some points he made it would work better if it did a kill penalty then banning the people involved everyone tries to cheat or exploit the system at some time or another banning them only cost you players on your server. so by given a penalty you put a stop to it with out losing players
06/13/2015 20:59 [ADM]Whiite#5
Thanks for your suggestions guys, We will look into it :)
06/13/2015 21:28 [Alcatraz]#6
you could do like shineo suggested and make it look for ip address of the killer and the killed but you'll run into a problem there with the Philippines. being alots of the players there use what they call a café and a lot of them will return the same ip address which in turn creates a problem for auto ban scripts and account limits but doing it how you have it set up now and just figure the amount of kills they gain from that one person and have it update the k1 in chars for that person to reduce the total kills I think would put a fast stop to stat padding but that would be a suggestion it would need to be tested to make sure its not creating problems for other players who are just isn't geared enough yet to making kills with out dying 50 times lol
06/13/2015 23:04 Big_#7
Where is the credits to the orginal author because these script have been pulled from Nubness Admin pannel Scripts from his PS_Gamelog
06/14/2015 00:05 nubness#8
Quote:
Originally Posted by andr3y_you96 View Post
Im pretty sure that this was alredy released by nubness here [Only registered and activated users can see links. Click Here To Register...]
Quote:
Originally Posted by Big_ View Post
Where is the credits to the orginal author because these script have been pulled from Nubness Admin pannel Scripts from his PS_Gamelog
Good point, didn't even notice that. Thanks to both of you for pointing it out.
I guess there's nothing else I have to say here. Typical release for the past year or so.
06/14/2015 19:12 [ADM]Whiite#9
Credits to nubness
06/14/2015 20:19 nubness#10
Quote:
Originally Posted by [ADM]Whiite View Post
Credits by nubness
Credits to nubness.

If it's already released, why exactly did you release it again ?
06/24/2015 00:06 AxelMac#11

in this query i get a error, because if anyone kill a player in battle + of 10 times the other is banned :|
I Tested...
06/30/2015 00:46 Revolution66614#12
nubness thats so much kid u can now stop commenting in every damn thread could you? Thank you
07/01/2015 10:57 auferhousethe#13
Char level column need to add