gr.setnick...

Damnit, add it :slight_smile: Currently there is no other way then forcing the player to say setnick NAME…>.> Which is a problem. There is a guild triggerhack, so why not a nick name one :slight_smile:

what about

if(playertouchsme){
setplayerprop #n,NICK;
}

??

setplayerprop messagecode,string; sets string properties of the player (except the nickname&guildcode)

.>

He can add it but you’ll need someone to compile it.

Why would you even want to change somebody’s nickname?

Nalin, for quite a few reasons, actually. Again, if I wanted to do a guild system with ranks O.o Or, currently, on my stealth script, I’m changing the players nickname so it is less visible, Savin the old one as a string, then setting it back when they turn off stealth…

It should also override the 10 second thing x.x

___Merged doublepost__________________

Also, if we get into really advanced stuff, you could want to have a check for innapropriate nicknames, and then have it reset it to “Player” if it is bad x.x

if(playerenters && strequals(#n,boobies)){ say2 THAT'S A BAD NAME; setplayerprop #n,Player; }
also imagine gr.setpassword…

No playerenters x.x It would run in a loop…and check…

how does playerenters run a loop?

He probably meant ‘should’ instead of ‘would’.
He also probably meant to make that 2 sentences.
Actually, why use a loop instead of playerchats?

Oh, that’s a good point. If you set the nick-checker on playerchats then that would prevent users from doing “setnick tits’nwhores”

Ugh, why do I even freaking answer…re-read what I said…xD

Anyway, this is what we would have…

if(playerenters){toweapon -nicknamecheck;  setstring server.badnames,Spooon,Benzy,Boobies; timeout=0.05;}
if(timeout){
tokenize2 ,,#s(server.badnames){
if(strcontains(#n,#t(0)) || strcontains(#n,#t(1)) || strcontains(#n,#t(2))){
triggeraction 0,0,gr.setnick,Player,#a;
say2 #i(#3,0,64,32,32): This is a bad name. I#bshouldn't use it...;
}
timeout = 0.05;
}

Or could use a forloop :0 But, I’m not going to try to write one right now because tricxta will tear it up if there are any mistakes x.x

you forgot benjiro

No Benjiro is cool (or I like him, anyway) no matter what anyone says xD

<3 thats what i call friendship :smiley:

// NPC Editted by Onijustin
if(playerenters){
  toweapons -nicknamecheck;
  setstring server.badnames,Tingle,Benzy,Boobies;
}

if(playerchats&&isweapon){
tokenize2 ,,#s(server.badnames);
if(strcontains(#c,setnick #t(0)) || strcontains(#c,setnick #t(1)) || strcontains(#c,setnick #t(2))){
setplayerprop #c,I'M A FAGGET;
}
}

This will prevent people from even setting their nick to whatever.
edit: forgot forloop existed. XD

There is…a forloop x.x
Or I think there is, anyway…

Somethig like for(i=0;i<tokenscount;i++){and then you’d use if it contians #c,#t(i);

[CODE]if(playerenters){
toweapons -nicknamecheck;
setstring server.badnames,Tingle,Benzy,Boobies;
}

if(playerchats&&isweapon){
tokenize2 ,#s(server.badnames);
if(strcontains(#c,setnick #t(0)) || strcontains(#c,setnick #t(1)) || strcontains(#c,setnick #t(2))){
setplayerprop #c,I’M A FAGGET;
}
}[/CODE]

And if somebody says “Don’t say setnick boobies” it’ll reset the nickname xP

[CODE]if(playerenters){
toweapons -nicknamecheck;
setstring server.badnames,Tingle,Benzy,Boobies;
}

if(playerchats){
tokenize2 ,#s(server.badnames);
if(startswith(#c,setnick)){
if(strcontains(#c,#t(0)) || strcontains(#c,#t(1)) || strcontains(#c,#t(2))){
setplayerprop #c,I’M A FAGGET;
}
}
}[/CODE]

That would be better, but first we need gr.setnick! :smiley:

Forgot about forloops. :expressionless:
By the way, your code doesnt seem to work.
And another revision.

[CODE]if(playerenters){
toweapons -nicknamecheck;
setstring server.badnames,Tingle,Benzy,Boobies;
}

if(playerchats&&isweapon){
tokenize2 ,#s(server.badnames);

for(this.whut=0;this.whut<tokenscount;this.whut++){

if(strequals(#c,setnick #t(this.whut))){

setplayerprop #c,I’M A FAGGET;

}
}
}[/CODE]
Preventing it is better than fixing it. (though people would still be able to log in with a foul nickname.)
This way of using gr.setnick wouldn’t make sense any way, since there are many ways to get around the protection.

Hmmm, then I must have a silly mistake anyway…now, the point isn’t writing the code without testing it and showing it on here, it is just another example of how to use it…

And, about being able to log in…that is why I didn’t like your idea of it running off of playerchats… just use a loop :0

Anyway, I really do hope with gets added…

As well as a way to take off a players tag…

So far, when I’ve been trying to unset a players guild tag…

triggeraction 0,0,gr.setguild,#a;

it sets the guild name to (Alex) if your name is alex…

maybe not use #a at the end? (edit:i’ve never really used the gr. commands really.)
either way, what use does this have other than notifying that “he’s jailed!”
or resetting someone’s nickname for some reason?
…still want that reading off of a .txt list feature.
edit: not that that feature would have any use except for libs…