PDA

View Full Version : Detect when I have changed rooms in the Confluence?



Goat
08-09-2016, 01:55 AM
I'm building a script to track RT from moving in the confluence. I'm doing fine for tracking the various RT amounts. The issue is tracking how many moves I've made overall, including ones that didn't result in RT.

I could check if current room ID is different than last known room ID (for every line), but that won't work in the confluence, where Room.current isn't set.
I could match "[Elemental Confluence]" and count that, but then I also pick up times I look or peer.
I could also match the times I enter a direction command, but then I also pick up the times I try to move and can't (RT, prone, etc).

I could maybe combine the two - get the next line after entering a direction command, and see if it matches [Elemental Confluence], but that still feels like it'll be brittle (e.g. creature attack comes in between when I enter the command and the move is registered).

Is there an obvious way to do this?

Tillmen
08-09-2016, 03:42 AM
Room.current should be set in the confluence, unless your map database is too old, or your Lich version is too old.

XMLData.room_count is probably what you want. It's incremented every time you change rooms.

Goat
08-09-2016, 03:49 AM
> or your Lich version is too old.
Oh, hm. Yeah. It's been what, 2 years since everyone was supposed to download "new lich"? I never did that. I have changed a couple lines of lich.rbw and worry that some of my own scripts might need tended to. But.. one of these days.

XMLData.room_count is perfect, though. Thanks.