[Tutorial] Removing '^' for character creation

Results 1 to 23 of 23
  1. #1
    Member Koreans is offline
    MemberRank
    Sep 2008 Join Date
    50Posts

    [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


  2. #2
    DRGunZ 2 Creator wesman2232 is offline
    MemberRank
    Jan 2007 Join Date
    Erie, PALocation
    4,872Posts

    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.

  3. #3
    RestyleGamerZ FTW Mambo is offline
    MemberRank
    Mar 2008 Join Date
    The NetherlandsLocation
    821Posts

    Re: [Tutorial] Removing '^' for character creation

    Quote Originally Posted by wesman2232 View Post
    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.

  4. #4
    DRGunZ 2 Creator wesman2232 is offline
    MemberRank
    Jan 2007 Join Date
    Erie, PALocation
    4,872Posts

    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.

  5. #5
    (。◕‿‿◕。) Nobody666 is offline
    MemberRank
    Oct 2008 Join Date
    1,773Posts

    Re: [Tutorial] Removing '^' for character creation

    Quote Originally Posted by wesman2232 View Post
    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)

  6. #6
    Account Upgraded | Title Enabled! CobraCom is offline
    MemberRank
    Jul 2008 Join Date
    382Posts

    Re: [Tutorial] Removing '^' for character creation

    Quote Originally Posted by Nobody666 View Post
    "Tim"
    try "Joey."

  7. #7
     `Styx is offline
    MemberRank
    Dec 2007 Join Date
    Philadelphia PALocation
    727Posts

    Re: [Tutorial] Removing '^' for character creation

    Good work Timothy mah boi.

    Quote Originally Posted by CobraCom View Post
    try "Joey."
    Joey/Casanova quit Trinity a looooong time ago, Koreans (irl name: Tim) is the new owner.

  8. #8
    (。◕‿‿◕。) Nobody666 is offline
    MemberRank
    Oct 2008 Join Date
    1,773Posts

    Re: [Tutorial] Removing '^' for character creation

    Quote Originally Posted by CobraCom View Post
    try "Joey."
    Quote Originally Posted by `Styx View Post
    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.

  9. #9
    Account Upgraded | Title Enabled! CobraCom is offline
    MemberRank
    Jul 2008 Join Date
    382Posts

    Re: [Tutorial] Removing '^' for character creation

    Quote Originally Posted by Nobody666 View Post
    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.

  10. #10
    (。◕‿‿◕。) Nobody666 is offline
    MemberRank
    Oct 2008 Join Date
    1,773Posts

    Re: [Tutorial] Removing '^' for character creation

    Quote Originally Posted by CobraCom View Post
    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.

  11. #11
    DRGunZ 2 Creator wesman2232 is offline
    MemberRank
    Jan 2007 Join Date
    Erie, PALocation
    4,872Posts

    Re: [Tutorial] Removing '^' for character creation

    Quote Originally Posted by Nobody666 View Post
    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.

  12. #12
    Account Upgraded | Title Enabled! Creativity is offline
    MemberRank
    Feb 2009 Join Date
    127.0.0.1Location
    492Posts

    Re: [Tutorial] Removing '^' for character creation

    Thanks, I'll give this a try sometime

  13. #13
    Member Donald Duck is offline
    MemberRank
    Jun 2009 Join Date
    USA.Location
    95Posts

    Re: [Tutorial] Removing '^' for character creation

    Set a hook on MMatchServer::OnRequestCreateChar.

  14. #14
    Reverse Engineer ThievingSix is offline
    MemberRank
    Mar 2007 Join Date
    CaliforniaLocation
    901Posts

    Re: [Tutorial] Removing '^' for character creation

    Quote Originally Posted by Donald Duck View Post
    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?

  15. #15
    Member Donald Duck is offline
    MemberRank
    Jun 2009 Join Date
    USA.Location
    95Posts

    Re: [Tutorial] Removing '^' for character creation

    Quote Originally Posted by ThievingSix View Post
    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.

  16. #16
    Account Upgraded | Title Enabled! Guy is offline
    MemberRank
    Apr 2009 Join Date
    919Posts

    Re: [Tutorial] Removing '^' for character creation

    Quote Originally Posted by Donald Duck View Post
    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.

  17. #17

    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.

  18. #18
    Mako is insane. ThePhailure772 is offline
    MemberRank
    Sep 2007 Join Date
    1,115Posts

    Re: [Tutorial] Removing '^' for character creation

    IF (@Param LIKE '%^%')
    BEGIN
    SELECT -1
    END

  19. #19
    Member Donald Duck is offline
    MemberRank
    Jun 2009 Join Date
    USA.Location
    95Posts

    Re: [Tutorial] Removing '^' for character creation

    Quote Originally Posted by gWX0 View Post
    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.

  20. #20
    Account Upgraded | Title Enabled! Guy is offline
    MemberRank
    Apr 2009 Join Date
    919Posts

    Re: [Tutorial] Removing '^' for character creation

    Quote Originally Posted by Donald Duck View Post
    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

  21. #21
    Member Donald Duck is offline
    MemberRank
    Jun 2009 Join Date
    USA.Location
    95Posts

    Re: [Tutorial] Removing '^' for character creation

    Quote Originally Posted by gWX0 View Post
    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.


  22. #22
    Member rickjames01 is offline
    MemberRank
    Apr 2009 Join Date
    71Posts

    Re: [Tutorial] Removing '^' for character creation

    Bad 1/10

  23. #23
    人◕ ‿‿ ◕人 Forean is offline
    MemberRank
    Jul 2008 Join Date
    1,183Posts

    Re: [Tutorial] Removing '^' for character creation

    Quote Originally Posted by rickjames01 View Post
    Bad 1/10

    says the moron who bumped a post from like 6 months ago.



Advertisement