Sparks Posted October 10, 2013 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 50 Reputation: 0 Joined: 09/05/13 Last Seen: December 4, 2014 Share Posted October 10, 2013 hmmm .. Normal Account creating a GM named character like GM Test , Admin Test and so on = auto ban .. when he create a GM named character and he connects in game in a few second he will be disconnected and when he login again his account will be banned .. Quote Link to comment Share on other sites More sharing options...
Emistry Posted October 11, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 1 hour ago Share Posted October 11, 2013 OnPCLoginEvent: if( !getgmlevel() && compare( strcharinfo(0),"GM " ) ){ mes "You cant use 'GM' in your name."; sleep2 3000; atcommand "@ban "+strcharinfo(0); } end; try this Quote Link to comment Share on other sites More sharing options...
Sparks Posted October 11, 2013 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 50 Reputation: 0 Joined: 09/05/13 Last Seen: December 4, 2014 Author Share Posted October 11, 2013 its not working si emistry .. hmm .. i want this way .. if you create GM named character at 1st it can connect in game but in a few second you will get disconnected and when you logged in again your account will be banned automatically Quote Link to comment Share on other sites More sharing options...
Patskie Posted October 11, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 11 hours ago Share Posted October 11, 2013 Try : - script Sample -1,{ OnPCLoginEvent: if ( !getgmlevel() && compare(strcharinfo(0), "GM ") ) { mes "You can't use GM in your name."; sleep2 3000; atcommand "@block " +strcharinfo(0); } end; } Quote Link to comment Share on other sites More sharing options...
Capuche Posted October 12, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted October 12, 2013 - script Sample -1,{ OnPCLoginEvent: if ( !getgmlevel() && compare(strcharinfo(0), "GM ") ) { if ( getd( ".account_"+ getcharid(3) ) )// 2nd log -> ban atcommand "@ban " + strcharinfo(0); else { setd ".account_"+ getcharid(3), 1; mes "You can't use GM in your name."; sleep2 3000; atcommand "@kick " +strcharinfo(0); } } end; } Quote Link to comment Share on other sites More sharing options...
Sparks Posted October 21, 2013 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 50 Reputation: 0 Joined: 09/05/13 Last Seen: December 4, 2014 Author Share Posted October 21, 2013 how will it work ? because i try to load that script but it doesnt work .. ive tried to create a character with GM on it but it didnt get banned Quote Link to comment Share on other sites More sharing options...
Euphy Posted October 21, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted October 21, 2013 OnPCLoginEvent: // Check activates when you log in !getgmlevel() // Will only run for non-GM accounts Quote Link to comment Share on other sites More sharing options...
Sparks Posted October 22, 2013 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 50 Reputation: 0 Joined: 09/05/13 Last Seen: December 4, 2014 Author Share Posted October 22, 2013 still not working Quote Link to comment Share on other sites More sharing options...
Capuche Posted October 22, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted October 22, 2013 This script ban a player with "GM " in the name. Not "GM", "GM " with a space. Change it at your content. Quote Link to comment Share on other sites More sharing options...
Sparks Posted October 23, 2013 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 50 Reputation: 0 Joined: 09/05/13 Last Seen: December 4, 2014 Author Share Posted October 23, 2013 i used it as default only "GM " but when i create a character "GM Stark" it didnt get ban Quote Link to comment Share on other sites More sharing options...
chriser Posted October 23, 2013 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 94 Reputation: 4 Joined: 01/29/13 Last Seen: August 11, 2020 Share Posted October 23, 2013 (edited) http://rathena.org/wiki/Compare Edit: The documentation is really confusing. The examples tells when compare is true that the substring was found, false otherwise, but the documentation tells the opposite... got fixed in the wiki Edited October 24, 2013 by chriser Quote Link to comment Share on other sites More sharing options...
Capuche Posted October 23, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted October 23, 2013 the example was right, compare return true if the substring is in the main string @Sparks from my test this script seems working... weird Quote Link to comment Share on other sites More sharing options...
Sparks Posted October 23, 2013 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 50 Reputation: 0 Joined: 09/05/13 Last Seen: December 4, 2014 Author Share Posted October 23, 2013 the example was right, compare return true if the substring is in the main string @Sparks from my test this script seems working... weird when i put it on so i need to @loadnpc npc/blah/blah/blah/ban.txt then now scripts is loaded when i create a GM named character on my normal account it doesnt do anything .. the acc did not get ban .. Quote Link to comment Share on other sites More sharing options...
Patskie Posted October 23, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 11 hours ago Share Posted October 23, 2013 Any error on your console? It works on my test server Quote Link to comment Share on other sites More sharing options...
Light Posted October 24, 2013 Group: Members Topic Count: 21 Topics Per Day: 0.00 Content Count: 49 Reputation: 1 Joined: 12/09/12 Last Seen: December 10, 2016 Share Posted October 24, 2013 Yeah it's working on my server too. Quote Link to comment Share on other sites More sharing options...
Question
Sparks
hmmm ..
Normal Account creating a GM named character like GM Test , Admin Test and so on = auto ban ..
when he create a GM named character and he connects in game in a few second he will be disconnected and when he login again his account will be banned ..
Link to comment
Share on other sites
14 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.