Slime Squisher
Posts: 387
Joined: Monday, 15th August 2011, 16:31
Location: Frankfurt
Lua: [More] when buffs are running out
I'd like to add something to my rc that forces a [more] prompt (or something functionally equivalent), whenever certain combat buffs such as Ozocubu's, Stoneskin, Shroud etc. are about to run out. But here's the catch: I want this only when I'm in combat. I suppose that could be done in Lua, could it? Would anybody give me some pointers?
I suppose, I can learn from autofight.lua how to check whether there is a monster in LoS. (It would be nice if this would trigger only if the situation provides some amount of challenge -- may be with the 'tension' system? -- but this is of secondary importance.)
Otherwise, I suppose I need a way to trigger the function. Is there a hook variable or something into which to put functions that run whenever there is a message?
I'd then have to find a way to force the player to hit <space> before any other action. But maybe I can figure that out based on the answer to that last question.
I suppose, I can learn from autofight.lua how to check whether there is a monster in LoS. (It would be nice if this would trigger only if the situation provides some amount of challenge -- may be with the 'tension' system? -- but this is of secondary importance.)
Otherwise, I suppose I need a way to trigger the function. Is there a hook variable or something into which to put functions that run whenever there is a message?
I'd then have to find a way to force the player to hit <space> before any other action. But maybe I can figure that out based on the answer to that last question.
"... while we / Unburden'd crawl toward death." -- King Lear I,1