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 12-07-2008, 09:46 PM
Ronnie Ronnie is offline
Registered User
Join Date: Jun 2008
Location: Nj, USA
Posts: 48
Ronnie is on a distinguished road
Send a message via AIM to Ronnie
Removing the guild.

Okay, so I have a function , "getplayers", and in this function I have it remove all the *'s from there nick, But my problem is how would I remove the guilds in there nicks in the list without removing it from there player? and i'm not sure if I can even use substrings on this since I don't know how long the guilds are for each person.

PHP Code:
function getPlayers() {
  
temp.str this.listed;
  
temp.str replacetext(str"*""");
  
newtext str;
  
this.listed newtext
//This works , but now how would I remove the guilds!
  


-Thanks in advance
Ronnie
Reply With Quote
  #2  
Old 12-07-2008, 10:03 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by Ronnie View Post
Okay, so I have a function , "getplayers", and in this function I have it remove all the *'s from there nick, But my problem is how would I remove the guilds in there nicks in the list without removing it from there player? and i'm not sure if I can even use substrings on this since I don't know how long the guilds are for each person.
PHP Code:
temp.string player.nick.substring(0player.nick.pos("(")); 
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #3  
Old 12-07-2008, 10:33 PM
Ronnie Ronnie is offline
Registered User
Join Date: Jun 2008
Location: Nj, USA
Posts: 48
Ronnie is on a distinguished road
Send a message via AIM to Ronnie
How would that work though if I already have the accounts/nicks listed?
Reply With Quote
  #4  
Old 12-07-2008, 10:38 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by Ronnie View Post
How would that work though if I already have the accounts/nicks listed?
You'd have to show an example of what you're talking about.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #5  
Old 12-07-2008, 10:46 PM
Ronnie Ronnie is offline
Registered User
Join Date: Jun 2008
Location: Nj, USA
Posts: 48
Ronnie is on a distinguished road
Send a message via AIM to Ronnie
Well I can't make it refer to those exact players, only the list.

PHP Code:
function onCreated() {
  
this.list = { "ronnie:coolman(Bert)" "Tigairius:Tig(lol)" };
  }

function 
editnicks() {
  
elist this.list.tokenize(":");
  
/*
  elist[1] is now the nicks, how would I remove the guilds from those
  names in that list
 */
 

So i'd have to use elist[1] somehow.
Reply With Quote
  #6  
Old 12-07-2008, 11:24 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
yes, just like player.nick you'd do
PHP Code:
temp.string elist[1].substring(0elist[1].pos("(")); 
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #7  
Old 12-07-2008, 11:45 PM
Ronnie Ronnie is offline
Registered User
Join Date: Jun 2008
Location: Nj, USA
Posts: 48
Ronnie is on a distinguished road
Send a message via AIM to Ronnie
kk , thank u

EDIT:
Actually this didn't work ;/ any other suggestions?

Last edited by Ronnie; 12-08-2008 at 12:06 AM..
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 03:42 PM.


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