Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

TriJob Anti Cheat (simple)

Newbie Spellweaver
Joined
Aug 22, 2014
Messages
68
Reaction score
19
Hey folks,
I wanna release a simple version of my anti cheat query (no error handlers etc).


Query description:
on trader goods pickup the query check if the character is thief and his location is in town while he pick up
if so then the item he picked up get removed. (takes effect after teleport).


Code:
    /**_# TriJob Anti Cheat by Syloxx (simple)*/
    IF @[I][B][URL="http://forum.ragezone.com/members/2000154287.html"]operation[/URL][/B][/I] = 144
    BEGIN
        DECLARE @JobType tinyint
            , @IsBattleField bit
            , @ItemID int


        SELECT @JobType = CTJ.JobType
            , @IsBattleField = R.IsBattleField
        FROM SRO_VT_SHARD.dbo._Char C
            INNER JOIN SRO_VT_SHARD.dbo._CharTriJob CTJ ON C.CharID = CTJ.CharID
            INNER JOIN SRO_VT_SHARD.dbo._RefRegion R ON C.LatestRegion = R.wRegionID
        WHERE C.CharID = @[I][B][URL="http://forum.ragezone.com/members/551894.html"]Char[/URL][/B][/I]ID


        IF @JobType = 2 AND @IsBattleField = 0
        BEGIN
            SELECT @ItemID = ID64
            FROM SRO_VT_SHARD.dbo._Items
            WHERE Serial64 = @ItemSerial


            UPDATE SRO_VT_SHARD.dbo._InvCOS
            SET ItemID = 0
            WHERE ItemID = @ItemID


            /*
            INSERT INTO _AntiCheatLog
            VALUES  @[I][B][URL="http://forum.ragezone.com/members/551894.html"]Char[/URL][/B][/I]ID, @ItemSerial, GETDATE())
            */
        END
    END


Tutorial:
-Add this query to the bottom of your _AddLogItem procedure.


Don't remove the header comment!
Press thanks if you use this query!
 
Newbie Spellweaver
Joined
Aug 22, 2014
Messages
68
Reaction score
19
i commented the insert function because it didn't released the table, if you want this function just add the table and uncomment it
 
Joined
Feb 27, 2013
Messages
1,430
Reaction score
201
After test, it doesn't works... I have picked up the trade items from ground then teleported to thief town and opened my cos's inventory and nothing was deleted. Just wonderful what's job of this value
Code:
IF [USER=2000154287]operation[/USER] = 144
Isn't it should be "114" instead of "144"
 
Last edited:
Newbie Spellweaver
Joined
Aug 22, 2014
Messages
68
Reaction score
19
After test, it doesn't works... I have picked up the trade items from ground then teleported to thief town and opened my cos's inventory and nothing was deleted. Just wonderful what's job of this value
Code:
IF @[I][B][URL="http://forum.ragezone.com/members/2000154287.html"]operation[/URL][/B][/I] = 144
Isn't it should be "114" instead of "144"

thanks, if some1 else can agree this i'll change the operation i cant test it yet

btw create another check IF operation = 114 (144) AND @IemRefID in _RefObjCommon where TypeID3 = xxx AND TypeID4 = xxx

otherwise this query will delete items from grab pet since it uses the same Operation
 
Initiate Mage
Joined
Feb 21, 2015
Messages
3
Reaction score
0
I agree with RenePunik that it doesn't work. could you check sql codes please.
 
Joined
Feb 27, 2013
Messages
1,430
Reaction score
201
Missing Table:
Code:
USE [SRO_VT_SHARDLOG]
GO

/****** Object:  Table [dbo].[_AntiJobCheatLog]    Script Date: 3/17/2015 9:58:09 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[_AntiJobCheatLog](
    [CharID] [int] NOT NULL,
    [ItemSerial] [bigint] NOT NULL,
    [Date] [date] NOT NULL,
 CONSTRAINT [PK__AntiJobCheatLog] PRIMARY KEY CLUSTERED 
(
    [CharID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
And don't forget to uncomment this line: just delete /* & */
Code:
            /*
            INSERT INTO _AntiCheatLog
            VALUES   [USER=551894]Char[/USER]ID, @ItemSerial, GETDATE())
            */



At least it doesn't works, we need fix!
 
Junior Spellweaver
Joined
Jul 2, 2012
Messages
151
Reaction score
13
Nah, dont use TypeIDs, better use the Item IDs of all _TRADE Items.

lb1JXZL - TriJob Anti Cheat (simple) - RaGEZONE Forums



Edited and fixed _AddLogItem extension
Get the whole code here due to the auto converting of RZ I cannot post the code correctly.
PHP:
http://pastebin.com/Zgk5UbSJ

Lol, RZ Changes things like operation and CharID to a Mention thing ...... -.-





I just checked this procedure out, and I found out sometimes it deletes the trade items, and sometimes not.
I'll take care about and i'll post a hotfix soon.
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Jan 30, 2013
Messages
20
Reaction score
1
Nah, dont use TypeIDs, better use the Item IDs of all _TRADE Items.

Syloxx - TriJob Anti Cheat (simple) - RaGEZONE Forums



Edited and fixed _AddLogItem extension
Get the whole code here due to the auto converting of RZ I cannot post the code correctly.
PHP:
http://pastebin.com/Zgk5UbSJ

Lol, RZ Changes things like @operation and @CharID to a Mention thing ...... -.-





I just checked this procedure out, and I found out sometimes it deletes the trade items, and sometimes not.
I'll take care about and i'll post a hotfix soon.

jup but there is one problem, if there are custom trader goods then your list is incomplete.
 
Newbie Spellweaver
Joined
Aug 22, 2014
Messages
68
Reaction score
19
I just checked this procedure out, and I found out sometimes it deletes the trade items, and sometimes not.
I'll take care about and i'll post a hotfix soon.

The pos in _Char isnt live (it have some delay) would be useless to update the _Char table everytime if the char moves this is why this happen.
I didn't really checked what is the best possible way this is why i used the most simple way.

Maybe the charpos appear if you pick goods / use bandit scroll
i just released the logic behind it.
 
Back
Top