Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   player.nick without guild (https://forums.graalonline.com/forums/showthread.php?t=134265053)

Emera 11-19-2011 12:12 PM

player.nick without guild
 
I am going to recode the nicknames on Lexia so it displays their nickname and their guild in a certain way. I want to be able to show their nick but not their Guild with it.

PHP Code:

text player.nick // Then chop off their Guild 

Can I use substring to cut out the players Guild and only show their nickname?

Crow 11-19-2011 01:06 PM

PHP Code:

temp.nick player.nick.substring(0player.nick.pos("(")).trim(); 

Should do the trick.

ffcmike 11-19-2011 01:13 PM

Quote:

Originally Posted by Crow (Post 1674635)
PHP Code:

temp.nick player.nick.substring(0player.nick.pos("(")).trim(); 

Should do the trick.

This would be a problem if someone used "(" in their actual name, it would probably be better to do:

PHP Code:

temp.nick player.nick.substring(0player.nick.pos("(" player.guild ")")).trim(); 


Emera 11-19-2011 01:33 PM

Thanks for the help!

Crow 11-19-2011 03:09 PM

Quote:

Originally Posted by ffcmike (Post 1674636)
This would be a problem if someone used "(" in their actual name, it would probably be better to do:

I thought that was impossible?

Edit: Confirmed. It is impossible to use "(" in your name without it being related to guilds.

ffcmike 11-19-2011 03:18 PM

Quote:

Originally Posted by Crow (Post 1674644)
I thought that was impossible?

Edit: Confirmed. It is impossible to use "(" in your name without it being related to guilds.

Odd, I'm sure it was possible at some point, maybe a fix was added.

Crow 11-19-2011 04:13 PM

Quote:

Originally Posted by ffcmike (Post 1674645)
Odd, I'm sure it was possible at some point, maybe a fix was added.

Must've been a long time ago. I remember wanting to do this "back then" when I just started playing, maybe a couple months in. And that was 2003.

xXziroXx 11-20-2011 03:06 PM

Quote:

Originally Posted by ffcmike (Post 1674645)
Odd, I'm sure it was possible at some point, maybe a fix was added.

Haven't been able to use "(" in your nick since 2000 at least, but I think you can use ")".

Emera 11-20-2011 04:46 PM

Quote:

Originally Posted by xXziroXx (Post 1674782)
Haven't been able to use "(" in your nick since 2000 at least, but I think you can use ")".

Checked. You can't use "(" but you can still use ")"
Thanks for this.

xAndrewx 11-20-2011 04:59 PM

i had a problem on iEra, I used this
player.nick = player.nick.substring(0, player.nick.pos(player.guild));

ffcmike 11-20-2011 05:07 PM

Quote:

Originally Posted by xAndrewx (Post 1674791)
i had a problem on iEra, I used this
player.nick = player.nick.substring(0, player.nick.pos(player.guild));

Wouldn't this be a problem if a players nickname contained their guild name? :p

setnick VIP (VIP)

etc

xAndrewx 11-20-2011 11:10 PM

fine u win xxxx

epic fayul haha

Hezzy002 11-21-2011 02:46 AM

Quote:

Originally Posted by xAndrewx (Post 1674832)
fine u win xxxx

epic fayul haha

Sums up iEra in general pretty well, right down to the style of language.

Gunderak 11-21-2011 09:56 AM

Quote:

Originally Posted by Hezzy002 (Post 1674879)
Sums up iEra in general pretty well, right down to the style of language.

I'd have to agree with you there.

xAndrewx 11-21-2011 11:04 PM

ya ikr. graal ghetto got that cool new gs1 amirite


All times are GMT +2. The time now is 01:18 PM.

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