Sparks Posted October 10, 2013 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
Emistry Posted October 11, 2013 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
Sparks Posted October 11, 2013 Author 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
Patskie Posted October 11, 2013 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
Capuche Posted October 12, 2013 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
Sparks Posted October 21, 2013 Author 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
Euphy Posted October 21, 2013 Posted October 21, 2013 OnPCLoginEvent: // Check activates when you log in !getgmlevel() // Will only run for non-GM accounts Quote
Capuche Posted October 22, 2013 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
Sparks Posted October 23, 2013 Author Posted October 23, 2013 i used it as default only "GM " but when i create a character "GM Stark" it didnt get ban Quote
chriser Posted October 23, 2013 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
Capuche Posted October 23, 2013 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
Sparks Posted October 23, 2013 Author 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
Patskie Posted October 23, 2013 Posted October 23, 2013 Any error on your console? It works on my test server Quote
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 ..
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.