Gammon Forum
Entire forum
MUSHclient
VBscript
Variables
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| Computer_crasher
(2 posts) bio
|
Date
| Sat 11 Feb 2006 04:09 PM (UTC) |
Message
| I would like to write something that basically recorded how many of something I've done, and then put it in the output as some sort of note.
For example, theres something in Achaea that has about 10 identical messages that I'd like to count as they are seen:
Quote: The air about you shimmers as your magic continues to carve its way through the unseen dimensions.
... and with each of these I'd like to send "Splice X" each time its seen.
What I need to do is have a variable, and then each time a trigger fires add a value to that variable and update the variable. Basically, it counts 1, 2, 3 etc. | top |
|
Posted by
| Essidus
(16 posts) bio
|
Date
| Reply #1 on Sat 11 Feb 2006 05:43 PM (UTC) |
Message
| A counting script is fairly simple. You've already mentioned the things you really need. All you have to do is give the variable (called count, for simplicity) an initial value of 0, and then set your display message. It should end up looking similar to this:
setvariable "count", @count + 1
note "Splice @count"
Just remember, you need to make sure that in your trigger, you've got expand variables checked, or else it will read @count as a string. | top |
|
Posted by
| Computer_crasher
(2 posts) bio
|
Date
| Reply #2 on Sat 11 Feb 2006 10:11 PM (UTC) |
Message
| Thanks. I tend to know what I want to do, and how I'd do it, I just don't know the language to do it :( | top |
|
Posted by
| Essidus
(16 posts) bio
|
Date
| Reply #3 on Sat 11 Feb 2006 10:31 PM (UTC) |
Message
| I know that feeling. I'd suggest spending some time getting aquainted with the common functions and scripts in your language of choice. Not in mushclient, but simply in general. I have a book on vbscript I refer to regularly when I'm programming. | 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.
10,839 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.