Using Queue to process Alias

Posted by Kotokz on Sat 08 Feb 2020 01:07 PM — 5 posts, 20,100 views.

#0
I'm using Queue to throttle all the commands from my script.
The problem is the cmds including Alias from Mush itself.

Execute is able to run Alias, but Queue seems not handle it well.

Any idea how i can let Queue to run Alias?

I use speedwalk prefix "#" to indicate speedwalk then call EvaluateSpeedwalk before put in Queue.
How about Alias?
USA Global Moderator #1
I think you'll have to stop using Queue for this and implement the throttling yourself.
Amended on Sat 08 Feb 2020 06:03 PM by Fiendish
Australia Forum Administrator #2
Have you tried to set the alias to send to "World (speedwalk delay)"?

That uses the queue.
#3
thanks all!

just want to clarify, my question is more about how to use Queue to send Alias. Execute is able to, but not Queue.

for example i have list on commands, on of them is actually Mush Alias. i have created function to split the commands one by one then put in Queue..

Any idea i could know which of them is Alias instead of Mud command...
Australia Forum Administrator #4

See this post about building pauses into Lua scripts.

You could have a (Lua) table of things you wanted to do, loop through the table, and then send them to Execute function, pausing after each one.

Alternatively, make a timer that fires every so often (eg. 0.5 seconds) and sends the first item in your table to Execute, and then deletes it from the table.

An alias could add more items to the table (queue).