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