Basic Mushclient "system" help

edited July 2014 in Tech Talk
I am creating a muschlient system for myself (mainly for the practice, my day job is programming) and have run into an interesting issue.

I'm having commands run on prompt, waiting on balance/equilibrium, but I have an issue where if other output causes a prompt exactly in between a command being sent to aetolia and the prompt getting back from aetolia then I send the next command too early due to the double prompt that results. I.E. Someone speaking in the middle of my command list.

This causes particular issues for bloodborn rituals.

What strategies are there to mitigate this?

Edit:

The only thing i've been able to think of is making custom triggers for the result of the command, but that seems like a huge amount of work.
image

Comments

  • ElyniElyni New Zealand
    Not sure on MUSH's capability, but perhaps using a timer for your commands firing. And waiting that time before firing off another command (and not firing off, if the timer is active)

    For Mudlet, the command for that is simply, (as an example):

    if not command then
    command = tempTimer(0.5, [[command = nil]])
    send("whatever your command is")
    end
  • Mushclient definitely can do timers. I would prefer to find a different way that doesn't cause a delay in commands sending, but will implement that if needed. Thank you for the good idea!
    image
  • ElyniElyni New Zealand
    edited July 2014
    It's not exactly a delay in sending the commands. It just prevents the commands from firing multiple times, and causing errors in what you're doing. What that thing does, that I typed out, is sends the command if the command variable is set to anything but false/nil, otherwise it'll wait to send it (Because the command has already been sent, so it won't fire twice, unless the command hasn't been registered in .5 seconds, which is typically enough to take just about all latencies into account).
  • edited July 2014
    Right, it does mean you can only ever send commands every .5 seconds but that shouldn't really ever be an issue...

    Edit: Got it working, seems to work fine. Thanks for the help!
    image
  • edited July 2014
    Alright, could use some more help. For some reason my command queue is occasionally sending two commands on the same prompt, could someone review my system and maybe point out why? You can find it here: https://github.com/mordocai/mushclient

    Edit: Think I have found it, would still appreciate a review
    image
Sign In or Register to comment.