Jump to content
  • 0

Help about antigm-name script


realRO

Question


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  84
  • Reputation:   0
  • Joined:  12/24/13
  • Last Seen:  

Can someone help me to revise this script?

The problem is, when people try to make name with G and M chronological, they got blocked instantly.

 

example: 

 

1. Character creates a name like: "Bag Man"

The script reads their character name with G M <<< "Bag Man" and automatically blocks them.

How to fix this? Thanks

 

Here's my script:

-	script	gmrenamer	-,{
     
    OnPCLoginEvent:
    set .nickname$,strcharinfo(0);
    setarray .banned$[0],"GM","[GM]","Admin","G M","[Admin]","A dmin";
    set .bannedamt,getarraysize(.banned$);
            if(getgmlevel() > 0) {
                    if(compare(.nickname$,"[GM] ") == 0) {
                    query_sql("UPDATE `char` SET name='[GM] "+.nickname$+"' WHERE name='"+.nickname$+"'");
                    mes "You have to relog to update your nickname to have ^FF0000[GM]^000000 tag";
                    }
            } else {
                    for(set .a,0; .a < .bannedamt; set .a,.a+1) {
                            if(compare(.nickname$,.banned$[.a]) == 1) {
                            atcommand "@block "+.nickname$+"";
                            }
                    }
            }
            end;
     
}
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

i think you can try something like this.

https://pastebin.com/Dc0GC7fB

 

use strpos to find the position of the tag you mentioned.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  84
  • Reputation:   0
  • Joined:  12/24/13
  • Last Seen:  

i think you can try something like this.

https://pastebin.com/Dc0GC7fB

use strpos to find the position of the tag you mentioned.

Thanks but i have a problem.

I tried this, but i think line 25-26 is not working.

I tried making a char using group lvl 99, [GM] tag doesn't show. hmmm

Someone help me? :) Thanks! Bump!

Edited by Emistry
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...