|
Corleidum Novice
Joined: 30 Apr 2003 Posts: 43 Location: Sweden
|
Posted: Sat May 15, 2004 4:26 am
Var search/add |
A question. Are there a way to search the vars in a folder?
Like I have a folder named chars..and the vars are i.e:
Char1
char2
char3
char4
and so on..
Now, This is an character publisher. Meaning I want to be able to type:
addchar Thepersonschar Thepersosnsotherchar etc.
Ok, now I want it to automatically add the names to the last vars NUMBER in this case char4
so it will make a variable with the name char5 and with the Thepersonchar Thepersonsotherchar etc in it.
Ok that's the first thing.. Second thing
I want to be able to type
'char xxx' and it will search all the charX in the folder chars for the person I am searching for. When it finds it, I want it to display
it. Ex
var3 Corleidum Otherchar Morechar lastchar
AND
One final thing if possible, any possible way to add a name to an already existing var? THOUGH!!!! It has to search for the var.
So if I type addchar corleidum NEWCHAR
It will search for the var where corleidum is in it, and add newchar.
If this is not possible, any easy way to make a charfinder?
Where it adds peoples chars when I type addchar xxx xx xx xxx xx
and then when i type charinfo xxx it will find the person and display all of his chars? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat May 15, 2004 8:03 am |
#AL addchar {#IF %iskey( @char, %1) {#ADDI char.%1 {%2}} {#ADDK char {%1} {%2}}}
#AL showalts {#IF %iskey( @char, %1) {#SAY %1 %expandlist( %db( @char, %1), ", ")}}
Usage:
addchar primaryname altname
showalts primaryname
Personally I do my best not to let anyone know who my alts are or even whether I have any. It only makes it more difficult to play them as separate characters. I also make no effort to track other people's alts. If they are good friends, and I happen to learn their alts, I won't have any difficulty remembering. If they aren't, there isn't any reason for me to care. |
|
|
|
Corleidum Novice
Joined: 30 Apr 2003 Posts: 43 Location: Sweden
|
Posted: Mon May 17, 2004 8:30 am |
well for me it's really good to know who people alts are. Anyways. The thing you gave me only works if you make a find for the first in the varlist. No other way to make it search the ENTIRE variable? Like
I did addchar corleidum lightbulb zugg.
Typed showalts corleidum. It worked
Show alts lightbulb/zugg didn't work. That means I have to keep track of who's the first in line. Anyway to search the etnire variable for a name then displaying? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon May 17, 2004 4:39 pm |
#AL addchar {
#IF %iskey( @char, %1) {#ADDI char.%1 {%2}} {#ADDK char {%1} {%2}}
#IF %iskey( @char, %2) {#ADDI char.%2 {%1}} {#ADDK char {%2} {%1}}
}
The alias is designed for two parameters. That's ONE primary name and ONE alt name, not THREE names. |
|
|
|
|
|