View Full Version : Lich Script Request?
fallenSaint
06-04-2007, 09:03 PM
So anyone know if typeahead can be tweaked or maybe have the skills to input a Lich script thats similar to Typeahead but instead of only buffering for type ahead buffering any command typed? Basically what Im wanting to do is be able to buffer up commands while in RT and have it spit them out as soon as I can. I figure lich's inate ability to wait for RT should cover that part just need something thatll sit and buffer stuff for me.
Celephais
06-04-2007, 09:08 PM
I'm wondering if for your purposes it would be sufficient to just create a script that is just "put %1 %2 %3 %4... %9" called "q" and then when you're in RT you could just type .q whatever and it would wait on your RT.
if you're in long enough RTs and you know it's going to need it... just .q whatever... temp solution, only lets you have one item in the queue (short of maybe having the script "put %1 put %2..." but you would have to type .m "whatever whatever" "whatever")
fallenSaint
06-04-2007, 09:17 PM
It may be what I have to fall back on was just checking with any Ruby Writers if they could dig up the buffer coding thats in type ahead.
Celephais
06-04-2007, 09:21 PM
Definatly agree it can be done much better... just giving you a suggestion for the meantime... or incase no one steps up.
Caede
06-04-2007, 10:14 PM
I do this by creating an alias like this:
>;alias set do=;e fput '\?'\r
>;alias list
--- Your current Lich aliases are:
1) DO => ;e fput '\?'\r
Then, from the command line:
R>do se
--- Lich: exec1 active.
[exec1]> se
...wait 3 seconds.
R>
[exec1]> se
[Coastal Cliffs, Wrecked Village]
Obvious paths: northwest
>
--- Lich: exec1 has finished.
You can queue up multiples (they show up as exec1, exec2, ...), but they tend to execute in the reverse order you add them once RT is gone. It seems like you should be able to create a small script that would queue commands and inject them in the order received whnever you're out of RT, and wait for RT to finish on previous commands.
Hmm hmm.
I'll play with this from work tomorrow, because it's something I'd use pretty frequently.
--
Caede
Shaelun
06-09-2007, 10:29 PM
# Personally I think this script will do as much harm as good, but whatever... auto-resend commands blocked by RT
Script.self.feedme_upstream
buffer = Array.new
# The thread to continually update our buffer
Thread.new {
loop {
cmd = upstream_get
clear
buffer.push(cmd) if get =~ /wait \d+ sec/i
}
}
# Let the main script handle actually sending buffered commands
loop {
wait_while { buffer.empty? }
waitrt?
until buffer.empty?
put buffer.shift
end
}
It's something I just threw together off-hand, so if there're tiny little errors, don't be surprised. It's a foundation, if nothing else.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.