I'm currently using Svof as my main system, with some of my own bits and pieces added on. I have a pretty effective, if a little stupid, dor routine which is faster than that in Svof, but Svof's queue management is far superior.
I looked into how WSys queue management works, but couldn't get it to translate out effectively.
Does anyone have a standalone queue management system they use for Mudlet which makes use of serverside queueing, so multiple items can be added to the queue, taken out of the queue, etc?
I'm not expecting anyone to just hand it over on a plate, happy to do some of the work myself. but reaching out in hope of some guidance.
Tharos, the Announcer of Delos shouts, "It's near the end of the egghunt and I still haven't figured out how to pronounce Clean-dat-hoo."
1
Comments
Here's a quick(ish) rundown on some of the things my queueing system does:
Limits the number of queued commands to the appropriate size for the specified queue (one for the CLASS queue, six for the others).
I consider a command queued as soon as the function runs, and only use the trigger to verify that it has been queued, with a 1 second timer to cancel any commands that haven't actually been queued (due to lag, svof denying the command, amnesia, etc.), so even if I spam on my end I'm not spamming the game with unnecessary queue commands. Will also pick up actions from the QUEUE messages if it doesn't know about trying to queue them (but everything I have that uses queueing uses the script).
The queue function (used for actually queueing stuff) has six parameters, off the top of my head:
queue ("eq", "balance", "eqbal" or "class" plus some shorthands/alternatives that are hard-coded, like "voice" mapping to "class")
position (add or prepend)
command (string or table [will concatenate into a string using a command separator])
usesbal (boolean)
canprepend (boolean, I've never actually used this but coded it in just in case)
repeatable (default is false if you just don't pass a value, and for most commands you don't want to repeat them, but some - like movement or getting items - you will)
Can only have one balance using command queued at any one time in that queue, since there's no point trying to do more than one since the subsequent ones will fail. If you prepend, and it uses balance, it will by default refuse to do it (there's no point prepending a balance using command that will then stop everything else from happening); that's why the fifth parameter exists so you can in theory override this (but I don't know why you'd want to). If you add, and it uses balance, it will add it to the end of the queue OR replace the existing balance using command (which is always at the end of the queue).
If you prepend a non-balance using command, it will just prepend it. If you add a non-balance using command, it will insert it before the queued balance using command (if there is one, otherwise it just goes on the end). So if I already have my attack alias queued (which uses balance), and my opponent leaves, I can queue up directions to move, and it will be inserted before my attack, so I'll move/attack, rather than trying to attack/move.
Most commands aren't repeatable (there's no point in queueing up your attack alias six times, for example). However, the sixth parameter will allow you to say that it IS repeatable, so it will queue more than one of the same thing (I currently only use this for movement commands and GET/DROP/PUT).
Cuts down on spam and commands sent to the game. Rather than mashing an alias that constantly clears/queues a command, it will instead constantly run the function that will decide if it needs to do anything at all.
Results of disembowel testing | Knight limb counter | GMCP AB files
Code:
Triggers (line delta is 0 for all multiline triggers):
Results of disembowel testing | Knight limb counter | GMCP AB files
Couple of additional notes:
If you just delete "antonius." from the entire thing, I think it should still work without any issues caused by that namespace not existing. The "||" will need to be changed to whatever your command separator happens to be. This line:
--if ssc.inslowcuringmode() then send(command) return end
is commented out because it calls a function from my own curing system, but the "ssc" part could easily be replaced with "svo" and then uncommenting the line would be fine.
Results of disembowel testing | Knight limb counter | GMCP AB files
To add to the queue, I simply do:
How do I get rid of any existing eqbal using command and replace it with the mountjump?
The code that handles that is this section of the queue function:
So if you did antonius.queueing.queue("eqbal", "add", "kick Antonius", true); and then called antonius.queueing.queue("eqbal", "add", "mountjump northeast", true); before the kick had happened (i.e. it was still queued), it would replace the "kick Antonius" command with the "mountjump northeast" command.
Results of disembowel testing | Knight limb counter | GMCP AB files
Next question, is it possible, with the script as it exists now, to add multiple entries which consume balance and it to work through them as balance is recovered?
Results of disembowel testing | Knight limb counter | GMCP AB files