Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Tips and tricks
➜ Copying from Mud to Chat Session
|
Copying from Mud to Chat Session
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Marc Dver
(5 posts) Bio
|
| Date
| Wed 16 Jun 2004 07:54 PM (UTC) |
| Message
| My problem is simple conseptually, though difficult in execution.
What I would like to do is allow people to get certain information from my mud session using the chat plugin. Specifically, I would like to set up specific chat commands such that if a person enters "sr", Mushclient will copy the report into a variable and then paste the contents of the variable to the appropriate chat ID. I have been working with a vbscript file that can parse the data, but I can't figure out how to use a trigger in a plugin.
Also, what would be nice is a way to temporarily turn off output from the mud while the commands are going, and turn back on when the copying is done.
Here is my script file:
dim report
sub BeginSR (sName, sLine, wildcards)
world.setvariable "report", wildcards (1)
world.enabletrigger "SensorReport2", 1
world.enabletrigger "SensorReport3", 1
world.enabletrigger sName, 0
end sub
sub ContSR (sName, sLine, wildcards)
world.setvariable "report", report & vbCrLf & wildcards (1)
if wildcards (1) = "*Velocity:*" then
world.enabletrigger "FSR", 1
world.enabletrigger "SensorReport2", 0
end if
end sub
Here are my triggers so far:
<triggers>
<trigger
ignore_case="y"
match="*--[Sensor Report]*"
name="SensorReport"
script="BeginSR"
sequence="99"
>
</trigger>
</triggers>
<triggers>
<trigger
ignore_case="y"
match="*"
name="SensorReport2"
script="ContSR"
sequence="100"
>
</trigger>
</triggers>
<triggers>
<trigger
ignore_case="y"
match="-------------------------------------------------------------------------------"
name="SensorFinal"
script="FSR"
sequence="100"
>
</trigger>
</triggers>
Sincerely,
Marc DVer | | Top |
|
| Posted by
| Flannel
USA (1,230 posts) Bio
|
| Date
| Reply #1 on Wed 16 Jun 2004 08:19 PM (UTC) |
| Message
| You cant trigger on chat things, if thats what you were trying to do. You have to do all that triggering in your plugin, using callbacks and the like. There are examples of this in the forums.
Thats probably your problem at the moment, youre trying to have them send something through chat, and trigger it in mushclient, yes? |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #2 on Wed 16 Jun 2004 10:46 PM (UTC) |
| Message
| He wants to capture his sensor report and "chat" that, which is OK.
Once you have assembled the sensor report, you can use ChatEverybody to send it to everyone (just separate lines with the newline character).
http://www.gammon.com.au/scripts/doc.php?function=ChatEverybody
Also you might make the triggers "omit from output" to stop showing the data in your main screen. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Wed 16 Jun 2004 10:47 PM (UTC) |
| Message
| | I wouldn't even change the chat plugin, make a separate set of triggers, aliases etc. and put them in their own plugin. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Marc Dver
(5 posts) Bio
|
| Date
| Reply #4 on Fri 18 Jun 2004 04:57 PM (UTC) |
| Message
| | I don't want to send to everybody, but rather to just the person who requested the sensor report. | | Top |
|
| Posted by
| Flannel
USA (1,230 posts) Bio
|
| Date
| Reply #5 on Fri 18 Jun 2004 09:05 PM (UTC) |
| Message
| |
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #6 on Fri 18 Jun 2004 10:31 PM (UTC) |
| Message
| | Pasting is from the Windows Clipboard, ChatPersonal is probably the way to go. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
24,507 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top