|
nomad980 Beginner
Joined: 01 Sep 2002 Posts: 15 Location: Miami
|
Posted: Fri Jan 16, 2004 10:40 am
Small scripting problem driving me insane |
Hi, Actually I have two scripting problems, one being the fact that I am capturing the output of all channels in a mud and putting them into their own window (using the #cap command). I have two of those windows with command line on them so that when i type in it sends the command to the mud, but here is where the problem lies I am trying to make it so that it uses #send instead of #all but it doesnt want to work with it (yes the alias is in the settings for that particular window). Problem two is that I want to make a trigger or alias that when I am playing with a certain character and type "say This is a beautiful day." it comes out "say Thisisabeautifulday." is there a way to make it so that zmud takes away the spaces? I want to thank you guys in advance for helping me or even reading this.
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Fri Jan 16, 2004 12:32 pm |
For the first problem, what is the alias that you are using in the other window?
For the second problem, you can use %replace:
#ALIAS say {~say %replace("%-1", " ", "")} |
|
|
|
nomad980 Beginner
Joined: 01 Sep 2002 Posts: 15 Location: Miami
|
Posted: Fri Jan 16, 2004 4:14 pm |
#AL ooc {#all {~ooc %-1}}
thats what i am using in that window, but I want to know if its possible to use #AL ooc {#send {~ooc %-1}} instead. Oh yeah thanks for the alias it works fine now, heheh, once more thanks. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Jan 16, 2004 9:42 pm |
Why don't you try it? Then you can tell us whether it works or not.
|
|
|
|
nomad980 Beginner
Joined: 01 Sep 2002 Posts: 15 Location: Miami
|
Posted: Fri Jan 16, 2004 10:39 pm |
This is what I currently have:
Code: |
#CLASS {ooc}
#ALIAS ooc {#ALL {ooc %-1}}
#TRIGGER {You ooc '} {#SUB {You ooc} {~(%ansi( yellow)%time( h:nn:ss am~/pm)%ansi( 7):%ansi( Red)%proper( You)%ansi( 7)~)}}
#TRIGGER {(*) oocs '} {#SUB {%1 oocs} {~(%ansi( yellow)%time( h:nn:ss am~/pm)%ansi( 7):%ansi( Red)%proper( %1)%ansi( 7)~)}}
#CLASS 0 |
It works fine with the all, but I want to try it with #send, apperently #send only works on the original mud window, not any windows created with capture. Now I have another problem The triggers seen here seem to make another trigger and that other trigger doesnt want to be deleted in any way possible, and I know that if it doesnt delete eventually the file is going to grow and drive me into a state of madness as new players come into the mud each day making the list longer. There also seems to be a syntax error in the newly created trigger...:
Trigger:Renkalt oocs
Value: #sub ~(%ansi( yellow)%time( h:nn:ss am~/pm)%ansi( 7):%ansi( Red)%proper( Renkalt)%ansi( 7)~)
___________________^ syntax error
Oh yeah lightbulb I am a fan of your work. |
|
|
|
nomad980 Beginner
Joined: 01 Sep 2002 Posts: 15 Location: Miami
|
Posted: Sat Jan 17, 2004 1:16 am |
I figured it out, it was the fact that i had it create another trigger, if i didnt put
{You ooc}
#TRIGGER {You ooc '} {#SUB {You ooc} {~(%ansi( yellow)%time( h:nn:ss am~/pm)%ansi( 7):%ansi( Red)%proper( You)%ansi( 7)~)}}
and left it
#TRIGGER {You ooc '} {#SUB {~(%ansi( yellow)%time( h:nn:ss am~/pm)%ansi( 7):%ansi( Red)%proper( You)%ansi( 7)~)}}
It works fine. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Jan 17, 2004 1:53 am |
I would have guessed that #SEND would work and I'm surprised it doesn't. However, that's why I recommended trying it. You can probably use the :window: syntax to redirect the command to the main window.
#AL ooc {:nomad:#SEND {~ooc %-1}}
Your script makes new triggers because of the #SUBSTITUTE command. It has two formats.
#SUB {substitute text}
#SUB {pattern} {substitute text}
The first format is used to substitute new text for the text matched by a trigger pattern. The second format is used to make new triggers. You used the second format. If you switch to the first format you'll get the same results without constantly adding new triggers.
#TRIGGER {You ooc '} {#SUB {~(%ansi( yellow)%time( h:nn:ss am~/pm)%ansi( 7):%ansi( Red)%proper( You)%ansi( 7)~)}}
#TRIGGER {(*) oocs '} {#SUB {~(%ansi( yellow)%time( h:nn:ss am~/pm)%ansi( 7):%ansi( Red)%proper( %1)%ansi( 7)~)}}
The syntax editor is objecting to the spaces because it's looking for the end of the #SUB's first parameter and doesn't know how to interpret it. The error can be eliminated by adding {} around the #SUB's value. But if you correct the two main triggers you'll be able to delete all the individual ones so it won't really matter.
#SUB {~(%ansi( yellow)%time( h:nn:ss am~/pm)%ansi( 7):%ansi( Red)%proper( Renkalt)%ansi( 7)~)}
Thanks. It's nice to know someone finds me helpful. |
|
|
|
|
|