|
Morcelu Newbie
Joined: 15 Aug 2006 Posts: 8
|
Posted: Tue Aug 15, 2006 2:56 am
Help with Windows |
No this isn't a microsoft problem.
What I want to do is create a window that I can send all my chat to, tells, class CT all of it. The question is how do I do this in a step by step matter.
I play the game achaea and I would really like to put all the chatter into this seperate window so I can do all my mudd work in a main center window and the chat will be to the left side perhaps in a small square and not just a whole other window but smaller.
Any help is great. |
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Tue Aug 15, 2006 8:25 am |
Have a read up on #CAPTURE
and #WINDOW
That should get you started |
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
|
Qiz Novice
Joined: 14 Aug 2006 Posts: 34 Location: Sweden
|
Posted: Tue Aug 15, 2006 8:50 am |
Doing what you ask for is rather straightforward, but possibly not what you actually want in the end.
#TR {(%w) tells you'(*)'} {#CAPTURE Communication"; #GAG}
#TR {(%w) chats '(*)'} {#CAPTURE Communication"; #GAG}
etc...
will do what you ask for. Read below for possible problems.
I'm not familiar with Achaea so I'll just go ahead and assume a few things first:
- any person using channels such as tells and chat have only one word names
- mobs can have single or multiple words describing them, resulting in things like "The hermit says 'Greetings warrior'" as well as "Carl says 'I'm a mob'"
General:
I'll be using "Mob" to indicate a mob described with one word when using channels, "The Mob" for multi word descriptions and "Char", "Char2" etc for a charactername
Step 1.
Find the pattern for all your different channels. I'll be using the syntax from Realms of Despair (SMAUG mud) for this example.
Char tells you 'some text'
Mob tells you 'some text'
The mob tells you 'some text'
Char says to Char2 'some text'
Char says to you 'some text'
Char says 'some text'
Mob says 'some text'
The mob says 'some text'
You say to char 'some text
You tell Char 'some text'
You tell The mob 'some text
Here we can conclude:
- that if necessary you can choose to treat things you say differently if you so wish
- You can't distinguis between Mob and Char (unless they produce differently coloured text or you set up an extensive database or textstring containing all character and/or mob names
- If we want both Mob and The mob messages to be treated alike, while being handled differently from all Char we are in serious trouble.
Step 2.
Find out how to handle what you want to do.
This is easy enough
"#GAG" without any parameters will make the last line received from the mud not be shown.
"#CAPTURE Communications" will send the last line received from the mud to a window called Communications
Step 3.
Create your triggers and make certain that you know what will happen in different circumstances.
Examples:
#TR {(%w) tells you'(*)'} {#CAPTURE Communication"; #GAG}
This will send all tells you receive to another window and not show it in "where you mud". This includes any tells from mobs with one word descriptions such as:
Mob tells you 'To pass through this portal you must say the magic word abrakadabra.'
Now, unless you keep a careful eye on the Communications window, you just missed some possibly important in game info...
(Some indentation here for readbility which makes this not copy-pasteable)
edit: indentation is removed when posting. just put it all on one line...
#T {(*) tells you '(*)'}
{#IF ( %pos(" ", %1) = 0)
{#CAPTURE Communication}
{#CAPTURE MobCommunication}
#GAG
This will check if there is no whitespace in the part preceeding "tells you", and if there is, send it to MobCommunication, otherwise send it to Communication. Seems nifty, but if there are both "Mob tells you" and "The mob tells you" on your mud, you will end up with some mob tells in Communication window and some in MobCommunication window.
However, there might be easy solutions on your particular mud depending on how things actually look (as opposed to my assumptions). Perhaps the text is coloured differently if you get a tell from a mob than if it comes from a person, or perhaps there are only mobs with multi word descriptions etc. |
|
|
|
Morcelu Newbie
Joined: 15 Aug 2006 Posts: 8
|
Posted: Thu Aug 17, 2006 7:50 am |
ok, i seem to have gotten the chat window to work right..now this is awhole new problem. How do I get the status window to show my status? to show my Health, Mana, Will power? and over all status of my character. and to have it update as I go thru combat?
and just to have simple prompts such as if I'm blinded it will read in red in the window. "Blinded" or LEFT ARM BROKE. is there a script out there that will do that? (and if you have a custom script that does this sort of thing could you please send me a PM.) Thanks in Advance. |
|
|
|
Qiz Novice
Joined: 14 Aug 2006 Posts: 34 Location: Sweden
|
Posted: Thu Aug 17, 2006 12:26 pm |
Morcelu wrote: |
ok, i seem to have gotten the chat window to work right..now this is awhole new problem. How do I get the status window to show my status? to show my Health, Mana, Will power? and over all status of my character. and to have it update as I go thru combat? |
I suggest reading the zMud help on triggers. Just open help->search and enter trigger and read that and related entries. It will tell you about trigger parameters such as %d for numbers, %w for words etc, and %1..%99 to access captured trigger parameters. You can also use regular expressions (REGEX), and for info on that, wiki gives a nice overview, allthough zMud might have its own help file on that as well.
Morcelu wrote: |
and just to have simple prompts such as if I'm blinded it will read in red in the window. "Blinded" or LEFT ARM BROKE. is there a script out there that will do that? (and if you have a custom script that does this sort of thing could you please send me a PM.) Thanks in Advance. |
To get an answer to that you'd need to state the mud your on, or at least what code base it uses to have a fair chance of getting a reply. Also, if the mud supports setting personal prompts you'd still need to read up on triggers to know enough to modify any existing script.
Just as an example, this is my prompt trigger used when autoadepting spells on Realms of Despair, SMAUG code base:
#TRIGGER {^<(%d)/(%d)hp (%d)/(%d)m (%d)/(%d)mv |} {#IF (@AASscriptstate =~ "sleeping") {#IF (%3 > (%4 - 60)) {wake;#VAR AASscriptstate "casting"}}} "" {nocr|prompt}
It triggers on the first part of my prompt, then proceeds to see if mana is greater than (max mana - 60). Not what you want to do, but should give you somewhere to start. |
|
|
|
|
|
|
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
|
|