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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts Goto page Previous  1, 2
Caled Posted: Tue Oct 22, 2002 12:18 pm
Achaean channel capture - Mod from Lalaynya's
Kraemder
Beginner


Joined: 27 Sep 2003
Posts: 10
Location: USA

PostPosted: Sun Jun 13, 2004 3:05 am   
 
Thanks a lot for posting your script Discordia. I just started playing Achaea and that was the very script I was attempting to write.. only I couldn't get it to work beyond one line.

But I can't leave well enough alone--I'm trying to get the mud to not only cut and paste the chats and tells to another window, but to read them outlout to me as well. Not just to read them outloud, but to only read -part- of the text outloud. I downloaded the plugin Mudreader, and saw that it supported the 'premium' AT&T voices that I had purchased, and attempted to modify Discordia's script to do this. Here's a sample bit of chat text from Achaea:

(Newbie): Alekhin says, "It was just rats but cruxsola picked it all up...do i drop them if i log out?"


I modified Discordia's script by adding paranthesis to here trigger:

#TRIGGER {^~(*~)~:*}

became

#TRIGGER {^~(*~)~:(*)}

The idea was to assign all of the text in the (*) wildcard to the %1 parameter, and to add carefully placed #SPEAK %1 lines to the script. But this caused zMUD to simply read out the person's name, and to ignore the rest of the string. I guess that zMUD likes to parse things into separate parameters, dividing things up by white spaces. Where the trigger was a {*}, I figured that I wanted to have it read the whole trigger, and wrote in a #SPEAK %trigger accordingly. This did not quite work out as I had expected either--both the first and second lines were read outloud... all of them. Interestingly enough, all lines of text beyond two were entirely ignored. I don't know why.

I'll cut and paste Discordia's script here with my modifications.

#CLASS {chat}
#CLASS 0
#CLASS {chat|chattrig}
#TRIGGER {^~(*~)~:(*)} {
#MAKEWINDOW chat "scrolling=yes|align=top|tight=chat"
#VARIABLE lineend {%rightback( %trigger, 1)}
#IF (@lineend = %char( 34)) {
#SPEAK %1
#CAPTURE chat
#GAG
} {
#T+ chattext
#T- chattrig
}
}
#TRIGGER {^~<~<*~>~>~:(*)} {
#MAKEWINDOW chat "scrolling=yes|align=top|tight=chat"
#VARIABLE lineend {%rightback( %trigger, 1)}
#IF (@lineend = %char( 34)) {
#SPEAK %1
#CAPTURE chat
#GAG
} {
#SPEAK %1
#CAPTURE chat
#GAG
#T+ chattext
#T- chattrig
}
}
#CLASS 0
#CLASS {chat|chattext}
#TRIGGER {*} {
#VARIABLE lineend {%rightback( %trigger, 1)}
#IF (@lineend <> %char( 34)) {
#SPEAK %trigger
#CAPTURE chat
#GAG
} {
#SPEAK %trigger
#CAPTURE chat
#GAG
#T+ chattrig
#T- chattext
}
}
#CLASS 0
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sun Jun 13, 2004 7:00 pm   
 
#TRIGGER {^~(*~)~:(*)} {

The first (*) is %1 the second (*) is %2 now I don't use that plugin but here are some things to try

#SPEAK %1 %2
#SPEAK {%1 %2}
Reply with quote
Kraemder
Beginner


Joined: 27 Sep 2003
Posts: 10
Location: USA

PostPosted: Sun Jun 13, 2004 11:37 pm   
 
I got it working. I'm such an idiot. I'm so careless, I shouldn't be allowed to attempt to write programs. I guess that goes for writing scripts if the scripting is 'powerful' enough like in zMUD.

By typing #SPEAK %1, I was passing the command

#SPEAK Alekhin says, "It was just rats but cruxsola picked it all up...do i drop them if i log out?"

and if you read the MudReader help file, then you'll see that in order to read whole sentences, you need to enclose it in {}'s.

#SPEAK {%1} fixed everything. I'm not sure why #SPEAK %trigger was completely unbothered by this, but I altered the {*} pattern to {(*)} to store it in a parameter and switched #SPEAK %trigger to #SPEAK {%1} and it's working beautifully.

This is pretty neat having the channels read to me. Now I'm going to see how I can get other parts of the mud to do this too...
Reply with quote
worlo
Newbie


Joined: 20 Jul 2004
Posts: 8

PostPosted: Sat Jul 24, 2004 8:22 am   
 
-nevermind wrong post-
Reply with quote
hykou
Wanderer


Joined: 29 Apr 2004
Posts: 63
Location: USA

PostPosted: Sat Jul 24, 2004 6:45 pm   
 
