-
[Tutorial] Removing '^' for character creation
Well as some of you already know, Rotana created a way where you can only allow a certain set of characters when creating a new character (restricting alt codes basically).
Please refer to this if you do not already know: http://forum.ragezone.com/f497/tutor...-names-500260/
Some of you also know that it allows a wide range of characters including the character '^' (which allows color usage).
Yes, you're by default not able to use it originally, but there are many dlls out there that can bypass that and create colored name characters.
Rotana only provided the range of 48 through 122. A LOT of people have been asking 'how do i also restrict '^' from characters as well as only allowing 48-122?'
Well it's a simple and minor edit and i'm just showing the not-so-advanced people how to modify it to exclude a certain character.
In the fnCheckString part, instead of doing this:
Code:
IF ASCII(SUBSTRING(@P_String, @V_Position, 1))
BETWEEN 48 AND 122
Replace it with this:
Code:
IF (ASCII(SUBSTRING(@P_String, @V_Position, 1)) >= 48 AND ASCII(SUBSTRING(@P_String, @V_Position, 1)) <= 122 AND ASCII(SUBSTRING(@P_String, @V_Position, 1)) != 94)
That's all. I myself had trouble with this a LOOOOOOOOOOONG time ago but i tried again and it was simple.
Credits to rotana for the original restriction function
-
Re: [Tutorial] Removing '^' for character creation
I thought you could do this by abuse.txt but it would probably need a wildcard or something.
in abuse.txt there is a number then a word that is restricted.
The 1 means chatting restriction words and the 2 means name restriction words. I never tried it but couldn't you put the ^ in there like 2,^ ? well it would probably need a wildcard but I'm not sure.
Great tutorial anyway.
-
Re: [Tutorial] Removing '^' for character creation
Quote:
Originally Posted by
wesman2232
I thought you could do this by abuse.txt but it would probably need a wildcard or something.
in abuse.txt there is a number then a word that is restricted.
The 1 means chatting restriction words and the 2 means name restriction words. I never tried it but couldn't you put the ^ in there like 2,^ ? well it would probably need a wildcard but I'm not sure.
Great tutorial anyway.
The tutorial way is better, since if they open your system.mrs and just empty it it's bypassed.
-
Re: [Tutorial] Removing '^' for character creation
but system.mrs is client sided so it shouldn't show up in the server as actually saying it right? Like the others would see it as ****? If true then it wouldn't matter, like MRS editing its all client sided.
-
Re: [Tutorial] Removing '^' for character creation
Quote:
Originally Posted by
wesman2232
I thought you could do this by abuse.txt but it would probably need a wildcard or something.
in abuse.txt there is a number then a word that is restricted.
The 1 means chatting restriction words and the 2 means name restriction words. I never tried it but couldn't you put the ^ in there like 2,^ ? well it would probably need a wildcard but I'm not sure.
Great tutorial anyway.
Putting ^ and so on blocks it completely, obviously. So, if you were to do ^1-^0 to block them, you can't even use the #'s. Therefore it wouldn't work.
Anyways GJ on this tut Tim. Alot of people needed this (or used to at least)
-
Re: [Tutorial] Removing '^' for character creation
Quote:
Originally Posted by
Nobody666
"Tim"
try "Joey."
-
Re: [Tutorial] Removing '^' for character creation
Good work Timothy mah boi.
Quote:
Originally Posted by
CobraCom
try "Joey."
Joey/Casanova quit Trinity a looooong time ago, Koreans (irl name: Tim) is the new owner.
-
Re: [Tutorial] Removing '^' for character creation
Quote:
Originally Posted by
CobraCom
try "Joey."
Quote:
Originally Posted by
`Styx
Good work Timothy mah boi.
Joey/Casanova quit Trinity a looooong time ago, Koreans (irl name: Tim) is the new owner.
This.
Koreans has always been Tim.
-
Re: [Tutorial] Removing '^' for character creation
Quote:
Originally Posted by
Nobody666
This.
Koreans has always been Tim.
I've been owner a long time on Trinity. Beleive me, I know Joey well enough. I'm not gonna get into the details, you can beleive all you want.
-
Re: [Tutorial] Removing '^' for character creation
Quote:
Originally Posted by
CobraCom
I've been owner a long time on Trinity. Beleive me, I know Joey well enough. I'm not gonna get into the details, you can beleive all you want.
Im not saying you don't know him. But there not using the same files as old TG.
Im just saying, and besides, Tim made this tut, I was just saying good job.
-
Re: [Tutorial] Removing '^' for character creation
Quote:
Originally Posted by
Nobody666
Putting ^ and so on blocks it completely, obviously. So, if you were to do ^1-^0 to block them, you can't even use the #'s. Therefore it wouldn't work.
Anyways GJ on this tut Tim. Alot of people needed this (or used to at least)
that'swhy you put it after 2. the 1 in abuse.txt means text/chat blocked words and the 2 means the name blocked words. So it might work if you put it in 2. then it wouldn't mess up your chat cause you can say god in chat while you can't have it as a name.
-
Re: [Tutorial] Removing '^' for character creation
Thanks, I'll give this a try sometime
-
Re: [Tutorial] Removing '^' for character creation
Set a hook on MMatchServer::OnRequestCreateChar.
-
Re: [Tutorial] Removing '^' for character creation
Quote:
Originally Posted by
Donald Duck
Set a hook on MMatchServer::OnRequestCreateChar.
Why go through all that when you can just edit the create char proc in the db O.o?
-
Re: [Tutorial] Removing '^' for character creation
Quote:
Originally Posted by
ThievingSix
Why go through all that when you can just edit the create char proc in the db O.o?
It's something I personally prefer, because you can do more with it. For example log the one that is creating a character with ^ (and therefore has edited his system.mrs). It depends on your wishes.
Point of that post was to refer people to the function in the MatchServer.
-
Re: [Tutorial] Removing '^' for character creation
Quote:
Originally Posted by
Donald Duck
It's something I personally prefer, because you can do more with it. For example log the one that is creating a character with ^ (and therefore has edited his system.mrs). It depends on your wishes.
Point of that post was to refer people to the function in the MatchServer.
You can log anyone attempting to use the symbol ^ as well via a procedure; you could create an entire new column or table for cheaters attempting to do this, actually.
-
Re: [Tutorial] Removing '^' for character creation
So this blocks ^ entirely, with other ALT codes, or without it?
EDIT: Ok, I think it blocks ^ entirely, without other ALT codes.
-
Re: [Tutorial] Removing '^' for character creation
IF (@Param LIKE '%^%')
BEGIN
SELECT -1
END
-
Re: [Tutorial] Removing '^' for character creation
Quote:
Originally Posted by
gWX0
You can log anyone attempting to use the symbol ^ as well via a procedure; you could create an entire new column or table for cheaters attempting to do this, actually.
I know that, and I thought about posting that in the same post. However, it requires more work than doing a simple fputs to a .txt file. As I stated before, it's just what you want.
-
Re: [Tutorial] Removing '^' for character creation
Quote:
Originally Posted by
Donald Duck
I know that, and I thought about posting that in the same post. However, it requires more work than doing a simple fputs to a .txt file. As I stated before, it's just what you want.
No, it's the exact same amount of work - to modify what Phail posted:
Code:
IF (@Param LIKE '%^%')
BEGIN
INSERT INTO BadUsers VALUES (@ParamName)
END
-
Re: [Tutorial] Removing '^' for character creation
Quote:
Originally Posted by
gWX0
No, it's the exact same amount of work - to modify what Phail posted:
Code:
IF (@Param LIKE '%^%')
BEGIN
INSERT INTO BadUsers VALUES (@ParamName)
END
PHP Code:
if (strstr(Charname, "^")) {
//Do a fputs.
}
-
Re: [Tutorial] Removing '^' for character creation
-
Re: [Tutorial] Removing '^' for character creation
Quote:
Originally Posted by
rickjames01
Bad 1/10
says the moron who bumped a post from like 6 months ago.