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
➜ Suggestions
➜ A command loop maybe??
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| UnderStriker
(7 posts) Bio
|
Date
| Fri 02 Apr 2004 07:59 PM (UTC) |
Message
| heh, was wondering if this client could have a command called like.. $loop 20 *command*
Would be cool so spamming, or making triggers for the certain task isn't always required..
Peace. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Fri 02 Apr 2004 11:32 PM (UTC) |
Message
| This has been covered fairly recently. Someone wrote an example alias that would do it. Also, you could use speedwalking to do it.
For example, if your speedwalk prefix is ! (you can configure this in the "commands" configuration) then typing:
!5(say hello)
Sends "say hello" 5 times to the MUD.
If you don't want to type the brackets you can make an alias to do it for you. For example, this alias would do your exact suggested syntax:
<aliases>
<alias
match="^\$loop (\d{1,2}) (.*?)$"
enabled="y"
regexp="y"
send_to="11"
sequence="100"
>
<send>%1(%2)</send>
</alias>
</aliases>
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Magnum
Canada (580 posts) Bio
|
Date
| Reply #2 on Sat 03 Apr 2004 03:37 AM (UTC) |
Message
| Here's my version of the alias. The way it works, you start the alias with # followed by digits indicating how many times you would like to repeat the rest of the line. If there are # characters in the rest of the line, they are replaced with the iteration number.
<aliases>
<alias
match="^#(\d*) (.*?)$"
enabled="y"
expand_variables="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>StringToRepeat = "%2"
For x = 1 to %1
StringToSend = Replace(StringToRepeat, "#", x, 1, -1, 1)
World.Execute StringToSend
Next</send>
</alias>
</aliases>
So, for example, you could:
#5 look monster
which would:
look monster
look monster
look monster
look monster
look monster
or you could:
#5 look monster #
which would:
look monster 1
look monster 2
look monster 3
look monster 4
look monster 5 |
Get my plugins here: http://www.magnumsworld.com/muds/
Constantly proving I don't know what I am doing...
Magnum. | Top |
|
Posted by
| UnderStriker
(7 posts) Bio
|
Date
| Reply #3 on Tue 06 Apr 2004 02:00 PM (UTC) |
Message
| Do you happen to know how that could be done within the program itself? Since whenever i seem to try to add it, it gives me bad format for it :(
I'm not sure why its doing this, i copied it exactly how it is up here.. | Top |
|
Posted by
| Ked
Russia (524 posts) Bio
|
Date
| Reply #4 on Tue 06 Apr 2004 02:37 PM (UTC) |
Message
| It works for me just fine. Make sure you copy only the alias - everything between and including the <aliases></aliases> tags. Make sure you are pasteing it in the Aliases dialogue, not the Triggers one. Make sure that scripting is enabled, and the script language is set to vbscript. | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #5 on Wed 07 Apr 2004 02:51 AM (UTC) |
Message
| You might also be having problems if your client doest support send to script, its has been around for a while. If youre not using the most recent version, you should think about upgrading. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | 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.
21,243 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top