Indeed; such a feature could also be used to write scripts that do unrestricted Mall searches, and to write scripts that break unexpectedly due to a chat notification ending up in the middle of the text they're trying to parse.
Perhaps more importantly: if such a feature existed, then the current format of all commands' output would be carved in stone forever. No additional details could ever be provided, and no messages ever reworded to make them clearer, for fear that it would break some script. Is that really what you want?
Hey I appreciate your response, but there's no need to be so snarky about it. A well written script doesn't need to break. Perhaps all the problems you're trying to point out with my suggestion are really just problems with the current framework for scripting.
Yes I do realize that something like this could cause a lot of scripts to break (if used carelessly or in a bad situation), but half if not over half of the scripts up on these boards are already broken anyway. A broken script deserves to stay broken if nobody cares enough to fix it.
As for the unrestricted mall searches or other "unscrupulous behavior", well really a wrapper for KoL in command line mode could already be used for the same purposes. A lot of the scripters here are already trying to make a conscious effort to limit server hits, so I think there are a lot of legitimate uses for such a functionality.
It just sounded to me like your mind was made up before you even finished thinking about it. That's the way it came across.
Anyhow, based on my experiences, I don't know that you can have a finite 30 turns between rock creatures unless I'm still misunderstanding something. At best set the counter to 24 to equip charged for the 25th-35th turn and when the rock creature is found, set new counter and switch off-hands/gear till 24 turns have passed again.
If I were writing a script, this is what I would be doing. Jick actually stated that it was 25-35 adventures.
I just tested the solution I posted above. The counter causes an abort. So, handling of gear switching should be done in the counterScript, not the betweenBattleScript.
So how do you plan on equipping items in a CCS?
I think what Bale may have been getting at, or at least a potential problem that I can see with what you have there, is that your conditionals are too vague. Equip the magnet when counter reaches 0, otherwise equip another item. So for counter of 30 down to 1, you're going to try to equip another item.
Here are just a few thoughts:
Firstly I would be starting the counter at 25, not 30.
Secondly, the counter should be reset, not added to. Let's say you started the counter at 30, now imagine you encountered the rock monster on adventure 25. You're going to add another 30 on to the remainder of 5, now your counter won't fire for another 35 adventures and this could have a cumulative effect.
Thirdly, it's easier to explain in pseudocode:
If counter = 0 Then
Equip magnet
End If
If counter = 25 Then
Equip other item
End If
See there's no else, so you're avoiding the attempt to equip the other item if the counter hasn't reached 0.