Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-19-2011, 12:12 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
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?
__________________
Reply With Quote
  #2  
Old 11-19-2011, 01:06 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
PHP Code:
temp.nick player.nick.substring(0player.nick.pos("(")).trim(); 
Should do the trick.
__________________
Reply With Quote
  #3  
Old 11-19-2011, 01:13 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by Crow View Post
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(); 
Reply With Quote
  #4  
Old 11-19-2011, 01:33 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Thanks for the help!
__________________
Reply With Quote
  #5  
Old 11-19-2011, 03:09 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by ffcmike View Post
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.
__________________
Reply With Quote
  #6  
Old 11-19-2011, 03:18 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by Crow View Post
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.
Reply With Quote
  #7  
Old 11-19-2011, 04:13 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by ffcmike View Post
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.
__________________
Reply With Quote
  #8  
Old 11-20-2011, 03:06 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by ffcmike View Post
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 ")".
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #9  
Old 11-20-2011, 04:46 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by xXziroXx View Post
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.
__________________
Reply With Quote
  #10  
Old 11-20-2011, 04:59 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
i had a problem on iEra, I used this
player.nick = player.nick.substring(0, player.nick.pos(player.guild));
__________________
Reply With Quote
  #11  
Old 11-20-2011, 05:07 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by xAndrewx View Post
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?

setnick VIP (VIP)

etc
Reply With Quote
  #12  
Old 11-20-2011, 11:10 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
fine u win xxxx

epic fayul haha
__________________
Reply With Quote
  #13  
Old 11-21-2011, 02:46 AM
Hezzy002 Hezzy002 is offline
Registered User
Join Date: Jul 2011
Posts: 247
Hezzy002 is a jewel in the roughHezzy002 is a jewel in the rough
Quote:
Originally Posted by xAndrewx View Post
fine u win xxxx

epic fayul haha
Sums up iEra in general pretty well, right down to the style of language.
Reply With Quote
  #14  
Old 11-21-2011, 09:56 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Quote:
Originally Posted by Hezzy002 View Post
Sums up iEra in general pretty well, right down to the style of language.
I'd have to agree with you there.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #15  
Old 11-21-2011, 11:04 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
ya ikr. graal ghetto got that cool new gs1 amirite
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:34 PM.


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