Probably most of you here already have a sub to do this, but maybe not all...
Anyway, after all these years of knocking tables over, and bashing into walls and even occasionally running over the edge of my houses foundation - I decided that it was really stupid that I didn't write a little sub to ALWAYS have me WALK in my house - without me having to hit a freekin' key or click a menu every damn time... I mean if we can write scripts that fight or mine or whatever for us, then we should certainly be able to have our char always walk when he/she's in the damn house (and other places to, like the bank) - AUTOMATICALLY.
So I sat down and look'd at the wiki and it dawned on me that we have an event macro toggle for walk/run (I know - it's assigned to my F9 key and a button on damn near every menu I've got)...
And then I said to myself, hmmmmm.... that shows up as a message whenever it's toggled.... So why not have a sub that hits that toggle and then acts according to what it tells me?
And by jove, it works almost perfectly....
Here's where TM or EN or one of you elites can help me perfect this little bugger.... I have to almost try to get it to fail, but it will fail the way it is - which is, of course, unacceptable...
Here's what it does wrong:
IF I run it 2 or 3 times in a row, (so nothing is in the journal besides the walk/run off/on message) it will take the wrong action and switch wrongly.
I'm sure that it has to do with my usage of TM's TravelFromRunebook sub that it depends on to check the journal message....
What would be the correct parameter in this case?
Here's the sub:
Sub WalkAtHome
event macro 32 0 ;run On/Off
wait 3
gosub TM_AdvJournalScan WalkRun VALID_ADVANCE now_on
if #RESULT = #TRUE
{
event macro 32 0 ; Toggle it Off
wait 3
}
else
{
wait 1
}
Return
I know how Kal In Ex would code this.... His script would say: "If you're on any one of the tiles within this boundry, then you will walk."
Well, he's smarter than I am when it comes to this stuff...