initial release
This commit is contained in:
70
cosmic rage/worlds/plugins/Repeat_Command.xml
Normal file
70
cosmic rage/worlds/plugins/Repeat_Command.xml
Normal file
@@ -0,0 +1,70 @@
|
||||
<?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 "x" 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 < 1 then
|
||||
ColourNote ("white", "red", "Too few repeats specified (%1)")
|
||||
return
|
||||
end -- if
|
||||
|
||||
-- check not more than 50 repeats
|
||||
if %1 > 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>
|
||||
Reference in New Issue
Block a user