Oh the MUD I play, you have a limit of five commands per second. Any additional commands will cause three seconds of freeze time in which you can't do anything for five seconds. I have created somewhat of a buffer zone to prevent myself from stepping over this five command limit. I basically made a timer that sets the variable Buffer to 0 every 1 second. I then made an alias that matches * (everything). First it checks the Buffer variable. If the variable is greater than or equal to 5, the command will not be sent. If it less than 5, it will send the command, and then add 1 to Buffer. Here is the alias and timer:
Here is my dilemma. How can I incorporate this with my scripts without going through them all and adding in this buffer safety? Is there a way to make the Send function parse through this alias? Or is there some other method I could use to achieve the same result?
Thanks.
<aliases>
<alias
match="*"
enabled="y"
send_to="12"
keep_evaluating="y"
sequence="1"
>
<send>Buffer = tonumber(GetVariable("Buffer"))
if (Buffer >= 5) then
Note("Command not executed. You have exceeded the buffer.")
else
Send("%0")
Buffer = Buffer + 1
SetVariable("Buffer", Buffer)
end</send>
</alias>
</aliases>
<timers>
<timer enabled="y" second="1.00" send_to="12"
>
<send>SetVariable("Buffer", "0")</send>
</timer>
</timers>Here is my dilemma. How can I incorporate this with my scripts without going through them all and adding in this buffer safety? Is there a way to make the Send function parse through this alias? Or is there some other method I could use to achieve the same result?
Thanks.