I need advice. I can't figure out the strategy to get modular, sane programming into MUSHclient. Much of what I want to do involves waiting for text or time to pass before continuing the logic. Chasing triggers around in circles is a logical nightmare.
I've seen the 'require "wait"' thing. Using it in an alias works as described but then calling that alias while inside some other script makes it lose the "waiting" feature.
My script section for my testwait alias is this, and it works:
require "wait"
wait.make (function ()
Send ("test1")
wait.time (4)
Send ("test2")
end)
My script section for my testmodular alias is this:
Note("running alias w/ wait...")
Execute("testwait")
Note("alias w/ wait done...")
The testmodular alias displays both notes before testwait sends anything. Clearly, I can't use something like testwait as a modular procedure to help me build a complex program until I fix something, but what?
I've seen the 'require "wait"' thing. Using it in an alias works as described but then calling that alias while inside some other script makes it lose the "waiting" feature.
My script section for my testwait alias is this, and it works:
require "wait"
wait.make (function ()
Send ("test1")
wait.time (4)
Send ("test2")
end)
My script section for my testmodular alias is this:
Note("running alias w/ wait...")
Execute("testwait")
Note("alias w/ wait done...")
The testmodular alias displays both notes before testwait sends anything. Clearly, I can't use something like testwait as a modular procedure to help me build a complex program until I fix something, but what?