Repeat - New and Improved command repeater!

Share your finished and ready for use plugins here.
Post Reply
User avatar
zombie343
Posts: 1
Joined: Fri Dec 29, 2017 8:43 pm

Repeat - New and Improved command repeater!

Post by zombie343 » Fri Dec 29, 2017 9:00 pm

Hi folks,
If you're looking for a more granular way to execute commands in a repeated fashion, you're probably familiar with the repeat Lua addon, and it is terrible. I've decided to rewrite it in plugin form, with help from Atomos and Thorny.

Here is the primary list of features:
  • Allows interval between commands (cycle time) to be in the order of milliseconds or fractions of a second instead of just whole seconds
  • Allows for cycle time to have a randomized delay added before the next command is executed.
  • Improved command parsing will accept single line commands as well as /execute <somescript.txt>.
Help message:
  1. Repeater Command Listing: /rp, /repeat or /repeater are all valid:
  2.  /rp [set|unset] [command] - Set or Unset command to be repeated.
  3.  /rp [cycle] <number> - Number of milliseconds to wait before repeating.
  4.  /rp [jitter] <number> - Specify max. random addition to cycle time. Default: 0
  5.  /rp [start|stop] - Starts or Stops repeating of previously set command.
  6.  /rp debug - Toggles debug prints messages.
Note: Cycle duration must be within 1s and 3600s (1000ms to 3600000ms)
Note: Jitter duration must be within 0s and 3600s (1ms to 3600000ms; 0 = disabled).


Example Usage:
  1. /rp set command /dance4 motion
  2. /rp cycle 10000
  3. /rp start
This will execute the command "/dance4 motion" every 10,000ms (10 seconds).

If you require a randomized interval between command executions, you can simply specify an additional amount of time, called jitter, to randomly be added to your cycle time:
  1. /rp set command /dance4 motion
  2. /rp jitter 3000
This will execute the command periodically, ranging between 10 and 13 seconds.

Feel free to post any questions or issues.
shinzaku
Posts: 46
Joined: Wed May 17, 2017 8:34 am

Re: Repeat - New and Improved command repeater!

Post by shinzaku » Sun Dec 31, 2017 1:40 pm

God bless. <3
Post Reply