Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
albadse
Newbie


Joined: 26 Dec 2007
Posts: 3

PostPosted: Wed Dec 26, 2007 8:32 pm   

Script not working correctly after going from cmud 1.34 > 2.18
 
Hi,

I Have a script I've been using(not one that I wrote) in cmud 1.34, that doesn't work correclty in 2.18.

The way it works is to filter out the who list. The normal who command produces output like:

MATERIA MAGICA: Current Players Online
.-------------------------------------------------------------------------.
[60 :120 F HlfLg Wizrd Castle] Someone. [Crypt]
[60 :60 F H-Elf Bard Towne ] Someone. [Crypt]
[60 :240 F Hero Towne ] Grynn [Clan 10]
[100:241 F Archon Towne ] Nemori [(-NortH+)]
[43 :163 F H-Elf Druid Towne ] Auxesia [.o)rebel(o.][A]
[26 :26 M H-Elf Barba Towne ] Nape
[12 :12 M Drow Rogue Towne ] Bomli


The fourth column over has a location item. The script i've used in the past would allow you to filter by location.

Ie, whocheck castle - would return anyone on the who list with a location of Castle. Now, it returns a list, but now i get:

MATERIA MAGICA: Current Players Online
.-------------------------------------------------------------------------.
blank
blank
blank


It seems to be still filtering the list, just not display the output correclty.

Here's the code:

#CLASS {whocheck} {disable}
#TRIGGER {^ Visible Immortals online:} {
#t- whocheck
#echo %ansi( grey) Total Whocheck Matches: @socialarchon
}
#TRIGGER {^ ~[*:* ?* @wcarea*~] %w} {
#echo blank
#add socialarchon 1
}
#TRIGGER {~[C~]ontinue ~[R~]edraw ~[B~]ack ~[E~]xit:} {
#gag
#cr
} "" {nocr|prompt}
#TRIGGER {^ ~[*:* ?*~] %w} {#gag}
#TRIGGER {You will be able to use the WHO command again in %d seconds.} {#T- whocheck}
#TRIGGER {Total matches:} {#echo %ansi( grey) Total Whocheck Matches: @socialarchon}
#CLASS 0
#alias whocheck {#var wcarea %1;#var socialarchon 0;#cr;#ECHO %ansi( yellow, high)MATERIA MAGICA: Current Players Online in zone~: %ansi( cyan, high) @wcarea;#t+ whocheck;who;#gag}


Any help you could offer would be appreciated.



Smile
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: Wed Dec 26, 2007 11:07 pm   
 
In your trigger, it's actually echoing the word blank, maybe it should be this:

#TRIGGER {^ ~[*:* ?* @wcarea*~] (%w)} {
#echo %1
#add socialarchon 1
}

Untested, but should work.
Reply with quote
albadse
Newbie


Joined: 26 Dec 2007
Posts: 3

PostPosted: Wed Dec 26, 2007 11:09 pm   
 
Thanks. I'll give that a try. Very Happy
Reply with quote
albadse
Newbie


Joined: 26 Dec 2007
Posts: 3

PostPosted: Thu Dec 27, 2007 1:20 am   That worked
 
Thanks for your help Smile
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net