[RELEASE] Ban by CharName SQL script

09/12/2011 00:50 BodySalvage#1
I'm releasing this to assist those having issues with the ban chat trigger not functioning. Its a simple script but infinitely useful on several scales. With this you can ban or unban accounts simply by inputting your desired Status and the CharName of the player in question. This includes ingoring the return on deleted toons as well. Check it out.

Code:
UPDATE [PS_UserData].[dbo].[Users_Master]
  SET [Status] = 'NewStatus'
  WHERE UserUID = (SELECT UserUID
                   FROM [PS_GameData].[dbo].[Chars]
                   WHERE Del  = 0 and CharName = 'CharacterName')
And with simple additions you can globally ban an IP listed for the registration of that account with this.

Code:
UPDATE [PS_UserData].[dbo].[Users_Master]
  SET [Status] = 'NewStatus'
  WHERE UserIp = (SELECT UserIp
                 FROM [PS_UserData].[dbo].[Users_Master]  
                 WHERE UserUID = (SELECT UserUID
                                 FROM [PS_GameData].[dbo].[Chars]
                                 WHERE Del = 0 and CharName = 'CharacterName'))
I know you can easily change your IP but this would aid in removing all accounts created at the IP of the player which can help some people.

For nubs like me, all you do is change NewStatus and CharacterName to the desired values and execute.
09/12/2011 10:11 Xx.LaMin.xX#2
Just want to give list of the status you can change :)

Quote:
‒-1 - Connection with server has been disconnected.
‒-2 - Can't connect with the account since it's not selected as free challenger.
‒-3 - Account doesn't exit.
‒-4 - ID in process of termination following user's request.
‒-5 - Your account is blocked now. You can't log into the game.
‒-6 - Your account is blocked now. You can't log into the game.
‒-7 - Account still restricted.
‒-8 - Connection with server has been disconnected.
‒-9 - Your account is blocked now. You can't log into the game.
‒-10 - Account still restricted.
‒-11 - Account still restricted.
‒-12 - ID in process of termination following user's request.
‒-13 - Your account is blocked now. You can't log into the game.
‒-14 - Your account is blocked now. You can't log into the game.
‒-15 - Account still restricted.
‒-16 - ID in process of termination following user's request.
‒0 - Normal account
‒1 - Stop (Can't connect to the game following user's request.)
‒2 - Block (Game) (Account doesn't exit.)
‒4 - Block (Web) (Account doesn't exit.)
‒6 - Block (Game + Web) (Your account is blocked now. You can't log into the game.)
‒8 - Block (Character)
‒9 - Account still restricted.[/COLOR]
‒16 - GM permissions 1 – GM with full Operator's permissions
‒32 - GM permissions 2 – GM with less permissions than 16
‒48 - GM permissions 3 – GM with less permissions than 32
‒64 - GM permissions 4 – GM with less permissions than 48
‒80 - GM permissions 5 – GM with least Operator powers
‒128 - Withdrawal
‒256 - Withdrawal (3 days processing)
‒512 – Withdrawal 15 days
‒17~81 - GM + stop


"Credits go to me and SDG Team"
09/12/2011 13:03 viper4513#3
Hey Lamin, i know all about the Status and everything already, but do you perhaps know the exact "rights" each level of GM has?

I mean, it must be noted down somewhere in the game files.. i just havnt been able to find it atall yet xD
09/12/2011 14:42 zargon05#4
Try using JOINS instead of Subqueries, It will make the processing better.
09/12/2011 19:57 Xx.LaMin.xX#5
Hey viper i havnt found anything like you said.. yea must be noted down on somewhere. anyways you can change your status and test the FULL GM stuffs? that way you will know i guess xD
09/12/2011 21:28 viper4513#6
Already tried it.. could only work out a few differences in the 80 admin status.. like they cant do any /getitem /mmake /nmake and so on..

Guess it will be a thing for me to test out and see what the differences between them all actually is.
09/12/2011 23:24 [Admin]Snuggle#7
I'm not sure if you realize this or not but this script has already been released by Ariez in his SQL scripts and maybe others o.O
Not sure too lazy to search :P
09/12/2011 23:51 -III-#8
Quote:
Originally Posted by viper4513 View Post
Already tried it.. could only work out a few differences in the 80 admin status.. like they cant do any /getitem /mmake /nmake and so on..

Guess it will be a thing for me to test out and see what the differences between them all actually is.
[Only registered and activated users can see links. Click Here To Register...]

Prof updated this quite some time ago. One of the updates includes a full break down of what commands are available for each status.
09/13/2011 08:55 viper4513#9
Ahh thank you very much for that III, i had the older version that didnt show that :P Silly me.
09/13/2011 09:44 Xx.LaMin.xX#10
III, that is what i posted on here xD
09/13/2011 11:36 viper4513#11
@LaMin He aimed his message at me, the info you posted was in that guide.. but the info i was asking for wasnt in the older version of that guide. He posted saying Pro updated his guide, with the new information (about the difference of GM status)
09/13/2011 12:53 Xx.LaMin.xX#12
oh oh.. my bad then :P, sorry