Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Removing the guild. (https://forums.graalonline.com/forums/showthread.php?t=83054)

Ronnie 12-07-2008 09:46 PM

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

Tigairius 12-07-2008 10:03 PM

Quote:

Originally Posted by Ronnie (Post 1447593)
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("(")); 


Ronnie 12-07-2008 10:33 PM

How would that work though if I already have the accounts/nicks listed?

Tigairius 12-07-2008 10:38 PM

Quote:

Originally Posted by Ronnie (Post 1447600)
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.

Ronnie 12-07-2008 10:46 PM

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.

Tigairius 12-07-2008 11:24 PM

yes, just like player.nick you'd do
PHP Code:

temp.string elist[1].substring(0elist[1].pos("(")); 


Ronnie 12-07-2008 11:45 PM

kk , thank u

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


All times are GMT +2. The time now is 09:17 AM.

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