Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Changing Players Nick? (https://forums.graalonline.com/forums/showthread.php?t=30057)

Frolic_RC2 05-26-2002 03:43 AM

Changing Players Nick?
 
How do I change the players nick using script?

Spanko 05-26-2002 04:19 AM

Well if you have an NPC-Server it's a simple case of just making a serverside part set the nickname, like this system example:

NPC Code:
if (actionserverside)
setplayerprop #n,#s(clientr.nickname);
//#CLIENTSIDE
if (created||timeout) {
if (!(strequals(#n,#s(clientr.nickname)))
triggeraction x,y,serverside,;
timeout=0.05;
}


If you aren't going to have an NPC-Server it's trickier, but can apparently be done by setting the players chat to "setnick nickname"

Both examples don't work offline though, anyway basically with NPC-Server any serverside NPcs can change players nicknames using setplayerprop #n. Without the same affect can be achieved by setting a players chat to 'setnick nickname'

Frolic_RC2 05-26-2002 05:50 AM

Quote:

Originally posted by Spanko
Well if you have an NPC-Server it's a simple case of just making a serverside part set the nickname, like this system example:

NPC Code:
if (actionserverside)
setplayerprop #n,#s(clientr.nickname);
//#CLIENTSIDE
if (created||timeout) {
if (!(strequals(#n,#s(clientr.nickname)))
triggeraction x,y,serverside,;
timeout=0.05;
}


If you aren't going to have an NPC-Server it's trickier, but can apparently be done by setting the players chat to "setnick nickname"

Both examples don't work offline though, anyway basically with NPC-Server any serverside NPcs can change players nicknames using setplayerprop #n. Without the same affect can be achieved by setting a players chat to 'setnick nickname'

Ahh excellent. Thank you very much =).

adam 05-26-2002 08:04 AM

Quote:

Originally posted by Spanko
Well if you have an NPC-Server it's a simple case of just making a serverside part set the nickname, like this system example:

NPC Code:
if (actionserverside)
setplayerprop #n,#s(clientr.nickname);
//#CLIENTSIDE
if (created||timeout) {
if (!(strequals(#n,#s(clientr.nickname)))
triggeraction x,y,serverside,;
timeout=0.05;
}


If you aren't going to have an NPC-Server it's trickier, but can apparently be done by setting the players chat to "setnick nickname"

Both examples don't work offline though, anyway basically with NPC-Server any serverside NPcs can change players nicknames using setplayerprop #n. Without the same affect can be achieved by setting a players chat to 'setnick nickname'


Yes on non npc server servers you can change stuff by changeing thier chat text. =) Fun fun. just need a system npc and a server string.

Projectshifter 05-28-2002 08:20 PM

LOL. I would venture to say that if (playertouchsme) setplayerprop #n,NICK; is much easier than what you had done, lol. Or Setplayerprop #c,setnick NICK;
---Shifter

Saga2001 05-28-2002 09:54 PM

Quote:

Originally posted by Kaimetsu


The former doesn't work on any servers and the latter looks horrible and unprofessional.

Very true. What Grim had was probably best fitting for the situation.

adam 05-29-2002 12:26 AM

Quote:

Originally posted by Saga2001


Very true. What Grim had was probably best fitting for the situation.

:D I was such a menace on doomsday

Projectshifter 05-29-2002 10:49 AM

Yes, but for scripters that don't have a clue what things are, something that is horrible and unprofessional would work better than nothing at all. Why give less advanced scripters items in which they are incapable of editing or understanding? Why not teach rather than hand out? Just a thought, heh.
---Shifter

Poogle 05-31-2002 01:00 AM

Re: Changing Players Nick?
 
Quote:

Originally posted by Frolic_RC2
How do I change the players nick using script?
if (playerenters) {setplayerprop #c,setnick SCREW ME!}

BBflat 05-31-2002 11:59 PM

Re: Re: Changing Players Nick?
 
Quote:

Originally posted by Poogle

if (playerenters) {setplayerprop #c,setnick SCREW ME!}

Well, we decided that looked extremelt unprofessional, but what about this?

NPC Code:

if (playerenters)
{
setstring this.chat,#c;
setplayerprop #c,setnick BBflat;
setplayerprop #c,#s(this.chat);
}



There is probably a problem somewhere in there... It's still unprofessional, but not quite as much.

BBflat 06-01-2002 08:54 AM

Re: Re: Re: Re: Changing Players Nick?
 
Quote:

Originally posted by Kaimetsu


What's the point when a better system has already been highlighted?

Um. I thought that only worked with NPC Servers though...

Spanko 06-03-2002 05:40 PM

Re: Re: Re: Re: Re: Changing Players Nick?
 
Quote:

Originally posted by BBflat

Um. I thought that only worked with NPC Servers though...

I know for a fact that Soul Blade's playerworld is going to have an NPC-Server, though I did point out the alternative in my post.


All times are GMT +2. The time now is 02:21 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.