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
➜ VBscript
➜ taking a variable from the output and using it
|
taking a variable from the output and using it
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Angelomcm
(7 posts) Bio
|
| Date
| Mon 24 Jan 2005 04:59 PM (UTC) |
| Message
| Hello,
I need some feature real bad and i lack the total skill
to make it happen in mushclient. Perhaps someone
can give me some insight, maybe even (oh do i dream of it)
a quick solution in this ? It would be so appreciated..
I need to be able to make an "on-the-fly" variable grabbing.
Example of what i need:
I have a variable called A, which we will assign as "rabbit".
All i need, that upon mushclient gets any of these lines.
{
rabbit leaves nort.
rabbit leaves east.
rabbit leaves south.
rabbit leaves west.
rabbit leaves up.
rabbit leaves down.
}
(rabbit being variable A)
it stores the direction variables somewhere as DIRECTION.
Like for example, on "rabbit leaves south."
it will store "south" as variable DIRECTION
and i can assign F3 to "look DIRECTION".
Same goes for north, east, west, up and down.
Optionally, a local echo that the variable
has been set could be nice.
I have played with the "send to variable:" options
in the trigger menu, without any luck.
I am not looking for total spoonfeeding or anyone
investing any time making this from scratch (unless it
takes like 2 minutes..)
Perhaps someone has such a script lying around that does
exactly that ?
(I decided to post it here since it sounds script'ey)
Thank you for reading this if you got that far.
Bye.
-Ange | | Top |
|
| Posted by
| Flannel
USA (1,230 posts) Bio
|
| Date
| Reply #1 on Mon 24 Jan 2005 06:07 PM (UTC) |
| Message
| You simply need two variables (one for your rabbit, one for the direction). You then create a trigger which has the match text of (assuming A is the variable for the rabbit, although I suggest you pick a better one): "@A leaves *." (no quotes) then check expand variables, ignore case is probably a good one too. Send to: Variable, and then at the bottom in the variable field type the name of the variable for the direction. If you want confirmation of sorts, change the color of the line (from the pulldown menu).
To change the first variable (rabbit) you could edit it manually, or (more easily) you could create an alias (which is basically the same thing as above, only change the variable name, change "@A leaves" to "target" or whatever you'd like. And of course, that would be an alias instead of a trigger.
To use the variable in a macro (thats the F3 thing) you need to make a third alias, which has the send text of whatever you'd like (if you ever want to type something out and get the same result, that'd be good, otherwise we can just have something that you wouldn't normally type, like... "ADSFADFadsFASDFASDFASDfasdfasdf", put that in the match text of the alias, and send whatever you'd like (look @direction) if direction is the name of your direction variable, then check expand variables, and omit whatever you'd like (probably omit the ASDFASDFAsdfaadsf and keep the look XX) and then send the same thing as your match text with the macro. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | | Top |
|
| Posted by
| Angelomcm
(7 posts) Bio
|
| Date
| Reply #2 on Wed 26 Jan 2005 01:14 AM (UTC) |
| Message
| thank you, worked real great.
-Ange | | 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.
12,574 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top