|
Muppet1856 Newbie
Joined: 16 May 2007 Posts: 6
|
Posted: Wed May 16, 2007 3:37 pm
Child Window Chat Commands |
I have a simple window "OOC_CHAT" that I want to use the command line to send chats without a preface. I have simplified it a bit for this discussion.
Code: |
#VAR OOCChatCommand {}
#ONINPUT {&{OOCChatCommand}} {:Muppet:%concat( "OOC ", @OOCChatCommand)} |
My main window is "Muppet" Why isn't this working?
OOC %1 |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed May 16, 2007 4:34 pm |
EDIT: Just realised that this is in the zMUD forum and my suggestion is almost certainly irrelevant. The second suggestion might still apply, but the first probably won't make a difference.
I think the only reason why this isn't working is because CMUD doesn't know how to execute values - it can only execute commands. Change the command to:
:Muppet:#exec {%concat("OOC ",@OOCChatCommand)}
or
:Muppet:#send {%concat("OOC ",@OOCChatCommand)}
and it should start working.
As an aside, though, why do you need to save the command into a variable? Seems to me like it'd be much easier just to have
#oninput {(*)} {:Muppet:#exec %concat("OOC ",%1)}
or something similar. |
|
|
|
Muppet1856 Newbie
Joined: 16 May 2007 Posts: 6
|
Posted: Thu May 17, 2007 10:10 pm |
Good Point
Here is the finished Script:
Code: |
#CLASS {System|Chat}
#TRIGGER {%w {says|say} OOCly, ~"*~"} {#CAP OOC_Chat;#GAG 2}
#TRIGGER {{^sign|%w} {says|say}, ~"*~"} {#CAP Chat;#GAG 2} "" {prompt}
#TRIGGER {~[%w~] ~(OOC~), ~"*~"} {#CAP OOC_Chat;#GAG 2} "" {prompt}
#TRIGGER {~\*~/~[%d MHz~]*} {#CAP Chat;#GAG 2} "" {prompt}
#TRIGGER {%w ~|~]newbie~[~|*} {#CAP OOC_Chat;#GAG 2}
#CLASS 0 |
And in the CHAT window I put...
Code: |
#CLASS 0
#VAR OOCChat {3}
#ONINPUT {(*)} {
#GAG
#IF @OOCChat=1 {:Muppet:#send %concat( "Newbie ", %1)}
#IF @OOCChat=2 {:Muppet:#send %concat( "OSay ", %1)}
#IF @OOCChat=3 {:Muppet:#send %concat( "OOC ", %1)}} "" {notrig}
#BUTTON 1 {Chat Status} {} {~|~]NEWBIE~[~||OSay|~(OOC~)} {} {} {@OOCChat} {} {Size} {71} {23} {} {} {} {} {10|95|79} {} {} "" {} {} {CHAT} |
To give me a selector to pick a chat type for entry in that window... What do you think? |
|
|
|
|
|
|
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
|
|