Post your tips here. I'll start with what I've figured out the hard way. My tips apply to OrderBot.
Infinite loops
Wrap everything you want to execute infinitely in a <While Condition="True"> tag. This is more reliable than trusting OrderBot to loop over your (for instance) Gather tags over and over again.
Arbitrary code execution
You can execute (some) arbitrary code in the Condition property of the WaitWhile tag. When the code terminates, the ScriptExecutor will assume the Condition was met. For instance, I'm running an infinite loop to check for unspoiled mining nodes in a certain zone, but I only want to check once a minute so I'm not wasting CPU cycles. I accomplish this with the following tag:
<WaitWhile Condition="Thread.Sleep(60000)" />
I imagine you could drop a class in a plugin folder and invoke a fully-qualified method this way, but I haven't tried it. It's certainly easier than any other approach to arbitrary code execution that I've found.
Infinite loops
Wrap everything you want to execute infinitely in a <While Condition="True"> tag. This is more reliable than trusting OrderBot to loop over your (for instance) Gather tags over and over again.
Arbitrary code execution
You can execute (some) arbitrary code in the Condition property of the WaitWhile tag. When the code terminates, the ScriptExecutor will assume the Condition was met. For instance, I'm running an infinite loop to check for unspoiled mining nodes in a certain zone, but I only want to check once a minute so I'm not wasting CPU cycles. I accomplish this with the following tag:
<WaitWhile Condition="Thread.Sleep(60000)" />
I imagine you could drop a class in a plugin folder and invoke a fully-qualified method this way, but I haven't tried it. It's certainly easier than any other approach to arbitrary code execution that I've found.