Jump to content

Question

Posted

Hello

 

I would like to limit charcter names but I don't know how to do that.

Rules:

-min 3 chars

-no !@#$%^&*()_.<>:; and stuff like that

-no other custom stuff just the alphanumeric

 

Here is my procedure:

SET @char_name = RTRIM(@char_name)  
DECLARE @char_id int  
SET @char_id = 0  
  
-- debug code delete in commercial  
IF (GETDATE() < '2004-1-1')  
 SET @builder = 1  
  
IF @char_name LIKE N' '   
BEGIN  
 RAISERROR ('Character name has space : name = [%s]', 16, 1, @char_name)  
 RETURN -1  
END  
  
-- check user_prohibit   
if exists(select char_name from user_prohibit (nolock) where char_name = @char_name)  
begin  
 RAISERROR ('Character name is prohibited: name = [%s]', 16, 1, @char_name)  
 RETURN -1   
end  
  
declare @user_prohibit_word nvarchar(20)  
select top 1 @user_prohibit_word = words from user_prohibit_word (nolock) where PATINDEX('%' + words + '%', @char_name) > 0   
if @user_prohibit_word is not null  
begin  
 RAISERROR ('Character name has prohibited word: name = [%s], word[%s]', 16, 1, @char_name, @user_prohibit_word)  
 RETURN -1   
end  
  
-- check reserved name  
declare @reserved_name nvarchar(50)  
declare @reserved_account_id int  
select top 1 @reserved_name = char_name, @reserved_account_id = account_id from user_name_reserved (nolock) where used = 0 and char_name = @char_name  
if not @reserved_name is null  
begin  
 if not @reserved_account_id = @account_id  
 begin  
  RAISERROR ('Character name is reserved by other player: name = [%s]', 16, 1, @char_name)  
  RETURN -1  
 end  
end  

sorry for my bad english, I hope you understand me

2 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.


  • Posts

    • For exact same reason - there were accusation that I scammed. When was it? 2016? But in that time, admins actually didn't listen. I got banned, then unbaned (when I prooved I've refunded) but I was trash talking to mods. When few months later same shit happened, Grisom (?) old global mod, banned me anyway. You can read somewhere on forum how I was shitting on him for doing that (from other account because original account was banned) - which was banned too. He is not here anymore I think. Back in the days I was well know for not carring that much if I was talking to mod or admin, I didn't hold my tongue. Now You know. Just like You know - if I delay, I deliver or refund. I'm not a scammer, even if my old time haterz love to repeat themselfs like mantra. I don't care.
    • Okay I respect that but why is your other account banned?   I don't think this happened just because you delayed somebodys work even in 2012
    • Do You understand the fact, I won't scam anyone? Can You grasp such idea?  Second of all, if a random restaurant on Google Maps has 599 positive reviews and few negative ones with 4,8* score, do You ask Google to block it's profile and burn the place down? No? Then why the fuck You are crying about my random delays? If someone can't get a CUSTOM DESIGN on time, I refund. I'm not 16  y.o. anymore. I don't make living out of this L2 bullshit. Never did. Since 2012 I've made shit tons of projects. How many delays did I have? 12? 15? Out of hundrets of projects. Calm Your tits please. If I would actually take 4k euro and NOT deliver and NOT refund - admins can ban me. So don't compare me to Simple. And just so You know, Celestine sent me customers, so it's not like I've worked with him on his account all the time. That's another thing You won't understand. I won't waste anymore time on You and any other cunt who never was my customer but is bitching just because he has nothing better to do in his life. You don't like my work? Hove along, I don't give a shit. 
    • So he's like unsimple you would say? Cherry picking who's getting scammed.   Deliver 5 projects, don't deliver/delay the other 2 projects. Of course he won't scam you because he know what's gonna happen after since he's dealing with the admin himself.
  • Topics

×
×
  • Create New...