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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
svetlana
Newbie


Joined: 20 Nov 2003
Posts: 8

PostPosted: Thu Nov 20, 2003 10:41 am   

#sub
 
I am using the #sub command, and it is working in the main window. but the part of the output that should go to another window is working, but not replacing as it should:

main window - (F1)Keren
second window - Keren

what do i have to do in order to make it work? (i need to see the same thing in the second window)
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Thu Nov 20, 2003 2:43 pm   
 
Please provide more information.

What is the full command you are using to send output to the second window?
Also, what are you #SUBbing?
Finally, a bit of actual mud output you're working on, copied into your post never hurts.

Your problem is defined but, as to how to make it work, I haven't a clue without more information.
Reply with quote
svetlana
Newbie


Joined: 20 Nov 2003
Posts: 8

PostPosted: Thu Nov 20, 2003 3:18 pm   
 
the group comand looks like this:

373H 148M 125V 3MX 430C O:> gr
Name H Ì V
---------------------------------------
Keren ||||| ||||| |||||
Liri ||||| ||||| |||||
morvel ||||| |||| |||||
dort ||||| ||||| |||||

now
I wont to see in the main and in the second window:

Name H Ì V
---------------------------------------
(F1)Keren ||||| ||||| |||||
(F2)Liri ||||| ||||| |||||
(F2)Morvel ||||| |||| |||||
(F3)Dort ||||| ||||| |||||

what should I do?
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Thu Nov 20, 2003 3:43 pm   
 
#VAR list {Keren|Liri|Morvel|Dort}
#TRIGGER {({@list}) (*)} {#sub {~(F%ismember(%1,@list)~)%1 %2}}
Reply with quote
svetlana
Newbie


Joined: 20 Nov 2003
Posts: 8

PostPosted: Thu Nov 20, 2003 4:41 pm   
 
no, does't work :(
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Thu Nov 20, 2003 5:05 pm   
 
excuse me for not writing spicifically for you
#var list {Keren|Liri|morvel|dort }
works on the above example every time i try it
Reply with quote
svetlana
Newbie


Joined: 20 Nov 2003
Posts: 8

PostPosted: Thu Nov 20, 2003 5:44 pm   
 
sorry, I am realy terable in that :-(
can you write for me all the commands i need to make it work?
(I need to have all the names in vars, because every day there are different people)
i have @t1 = keren; @t2 = liri....
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Thu Nov 20, 2003 5:45 pm   
 
quote:
Originally posted by megamog75

excuse me for not writing spicifically for you
#var list {Keren|Liri|morvel|dort }
works on the above example every time i try it



#var list {Keren|Liri|morvel|dort}
#TRIGGER {({@list}) (*)} {#var mod_member {~(F%ismember( %1, @list)~)%1 %2};SHOW @mod_member;#WIN Secondary @mod_member;mod_member=""} "" {notrig}
Reply with quote
svetlana
Newbie


Joined: 20 Nov 2003
Posts: 8

PostPosted: Thu Nov 20, 2003 6:03 pm   
 
quote:
Originally posted by mr_kent

quote:
Originally posted by megamog75

excuse me for not writing spicifically for you
#var list {Keren|Liri|morvel|dort }
works on the above example every time i try it



#var list {Keren|Liri|morvel|dort}
#TRIGGER {({@list}) (*)} {#var mod_member {~(F%ismember( %1, @list)~)%1 %2};SHOW @mod_member;#WIN Secondary @mod_member;mod_member=""} "" {notrig}



no
this one takes everything from the main window to the second one, but I need only the group
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Fri Nov 21, 2003 12:20 pm   
 
#ALIAS gr {#t+ name;#temp {^$} {#t- name;list=""}}
#VAR list {}
#TRIGGER "name" {^(%w)%s(|)(*)} {#win anotherwindow;:anotherwindow:#say %1 %2%3;#var list %additem(%1,@list);#sub {~(F%ismember(%1,@list)~)%1 %2%3}}

Step by Step
#alias gr
I see you used this to call the example so, you will need to add what i have in mine to yours.
#T+ turns on and off all of the classes buttons trig aliases macro, etc...
list="" when you put the name of a #var with an = sign next to it, it is the same as writing #var and the name
So list="" set the #var to "" witch is nothing, so I am clearing it out.
#temp is a temporary trig firs once and is deleted; i am using it to turn off the 'name' trigger

The #var list {}
is just the way this looks in the class file

#TRIGGER "name"
is the ID of the trigger I used the Setting feature in the trigger to input my id's

trigger
{^(%w)%s(|)(*)} I used the () around | because i wanted to tell Zmud to think of this as a wildcard that = itself, it could well be anything (!) or (a) or (9) etc....
all i did was take your example and made it a huge wild card
karen || ||| ||||| |
(%w) (|) (*)
if i would have done this
(%w)(*), then any word followed by anything would have got cought

pattern
{#win anotherwindow;
opens the window named 'anotherwindow'

:anotherwindow:#say %1 %2%3
redirects the #say to anotherwindow

;#var list %additem(%1,@list);
i choped off the positon on the end, because i just wanted it to add it to the end of the string and this was the easiest way
another way could have been
#addi list %1

#sub {~(F%ismember(%1,@list)~)%1 %2%3}}
is you sub
(F then order in witch they apper in the list) with all the stuff at the end

My bigest help has come from this forum, but I would never have learned if i hadn't taken the time to read the
HELP files witch Zugg put alot of work into
And The Finished Scripts forum of Zuggsoft

playing around withe the examples is very handy for learning
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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