I'm sure a lot of you know I'm working on a mule gatherer script, and while I'm working out the kinks on my endless tinker tools sub I thought I'd start a disussion on travel subs. All this is in EUO, but the biggest problems I'm running into are UO related, and should apply to whatever you're using for scripts (unless it has built in spellcast waits and such).
First, let me describe what I believe to be an EUO limitation:
Sometimes the #ltargetid/event macro 22 0 screws up... it just doesn't target. I had a lot of problems with this in TM's travel sub, which was one of the contributing factors for me to try and make my own... At this point I'm convinced that event macro 22 0 just plain sucks, so I have a little bit of gosub travel spam in my script to compensate for when it fails. Don't think I can do much else at this point... whatever... it's fine enough... the fails are few and far between.
Second, and the crux of my issues, is cast recovery:
I've toyed with my journal scanner *a little bit* to no avail. The problem is I keep getting "You have not recovered..." which makes it loop, until it hits my *fix* which returns from the sub when "That location is blocked," is displayed. Not the best fix, but solves the problem for my script, but much slower than what I'd like. I've put event sysmessages (for debugging) just about everywhere I can think of, but have hit a wall, and want to get the other parts of my script working in the meantime, since it "works," anyway. At this point, I think the sub is failing, because of my lack of understanding of Cast Recovery, and all my mules have 0 FCR. I think that other things are making "You have not recovered..." post, making my travel sub loop.
My goal is to have as many things as possible have non-static waits, and I strongly believe that travel is one of them.... I tried #charposx/y before and after travel, but the update seems to be real slow on charpos, as I wasn't able to get that to work at all... so right now, if it hits cast recovery, it loops one time until it returns "That location is blocked."
So, here's my travel sub so far... it's a little dirty, but I think that the meat is there. Oh, and it's only recall right now... just wanted to get this working.
recover:
set %jStart #jIndex
set %manacheck #mana
event macro 15 31 ;recall
target 5s
event macro 22 0
set %jEnd #jIndex
set %closerbx #contposx + 250
set %closerby #contposy + 130
if #contsize = 452_236
click %closerbx %closerby r
set %journalrange %jend - %jstart
event sysmessage scanrange = %journalrange
for %i %jStart %jEnd
{
scanjournal %i
if you_have_not in #journal || More_reagents in #journal
{
msg wait, wut?$
msg omg$
msg I'm so stupid...$
wait %recovertime
goto recover
}
if That_location in #journal
{
wait 10
return
}
}
if %manacheck <= #mana
goto recover
wait %recovertime
}
return
Thanks all. Just hoping to start a discussion on travel subs, and what they need to work flawlessly
Lydaan
edit* posted a non working travel sub... fixed