This will stop all GM, DEKARON, and DEV characters from being created 100%. It will also filter the use of illegal characters in player names. There are a few anti-GM scripts and procedures floating around. But this is the proper way to fix the problem.
STEP 1: Create a table for the illegal name wildcards.
CREATE TABLE illegal_character_names (partial_name varchar(30))
STEP 2: Create a function to check the names.
CREATE FUNCTION NameBlock(@character_name varchar(40))
RETURNS tinyint
AS
BEGIN
DECLARE @result tinyint, @x int
SET @result = 1
SET @x = 1
-- Check if name contains illegal characters
WHILE (@x <= LEN(@character_name))
BEGIN
IF (SUBSTRING (@character_name, @x, 1) NOT LIKE '[0123456789a-z]')
RETURN @result
SET @x = @x + 1
END
-- Then check to make sure it's not in our table
SELECT @result = CASE WHEN COUNT(*) = 0 THEN 0 ELSE 1 END FROM illegal_character_names WHERE @character_name LIKE partial_name
RETURN @result
END
STEP 3: Insert illegal name wildcards into our table.
INSERT INTO illegal_character_names VALUES('%shit%')
INSERT INTO illegal_character_names VALUES('%nigg%')
INSERT INTO illegal_character_names VALUES('%wank%')
INSERT INTO illegal_character_names VALUES('%whore%')
STEP 4: Add the check into your SP_CHAR_CREATE stored procedure.
IF (dbo.NameBlock(@character_name) = 1)
BEGIN
SET @sp_rtn = -12
RETURN
END
Where do i add the check exactly? At the top of the script right under all the variable declarations. You will see the old procedure (which is broken). Just replace it with the one in STEP 4.
-- 캐릭터명 체크 (중복체크 / 필터링체크)
EXEC sp_char_name_check @character_name, @v_ret OUTPUT
IF @v_ret < 0 -- 캐릭터명 오류
BEGIN
SET @sp_rtn = @v_ret
RETURN
END
-- 캐릭터구분 Parsing
Credits goes to warmonger for this