|
Buba Newbie
Joined: 01 May 2002 Posts: 0
|
Posted: Fri Apr 05, 2002 3:28 pm
Adding to a Var |
In my MUD i get output like:
>qw
Apaputter Bront Chigins Darksaber Dealer Ditzy Dougall
Frogfur Galadriel Iculinejr Imperator Improvisar Jediknightq Kella
Kewlcat Kimba Kup Librarian Mastermage Meloran Netmndr
Never Nightwolf Pantara Penfold Pepper Rasal Rere
Salient Sirmark Snowlily Soulquestr Spaun Spirit Synch
Thejunior Thor Thulium Tis Tonichaze Troy Xray
42 players
Only in my mud theres 4 columns across of names
Ive got triggers in a class activated by ^>qw
then in the clas i have
#TRIGGER {^(%w) } {#IF (%ismember( %1, @players)) {null} {#additem players %1}}
#TRIGGER { (%w)$} {#IF (%ismember( %1, @players)) {null} {#additem players %1}}
#TRIGGER { (%w) } {#IF (%ismember( %1, @players)) {null} {#additem players %1}}
the only problem with this is its not grabbing the names in the last 2 columns, is there something im missing here to get these other names in the far right columns?? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Apr 05, 2002 4:03 pm |
If there are four columns of names, your first trigger should get the first name since it matches any word at the beginning of the line. Your second trigger should get the final name since it matches any word at the end of the line. Your third trigger will also get the first name since it matches any word. That means none of these triggers will get the center names.
A simpler approach would be to get all four names at once. If you don't know the number of spaces use %s. Since #ADDITEM will NOT add duplicates I removed the #IF.
#TR {(%w)%s(%w)%s(%w)%s(%w)} {#ADDITEM @players %1;#ADDITEM @players %2;#ADDITEM @players %3;#ADDITEM @players $4}
LightBulb
All scripts untested unless otherwise noted |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|