[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2067: Undefined array key "author"
[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2067: Undefined array key "author"
[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 2067: Undefined array key "author"
http://www.shatteredisles.com • Mushclient plugin: Do/Then
Page 1 of 1

Mushclient plugin: Do/Then

Posted: Tue Apr 12, 2016 8:33 am
by
Greetings, all. A first contribution to the Mushclient community of Shattered Isles:

https://github.com/galaban/SHATTEREDISLESDoThen

This is my Do/Then plugin for crafting. The basic commands:
  • do <count> <command>
    then <command>
The "do" command repeats the given command (or string of commands). It triggers off the completion of the previous crafting command. So, for example, "do 5 chop" would chop 5 times.

The "then" command also triggers off of the crafting commands. It executes the command (or list of commands) after the next crafting command is complete. If there is a "do" cycle currently being processed, it waits until the count is complete. So, for example "chop;then get poplar" or "do 5 chop;then get all.poplar"

In addition to this, I overrode the stack character so that the "then" command can more easily stack. Normally, putting in "then bundle poplar;get poplar" would cause the "get poplar" command to execute immediately. However, with this plugin, it will stack so that [bundle poplar;get poplar] will execute after the next command. The advantage to this is that the "then" command can easily be stacked: "then chop;then chop;then get all.poplar". That would chop twice before getting the results.

Finally, I have added a "wait" in as well. Since there are multiple queues going on in this mud, there are often times a need to wait in between commands. A perfect example is during walking: "then s;s;wait 1.5;sell toy"

Enjoy.

Re: Mushclient plugin: Do/Then

Posted: Sat Apr 23, 2016 6:22 pm
by
I'm not sure if this is doing the same thing but when I have a trigger for crafting I change the send to from World to Execute. This makes the commands I put in there execute in order. They don't run over each other.

Re: Mushclient plugin: Do/Then

Posted: Sun Apr 24, 2016 8:17 am
by
Well, the purpose of this is that you can't enter "chop;chop;chop;chop" and queue up a bunch of chops (or forges, forages, cooks, etc.) If you do that, the first will execute and the rest will just say "You're already doing something". So, you have to trigger the next chop off the completion of the last chop. IE: "do 4 chop"

Also, movement is on a different queue from the buy/sell commands. Buy, sell, give, get, put, etc, all execute immediately, wherever you are, where as movement has a delay. So, if you want to move from the inn, say, to the pawnshop, you can't just enter: n;se;se;e;e;s;s;sell all. You have to add a delay in there or else "sell all" will execute before you even move. So, we end up with:
> do 4 forge cup
> then get all;n;se;se;e;e;s;s;wait 5;sell all
So, that above would forge 4 cups, get them, and go sell them.