Skip to content

Server side queueing (admins)

I’ve noticed that client side queueing in SM works different form another IRE game I came from. Instead of queueing and executing everything in the order sent, it overrides the queue with whatever input inserted. This is good! Don’t change it!  but also an annoyance... when logging into the game, I have an alias that applies defenses and does whatever I want to do. It’s set up in nexus as an alias with “send commands”, of about 5-6 different commands to be executed. As you can imagine, only 2-3 are actually get done, because they override and intercept each other. How would I go about scripting it in order?

PS. No coding experience here. Admins, please help? Or someone?

Comments

  • Just use the wait for function, then wait for the balance message. 
  • There is a "wait for" option that you can use in between each one. I gave mine the "You regain balance" line and a wait of 5 seconds.  So it will pause after each one for balance to come back and then process the next one.  I'm not using the queue though, so your mileage may vary.

    [Cassandra]: Poet will be unsurprised to learn that she has unread news.
  • edited December 2018
    Albion said:
    Just use the wait for function, then wait for the balance message. 
    Good point. I do it for bashing, so why not, right? Was hoping for a more elegant way from those with JS know-how. :)
  • edited December 2018
    Caliah said:
    There is a "wait for" option that you can use in between each one. I gave mine the "You regain balance" line and a wait of 5 seconds.  So it will pause after each one for balance to come back and then process the next one.  I'm not using the queue though, so your mileage may vary.

    Timers in a fight situation are dangerous, especially for class like Fury. It could fire something off at a moment when you least expecting it and mess up your flow. Apples and oranges here, but thought I’d throw it in. 
  • StarFiry said:
    Albion said:
    Just use the wait for function, then wait for the balance message. 
    Good point. I do it for bashing, so why not, right? Was hoping for a more elegant way from those with JS know-how. :)
    It's actually much more complicated in JS. That's why my wakeup script is kludged together with wait for right now.  I had to write a lockout so my bashing commands would slow down enough for gmcp.balance to process so that they wouldn't just all go at once. It took quite a bit of finagling.

    If you want to try it, it looks like this:

    //Triggered on every block sent to the client. Use this for variable checks and ongoing logic.
    //client.print("cansend= " +cansend); //show the status of the command lockout for debugging purposes

    if (client.incombat == true){
        //display_notice("You are in combat", "black", "red");
        if (cansend == true){
        run_function("attackCycle");
        cansend = false;  //variable to disallow sending before balance can process
        setTimeout(commandTimer, 350);  //set the timer
    }
    }

    function commandTimer() {
      cansend = true;  //returns true to allow another command to be sent.
    }
    [Cassandra]: Poet will be unsurprised to learn that she has unread news.
  • Sweet. Thank you. I’ll mess with it. 
Sign In or Register to comment.