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
discordia
Newbie


Joined: 05 Dec 2003
Posts: 8
Location: USA

PostPosted: Wed Feb 18, 2004 11:24 pm   

#variables, #triggers, and #windows - Oh my!
 
Okay I run a channel capture script to cut down on my spam when in Achaea. Till my upgrade this worked perfectly fine. Here is my sample code (the whole thing contains about 15 'channels'). My issue is that first, the variable speechcol is not being transfered to window speech and thereby 'highlighting' certain channels. Next, also it looks like lineend isn't working either. So this throws EVERYTHING into the speech window. In the speech window there is a trigger for it to #CO @speechcol for incoming text up there.

Any thoughts? Ideas? Something I'm missing or need to change since the upgrade?

Thanks,
Heidi

Code:

#CLASS {chat|chattrig}
#TRIGGER {~(Eleusis~)~:*} {
  #VARIABLE speechcol "darkgreen"
  #VARIABLE lineend %rightback( %trigger, 1)
  #WINDOW speech %trigger
  #GAG
  #IF (@lineend <> %char( 34)) {
    #T- chattrig
    #T+ chattxt
    }
  }

#CLASS {chat|chattxt}
#TRIGGER {*} {
  #VARIABLE lineend %rightback( %trigger, 1)
  #IF (@lineend = %char( 34)) {
    #WINDOW speech %trigger
    #GAG
    #T+ chattrig
    #T- chattxt
    }
  #IF (@lineend <> %char( 34)) {
    #WINDOW speech %trigger
    #GAG
    }
  }

Reply with quote
Mordenkeinen
Beginner


Joined: 19 Feb 2004
Posts: 10
Location: USA

PostPosted: Thu Feb 19, 2004 12:21 am   
 
I am using 7.01 as well, and have had no problems with mine.

Try it the following way, you can get rid of having to use @speechcol completely and use ANSI ON and then CONFIG COLOURS and assign the colours you wish to each channel and to tells, and with #CAPTURE it is displayed in the speech window in those colours.

Of course, the only thing I haven't worked out in this is when a message comes in, we'll say in the City channel, and it is wrapped by the MUD itself, and not zMUD, it ends up doubling the first line like so:
Code:
<i>(City): You say, 'And then there was this one time, at city
(City): You say, 'And then there was this one time, at city
camp, I tripped over a sleeping dwarf.'</i>
Code:
#CLASS {chat|chattrig}
#TRIGGER {~(*~)~:*} {
  #VARIABLE lineend %rightback( %trigger, 1)
  #CAPTURE speech %trigger
  #GAG
  #IF (@lineend <> %char( 34)) {
    #T- chattrig
    #T+ chattxt
    }
  }

#TRIGGER {%9 tells you*} {
  #VARIABLE lineend %rightback( %trigger, 1)
  #CAPTURE speech %trigger
  #GAG
  #IF (@lineend <> %char( 34)) {
    #T- chattrig
    #T+ chattxt
    }
  }

#TRIGGER {You tell %9*} {
  #VARIABLE lineend %rightback( %trigger, 1)
  #CAPTURE speech %trigger
  #GAG
  #IF (@lineend <> %char( 34)) {
    #T- chattrig
    #T+ chattxt
    }
  }

#CLASS {chat|chattxt}
#TRIGGER {*} {
  #VARIABLE lineend %rightback( %trigger, 1)
  #IF (@lineend = %char( 34)) {
    #CAPTURE speech %trigger
    #GAG
    #T+ chattrig
    #T- chattxt
    }
  #IF (@lineend <> %char( 34)) {
    #CAPTURE speech %trigger
    #GAG
    }
  }
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