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
Xolademoness
Wanderer


Joined: 18 Jun 2004
Posts: 73
Location: United Kingdom

PostPosted: Sat Jun 19, 2004 7:06 pm   

*** REQUEST FOR A SCRIPT please any coders :/ ***
 
I am a paying customer, with zMUD 7.05 with WindowsXP

I checked out the script for Achaea... confusing.. Can anyone make a script that I can install easily without having to understand how it actually works?

Here's a challenge for you coder people Smile


I want all the text below to go into a window called 'Channels'
these parts:
Leyan's wispy voice comes from the blackened klatchian steel plate collar, saying that he grows some hair
Pakaran's wispy voice comes from the blackened klatchian steel plate collar, saying: and slightly more mindspace

but the text when it goes to the channel window (gagged from my main window) to be like this:
(#One) * Leyan grows some hair
(#One) <Pakaran> and slightly more mindspace


and these parts:
(Assassins) Cody's wispy voice comes from the blackened klatchian steel plate collar, saying: well I have to say that that sucked...I wanted to see blood
(Assassins) Cody's wispy voice comes from the blackened klatchian steel plate collar, saying that he nods

but the text when it goes to the channel window, gagged from my main window, to be like this:
(#Assassins) <Cody> well I have to say that that sucked...I wanted to see blood
(#Assassins) * Cody nods


and so on for a 'Sek', 'Ankh-MorporkCouncil' and 'Apex' channels.



Ok that's the first part,
next I want all tells both from me and to me in any of these formats (eg 'You ask', 'You tell', 'You exclaim', 'Someone asks you', 'Someone tells you:', 'Someone exclaims to you:', 'Someone tells you, them, anotherperson:' etc .. to go to a window called 'tells' :)
You ask Rayden Wildheart: What's it mean though?
Rayden Wildheart tells you: Fedited out to save the sensitive eyes of readers ;) you.
You tell Rayden Wildheart: Oh.
You tell Rayden Wildheart: Die.
Rayden Wildheart tells you: Well, technically it means you fedited out to save the sensitive eyes of readers ;), but it can be used to mean fedited out to save the sensitive eyes of readers ;) you as well.
Rayden Wildheart tells you: You wanted random tells.
You exclaim to Rayden Wildheart: Ok give me a multiple tell now please!

Rayden Wildheart tells Athena Gaiden'Panthera and you: Teneis un buen polvo.
I want that all to go in the 'tells' window, unchanged.


Thanks anyone that manages to do this.. I vaguely understood the basics of the kind of thing to do by looking at the Achaea capture script, but I'm not sure how to make my own Cool

(This is for the Discworld MUD at http://discworld.imaginary.com by the way)
Reply with quote
Xolademoness
Wanderer


Joined: 18 Jun 2004
Posts: 73
Location: United Kingdom

PostPosted: Sat Jun 19, 2004 7:07 pm   
 
An additional part, which may or may not be complicated to add, would be for when the user sends a message to the channel using the typed words (not actually showing up on the MUD's output except as "You whisper into the blackened klatchian steel plate collar.")
"chat message the message blah blah here"
"one the message blah blah here"
"assassins the message blah blah here"
"sek the message blah blah here"

and so on, to instead come up as, in the "channels" window we talked about in the last post as:
(#One) <Xola> the message blah blah here
(#One) <Xola> the message blah blah here {Yeah, I do mean that when it's typed chat it should show up as one in the channel window, since 'chat' is just an alternative command to talk on the main channel, one}
(#Assassins) <Xola> the message blah blah here
(#Sek) <Xola> the message blah blah here


Also, to gag and move these lines to the chat window
"The eyes are asleep."
"The eyes open and light up eagerly, then dim to a dull glow."


and if these commands are entered to copy them to the chat window without gagging them:
"talker on"
"talker off"
anything command entered beginning with "talker" actually.



Oh, another thing, I want a new window called 'Clubs'
And that to be similarly with channels, gagged and moved to the 'clubs' window in this case, but it has to recognize the slightly different format too

(The Evil Eight) Xola The Wicked: Spamming the channel for an example :)
(The Evil Eight) Xola The Wicked spams, yep

In this case unlike channels I don't want the text to come out any different than it comes from the MUD, as I prefer that kind of format anyway



If anyone manages to make this, as one script that's easy to install (without me having to paste every line one-by-one) I will be extremely grateful.... And you would be clearly a genius Smile
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Sun Jun 20, 2004 12:24 am   
 
I suggest you look at the documentation at "Introduction to Triggers" under "Getting Started" -> "Scripting", at "Advanced Triggers" under "Advanced Topics, and at "Pattern Matching" under "References".

Just about everything you stated can be set up inputting simple triggers into your command line as such:

quote:

#TRIGGER {^(*)'s wispy voice comes from the blackened klatchian steel plate collar, saying that (*)$} {#GAG;#WINDOW Channel {~* %1 %2}}

#TRIGGER {^(*)'s wispy voice comes from the blackened klatchian steel plate collar, saying: (*)$} {#GAG;#WINDOW Channel {~<%1> %2}}



To break it down, the syntax of a trigger is "#TR {pattern} {reponse to pattern}" The ^ means beginning the line. The * is a wildcard, and the () around it means to set it as %1, %2, etc. In this case, there are just two pairs of () in the trigger, so thereis no %3. The $ means ending the line, so the second (*) will be sure to capture everything to the end. The #WINDOW command has the syntax "#WIN WindowName {what to put in the window}".
Reply with quote
Amylon
Novice


Joined: 31 Jan 2003
Posts: 49
Location: Australia

PostPosted: Sun Jun 20, 2004 7:44 am   
 
There is enough channel capture scripts about that if you were to sit and look through them you could write your own in no time. Channel capture isnt hard, it just looks like it is. :)
Try using a trigger that opens a class, captures and closes the class on the prompt firing.
Reply with quote
Xolademoness
Wanderer


Joined: 18 Jun 2004
Posts: 73
Location: United Kingdom

PostPosted: Mon Jun 21, 2004 11:28 am   
 
Ok, I am getting there now... thanks geniusclown your post was very helpful :)

So far I have these triggers and they all seem to work:
PATTERN: ^(Assassins) (*)'s wispy voice comes from the blackened klatchian steel plate collar, saying that he (*)$
VALUE: #GAG
#WINDOW Channel {~ (Assassins) * %3 %4}
-
PATTERN: ^(Assassins) (*)'s wispy voice comes from the blackened klatchian steel plate collar, saying: (*)$
VALUE: #GAG
#WINDOW Channel {~ (Assassins) <%3>: %4}
-
PATTERN: ^(*)'s wispy voice comes from the blackened klatchian steel plate collar, saying: (*)$
VALUE: #GAG
#WINDOW Channel {~ %1: %2}
-
PATTERN: ^(*)'s wispy voice comes from the blackened klatchian steel plate collar, saying that he (*)$
VALUE: #GAG
#WINDOW Channel {~ * %1 %2}
-
PATTERN: ^(Assassins) (*)'s wispy voice comes from the blackened klatchian steel plate collar, saying that she (*)$
VALUE: #GAG
#WINDOW Channel {~ (Assassins) * %3 %4}
-
PATTERN: ^(*)'s wispy voice comes from the blackened klatchian steel plate collar, saying that she (*)$
VALUE: #GAG
#WINDOW Channel {~ * %1 %2}



what I want to know is, how do you make the next character not act like it's a script commandy thing?
I want to use < and > just as text, not as whatever they're meant to do as script, but when I use them it makes the text inside them not show up.. how do I tell zmud to make it not script and just a text character to show up in my Channels window?
Reply with quote
Xolademoness
Wanderer


Joined: 18 Jun 2004
Posts: 73
Location: United Kingdom

PostPosted: Mon Jun 21, 2004 11:31 am   
 
Oh and does anyone know how to make the text from the mud output stay in the same ANSI colours when it's gagged and moved to the 'Channels' window? At the moment it all goes one colour :(
Reply with quote
Ryntrax
Wanderer


Joined: 15 Mar 2004
Posts: 55
Location: USA

PostPosted: Mon Jun 21, 2004 3:50 pm   
 
#capture
Reply with quote
Xolademoness
Wanderer


Joined: 18 Jun 2004
Posts: 73
Location: United Kingdom

PostPosted: Mon Jun 21, 2004 6:05 pm   
 
That doesn't let me use the bits that edit out the junk though, and reformat the text on the screen :(
Is there any way to still have the benefits of the #WINDOW command but have the benefits of #CAPTURE, e.g not losing the ANSI colour, too?
Reply with quote
Ryntrax
Wanderer


Joined: 15 Mar 2004
Posts: 55
Location: USA

PostPosted: Mon Jun 21, 2004 7:51 pm   
 
just make triggers to format it in the new window
Reply with quote
Xolademoness
Wanderer


Joined: 18 Jun 2004
Posts: 73
Location: United Kingdom

PostPosted: Mon Jun 21, 2004 8:42 pm   
 
how?
Reply with quote
Xolademoness
Wanderer


Joined: 18 Jun 2004
Posts: 73
Location: United Kingdom

PostPosted: Mon Jun 21, 2004 8:42 pm   
 
how?
Reply with quote
Ryntrax
Wanderer


Joined: 15 Mar 2004
Posts: 55
Location: USA

PostPosted: Mon Jun 21, 2004 9:08 pm   
 
select the window that it is sending to. then just right click and edit settings. each window has its own settings. Make sure to save them.

you can do that or edit your current triggers to format before sending. such as

PATTERN: ^(*)'s wispy voice comes from the blackened klatchian steel plate collar, saying that she (*)$
VALUE: #GAG
#WINDOW Channel {~ * %ansi(purple)%1 %ansi(green)%2}

Formating the text how you want it in the original trigger will send the "formated" text to the new window.
Reply with quote
Xolademoness
Wanderer


Joined: 18 Jun 2004
Posts: 73
Location: United Kingdom

PostPosted: Tue Jun 22, 2004 12:19 am   
 
scroll up a bit look at those triggers please someone?
The colour works, thanks Ryntrax :) But the colour has helped show a few problems with my triggers

When I change the one designed for the default chat channel to green, the (assassins) channel changes too

I'm not sure what I should do to make sure it does not use the text from the assassins channel in the same way it does as normal chat?

remember, for default chat the mud output is in this format:
Cody's wispy voice comes from the blackened klatchian steel plate collar, saying that he nods
assassins (or similar way for other chat channels) output is:
(Assassins) Cody's wispy voice comes from the blackened klatchian steel plate collar, saying that he nods

problem is the assassins one has the same kind of bit in the middle, only differencei s the (Assassins) at start, and the ansi colour provided by the mud.. not sure how to make sure zMUD doesnt confuse the two
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