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 Goto page Previous  1, 2
Fergal1982 Posted: Tue Aug 09, 2005 4:18 pm
Capturing Text to another window
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Aug 14, 2005 10:52 am   
 
In the preferences Script Parser section, turn on the option to use wilcards in {} patterns. Then set your pattern to
^{%w|}%w tells you, ~"

This will allow 1 or 2 words to be valid.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Atreides_096
Wanderer


Joined: 21 Jan 2005
Posts: 99
Location: Solvang, CA

PostPosted: Sun Aug 14, 2005 12:38 pm   
 
Another thing you can do is create a stringlist variable with NPC names. To do this, create a variable, we'll say "npclist". Then an alias:

Code:
#al {npcadd} {#VAR NPC_list %additem( %prompt( "", "Enter the name of the NPC you wish to exclude from captures") , @NPC_List)}


Now, either manually edit the variable, or type "npcadd" to add npc names. Then in the capture, integrate:

Code:
#if { %ismember( %1, @npc_list)} {} {Capture Stuff Here}


Unfortunately, the code you received before mine is a bit different than I code (and quite likely more effective).. so I don't want to try to give you the entire setup incorrectly. Perhaps Ton would be so kind as to integrate this system into what he gave you (if you're interested).

The advantage of this is that it allows you to strip NPC input even in the case where it's a straight tell from an NPC, as opposed to (and including) the situation you listed. The disadvantage is that with too many NPCs, the variable can become huge and (theoretically) be very slow, if you're on a slow computer.

If you leave the ^ symbol in, and use the setup given to you by ton to allow for 1 or 2 prefix words in addition to the name, for each NPC you'd likely need to add the last 1, 2, and 3 (as 3 seperate entries, 1-word, 2-word, and 3-word) words of their names so it omits all occurances. (removing the ^ symbol, you'd want to just add their last name). I believe the %ismember command is case-sensitive as well...
Reply with quote
Fergal1982
Wanderer


Joined: 08 Aug 2005
Posts: 70

PostPosted: Tue Mar 06, 2007 11:43 pm   
 
sorry to dredge up an old old thread here. I've been using this successfully for a while now, but i have a question. Can i set the tells to be recorded in the logs even though im gagging them?
Reply with quote
Odoth
Wanderer


Joined: 13 Nov 2004
Posts: 54
Location: Visalia, CA

PostPosted: Tue Mar 06, 2007 11:59 pm   
 
Heh, yeah I just had a thread about this (was trying to do the same thing). Under View, Preferences, General, Logging, deselect "Log after triggers."
_________________
*ribbit*
Reply with quote
Fergal1982
Wanderer


Joined: 08 Aug 2005
Posts: 70

PostPosted: Wed Mar 07, 2007 8:07 am   
 
thanks
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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