Files
Mush-Soundpack/cosmic rage/worlds/plugins/Repeat_Command.xml
2025-07-01 23:28:00 +03:00

71 lines
1.2 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Sunday, February 17, 2008, 2:05 PM -->
<!-- MuClient version 4.19 -->
<!-- Plugin "Repeat_Command" generated by Plugin Wizard -->
<muclient>
<plugin
name="Repeat_Command"
author="Nick Gammon"
id="7f69fe2f7913b2ac312ecbad"
language="Lua"
purpose="Repeats a command &quot;x&quot; times"
date_written="2008-02-17 14:04:23"
requires="4.00"
version="1.0"
>
<description trim="y">
<![CDATA[
To use, type:
#n command
This sends "command" n times to the MUD.
For example:
#3 kick kobold
]]>
</description>
</plugin>
<!-- Aliases -->
<aliases>
<alias
match="^#\s*(\d+) (.*?)$"
enabled="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>
-- check at least 1 repeat
if %1 &lt; 1 then
ColourNote ("white", "red", "Too few repeats specified (%1)")
return
end -- if
-- check not more than 50 repeats
if %1 &gt; 50 then
ColourNote ("white", "red", "Too many repeats specified (%1)")
return
end -- if
-- execute (send to command processor) the command
for i = 1, %1 do
Execute "%2"
end -- for loop
</send>
</alias>
</aliases>
</muclient>