2 SQL SCRIPTS TO BAN HACKERS!

10/07/2010 12:36 ҉ THT ҉#1
FIRST SCRIPT
Lets ban the ppl that has to many stats :)
Its a BAN script not a simple delete from user_character.. it will ban the whole account..
Its not a stored procedure its just a "job".
Replace the MAX STATS with a stats that players can have at max reborn/lvl.
Replace the GM CHARACTER NOs with character no's for gms that can have offer the limit

PHP Code:
UPDATE                                        account.dbo.user_profile
SET                                            login_tag
='N'            
WHERE user_no IN(
SELECT user_no FROM character.dbo.user_character WHERE character_no IN(
SELECT DISTINCT character_no FROM character.dbo.user_character WHERE 

                                            wstr 
+ wdex + wcon + wspr > MAX STATS

AND            character_no NOT LIKE 'GM CHARACTER NOs'
AND            character_no NOT LIKE 'GM CHARACTER NOs'
AND            character_no NOT LIKE 'GM CHARACTER NOs'
)) 
SECOND SCRIPT
Lets ban the ppl that has GM/ILLIGAL item in hes inventory :)
Its a BAN script not a simple delete from user_character.. it will ban the whole account....
Replace GM ITEM INDEX with index that are forbidden to have.
Replace CHARACTER NO with gm character_no that can have/wear that index.

PHP Code:
UPDATE                                        account.dbo.user_profile
SET                                            login_tag
='N'            
WHERE user_no IN(
SELECT user_no FROM character.dbo.user_character WHERE character_no IN(
SELECT DISTINCT character_no FROM character.dbo.user_bag WHERE 

                                            windex 
= 'GM ITEM INDEX'

AND        character_no NOT LIKE 'GM CHARACTER NO'
AND        character_no NOT LIKE 'GM CHARACTER NO'
AND        character_no NOT LIKE 'GM CHARACTER NO'
)) 

If you just play a lil with this script you can make more ban scripts with it..

Its just a simple script, if you dont love it, it doesnt mean you can flame my, cuz you didnt pay my anything for it ;)
10/07/2010 14:09 *JayKay*#2
a question here put the index of prohibited items?
windex = 'GM ITEM INDEX'

and here the name of the GM can have the items?
AND character_no NOT LIKE 'GM CHARACTER NO'

have to create a job to run this?

f you can answer my questions thank you.
10/07/2010 14:24 ҉ THT ҉#3
Quote:
Originally Posted by arthurvalenca View Post
a question here put the index of prohibited items?
windex = 'GM ITEM INDEX'

and here the name of the GM can have the items?
AND character_no NOT LIKE 'GM CHARACTER NO'

have to create a job to run this?

f you can answer my questions thank you.
First question: YES
Second question: You must put this in a job,
step 1 is the script
second step is wait
10/07/2010 14:26 *JayKay*#4
thanks for help
10/07/2010 23:20 pieter#5
that max stats job will lag the shit out of your server once it grows abit..

u should avoid looping jobs where u can and find alternative ways
10/07/2010 23:52 *JayKay*#6
to add two more items in the script and so?

windex = 'XXXX' AND Windex = 'XXXXX' AND Windex = 'XXXX'

correct me if I'm wrong please
10/08/2010 00:05 ҉ THT ҉#7
Quote:
Originally Posted by pieter View Post
that max stats job will lag the shit out of your server once it grows abit..

u should avoid looping jobs where u can and find alternative ways
uuh yes ofc,, it must be used like stored procedure



no use

AND WHERE windex = 'INDEX'
10/08/2010 00:51 *JayKay*#8
anyone can help I'm not getting add more items to delete as I put more stuff to not accept someone please help i put the script to put more items
10/08/2010 12:09 pieter#9
its pretty basic SQL :)

for 1 item

WHERE wIndex=1234

for more items

WHERE wIndex=1234 OR wIndex=4321 OR wIndex=4132 OR (wIndex BETWEEN 64989 AND 65000)

to ignore GM chars add

AND character_no NOT IN (select character_no from user_character where character_name like '[GM]%')

its basic programming language

google for a basig TSQL tutorial...
10/08/2010 15:35 draegon71#10
Nice :)