ummm.... why doesn't anyone do it the easy way????

Do this:

#TRIGGER {You tell %1} {#CAPTURE TELLS}

#TRIGGER {%1 tells you} {#CAPTURE TELLS}
----------------------------------------------------
fiery wrote this... this DOES capture multi line tells... always has worked with me for any mud ive played...
Reply with quote
discordia
Newbie


Joined: 05 Dec 2003
Posts: 8
Location: USA

PostPosted: Mon Aug 23, 2004 7:30 pm   
 
Wow, I'm glad everyone has liked and been able to mod the code to their personal liking. The prompt that comes up, you'll have to modify your triggers to keep that from happening. I eventually dropped trying to capture tells only because I liked seeing them in the main window rather than the upper window. For the most part it was clans and channels that was spamming me, not tells.

Now to trig your prompt, it all depends on your prompt. Now I sort of dropped out of MUDing for the most part so I haven't been on Achaea in awhile, but memory should serve correct and this should still work.

Code:
#TRIGGER {^&{hp}h, &{mn}m, &{en}e, &{wp}w } {#GAG}


Just take out the bits you aren't going to use, like if you have the HME prompt, take out the wp... now the &{hp}, etc. I used for gauges that were in my window top, between the channel capture and the main window. However for those bits, you'll have to do triggers on your score to find those and code that. I can post those if they're wanted, but if you already have gauges you should have a prompt similiar. I set mine to trigger on a Newline and not prompt because it allows me to see it still but then it disappears.
Reply with quote
Morcelu
Newbie


Joined: 15 Aug 2006
Posts: 8

PostPosted: Tue Aug 15, 2006 2:49 am   
 
***Edit**

I got discordia's script working..but I wish to send tells and say's to that channel, how do I do that..because for some reason after I pasted the script in the main window and the chat window came up I can't edit anything over there..and I"m not sure how to edit the window now?
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Tue Aug 15, 2006 11:49 am   
 
discordia wrote:
I love capturing my channels and tells in Achaea, cleaned up on my spam, however I like to log what I do on Achaea and does anyone have a tip for gettng the child windows to log without having to manually do it each time I log in?
in each window click settings, go to onconnect #log whateverulogitas
Save and you will now have a new file called windownamethatyouhad.mud
resave the layout, and you should be good to go.

EDIT: holy crap, that was an old post I replied to Embarassed

Sorry for making ya look Morcelu, I don't know how to help ya since I don't know exactly what ya mean.
_________________
http://www.Aardwolf.com
Reply with quote
discordia
Newbie


Joined: 05 Dec 2003
Posts: 8
Location: USA

PostPosted: Wed Aug 16, 2006 12:22 am   
 
Making duplicate of the main trigger (~<~<*~>~>~: to * tells you) should do it. It's been awhile but I'll see if I can make an alt somewhere and give a go and post back in a day or so with modifications. It is a rather old script now. Last time I fiddled it, I added logging to it.
Reply with quote
Morcelu
Newbie


Joined: 15 Aug 2006
Posts: 8

PostPosted: Wed Aug 16, 2006 6:13 pm   
 
thanks Discorida I'll look in from time to time to see if its up. But the problems are this I want to send tells and all chats to it. and could someone please explain how to filter it so this doesn't happen http://i21.photobucket.com/albums/b272/bryock/Zmud.jpg

See all the descreptions and every thing are in the chat window how do I filter them out? and make it so they don't go there? and I'm learning bit by bit but still a newbie. Thanks in advance.


P.S. Off topic but can one tell me how to actually make the status window display my status?
Reply with quote
mourdred
Newbie


Joined: 17 Feb 2005
Posts: 7
Location: ...

PostPosted: Thu Oct 05, 2006 4:58 am   darn
 
hmm could someone help me to get the script running? I've uploaded the chat code and it's actually made the folder on my settings, but no window pops up and basically nothing is captured, I basically copied and pasted that entire quoted section on the page before this :( So anyone?
Reply with quote
Kharaen
Newbie


Joined: 19 Nov 2006
Posts: 2

PostPosted: Sun Nov 19, 2006 4:22 am   
 
I'm catching everything with this (except the prompt, which has #T- cap in it.) How do I make it only capture the channels?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Nov 19, 2006 5:55 am   
 
I was thinking about this the other day, and I don't see why multistate triggers can't solve this problem very simply.

#trig {~(*~)~: *} {cap on}
#cond {.~"$} {cap off}

You can make the cap off trigger more complicated by adding the %rightback function from the other example and stuff, but that should work in theory. Why not do it this way? Seems a bit more robust to me since it doesn't involve classes, and it's impossible for the trigger to fire outside 1-2-1-2 order.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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