;=================================================================
; Script Name: TrailMyx's Advanced Journal Scanner
; Author: TrailMyx
; Version: 1.0
; Shard OSI / FS: OSI / FS?
; Revision Date: 10/20/2007
; Purpose:
; Use these subs to quickly find text in your #journal entries. These subs
; use #jindex for flawless journal scanning and is much more reliable than using
; standard indexing of #journal and #SYSMSG.
;
; Now it is possible to manage separate journals based on unrelated text. It's now possible
; to monitor spellcasting, bandaging, stealing, or anything else without a TM_AdvJournalSync
; potentially removing text needed for another UO funciton.
;
; New is the ability to either gosub or call these functions without the need to change the
; header! When calling, a limit of 10 arguments is allowed, but more can be added by editing the
; call interface section.
;
; Examples:
; gosub TM_AdvJournalSync speech 100 ; sync "speech" journal space, set #LPC to 100 from default of 1000
; gosub TM_AdvJournalScan speech VALID Find_this_text and_find_this_too ; will not advance copy of #jindex
; gosub TM_AdvJournalScan heal VALID_ADVANCE you_heal_what that_patient_is_not ; advances pointer after scan
; gosub TM_AdvJournalScan spellcast NONE fizzle ; no spam checking and doesn't advance #jindex copy automatically
;
; Subs included:
; TM_AdvJournalSync - Must call this in initialzation
; TM_AdvJournalScan - see header for details....
;
; Release history:
; v1.0 - Initial release.
;
; Requirements:
; Nothing special
;
; Credit:
; If you use these subs, please leave credit for me somewhere in your script header.
;=================================================================
gosub TM_AdvJournalScan heal VALID_ADVANCE you_heal_what that_patient_is_not
gosub TM_AdvJournalScan heal VALID you_heal_what that_patient_is_not
if #RESULT = #TRUE
{
gosub TM_AdvJournalSync heal
.. do something about it..
}
gosub TM_AdvJournalSync heal 100
gosub TM_AdvJournalSync CastSpell 100
gosub TM_AdvJournalScan heal VALID_ADVANCE you_heal_what that_patient_is_not
gosub TM_AdvJournalScan heal VALID you_heal_what that_patient_is_not
if #RESULT = #TRUE
{
gosub TM_AdvJournalSync heal
.. do something about it..
}
gosub TM_AdvJournalSync heal 100
gosub TM_AdvJournalSync CastSpell 100
lol.. I thought I was the only one that liked to play tricks on Scripters....
For not having much time this is a tremendous help for me too! You should consider moving this to the Journal Scanning thread, perhaps as part of the initial post so it isn't overlooked. For some reason I have always had difficulty grasping the concept of the "journal name" or the first argument and what it is used for and these subs have already made their way into any script I've needed journal scanning for.
XII
gosub TM_AdvJournalSync Testor 100
gosub TM_AdvJournalSync Testor
REPEAT
event macro 1 0 Test Message
wait 30
gosub TM_AdvJournalScan Testor ADVANCE Test_Message
wait 20
UNTIL #Result = True
Display SUCCESS!!!!
halt
I am just tired I think.
gosub TM_AdvJournalSync
Repeat
{
Code that Does what I need done and produces a journal entry
gosub TM_AdvJournalScan NAME NONE JOURNAL_TEXT_SOUGHT
}
Until #Result = #True
gosub TM_AdvJournalSync NAME 100
Repeat
gosub TM_AdvJournalScan NAME NONE JOURNAL_TEXT_SOUGHT
if #RESULT = #TRUE
{
; handle JOURNAL_TEXT_SOUGHT
gosub TM_AdvJournalSync NAME
}
gosub TM_AdvJournalScan NAME NONE SOMETHING_ELSE
if #RESULT = #TRUE
{
; handle SOMETHING_ELSE
gosub TM_AdvJournalSync NAME
}
Until #FALSE
gosub TM_AdvJournalSync SCANNER1 100
gosub TM_AdvJournalSync SCANNER2 100
Repeat
gosub TM_AdvJournalScan SCANNER1 NONE JOURNAL_TEXT_SOUGHT
if #RESULT = #TRUE
{
; handle JOURNAL_TEXT_SOUGHT
gosub TM_AdvJournalSync SCANNER1
}
gosub TM_AdvJournalScan SCANNER2 NONE SOMETHING_ELSE
if #RESULT = #TRUE
{
; handle SOMETHING_ELSE
gosub TM_AdvJournalSync SCANNER2
}
Until #FALSE
set !first_arg 3
To THIS: ;Katu ADD
if VALID in !args
{
set !charname %3
set !first_arg 4
}
else
set !first_arg 3
And now, if using VALID arg, you call sub like this:gosub TM_AdvJournalScan network VALID_ADVANCE Friend_Char_Name You_are_invited_to_join_the_party.
I understand this very well but something I haven't picked up on yet is "#LPC"
im guessing its like lines per count? and the smaller the number following it means smaller search range for more accuracy search time? I hate guessing at things that might be obvious but Id really like someone to let me know for sure =)
wow i just read it over there and its alot easier to understand but putting it to use in other situations is probably harder than this journal scanner but again ty Twinkle McNugget!
Method count: 56
Command count: 56
*** Pass 1 - Label accounting:
*** Warning - GOSUB %1 - Line 220 has no matching SUBroutine
*** Warning - GOSUB %1 - Line 222 has no matching SUBroutine
*** Warning - GOSUB %1 - Line 224 has no matching SUBroutine
*** Warning - GOSUB %1 - Line 226 has no matching SUBroutine
*** Warning - GOSUB %1 - Line 228 has no matching SUBroutine
*** Warning - GOSUB %1 - Line 230 has no matching SUBroutine
*** Warning - GOSUB %1 - Line 232 has no matching SUBroutine
*** Warning - GOSUB %1 - Line 234 has no matching SUBroutine
*** Warning - GOSUB %1 - Line 236 has no matching SUBroutine
*** Warning - GOSUB %1 - Line 238 has no matching SUBroutine
*** Warning - GOSUB %1 - Line 240 has no matching SUBroutine
Subroutine labels = 5
Tag labels = 2
18 Code block(s).
11 Warnings(s) encountered.
*** Pass 2 - Execution [SYNTAXCHECK]
I've used this for the first time in the Ter Mur lumber I wrote, and I must say, I love this!
Thank you very much for sharing!
gosub TM_AdvJournalScan fish VALID_ADVANCE You_pull_out Your_fishing_pole_bends_as_you You_fish_a_while,_but_fail Your_fishing_pole_nearly_breaks! You_struggle_and_fight_to_pull
if #result = #true
return CONTINUE
gosub TM_AdvJournalScan fish VALID_ADVANCE The_fish_don't_seem_to_be_biting
if #result = #true
return MOVE
gosub TM_AdvJournalScan fish VALID_ADVANCE You_pull_out Your_fishing_pole_bends_as_you You_fish_a_while,_but_fail Your_fishing_pole_nearly_breaks! You_struggle_and_fight_to_pull The_fish_don't_seem_to_be_biting
if #result in You_pull_out_Your_fishing_pole_bends_as_you_You_fish_a_while,_but_fail_Your_fishing_pole_nearly_breaks!_You_struggle_and_fight_to_pull
return CONTINUE
if #result = The_fish_don't_seem_to_be_biting
return MOVE
sub setup
gosub TM_AdvJournalSync snake 100
retrun
gosub TM_AdvJournalScan snake VALID You_don't_seem_to_be_able_to_persuade_that_to_move.
if #RESULT = #TRUE
{
return UseFlute
}
gosub TM_AdvJournalScan snake VALID The_animal_walks_where_it_was_instructed_to.
if #RESULT = #TRUE
{
ignoreitem %snake
wait 5s
return UseFlute
}
gosub TM_AdvJournalScan snake VALID the_nest_collapses
if #RESULT = #TRUE
{
gosub ignore
return targethole
}
sub ignore
deletejournal
ignoreitem reset
return
sub setup
gosub TM_AdvJournalSync snake 100
return ; note the mispelling.....
gosub TM_AdvJournalScan snake VALID You_don't_seem_to_be_able_to_persuade_that_to_move.
if #RESULT = #TRUE
{
gosub TM_AdvJournalSync snake
return UseFlute
}
gosub TM_AdvJournalScan snake VALID The_animal_walks_where_it_was_instructed_to.
if #RESULT = #TRUE
{
gosub TM_AdvJournalSync snake
ignoreitem %snake
wait 5s
return UseFlute
}
gosub TM_AdvJournalScan snake VALID the_nest_collapses
if #RESULT = #TRUE
{
gosub TM_AdvJournalSync snake
gosub ignore
return targethole
}
sub ignore
; deletejournal ; nope, don't do this....
ignoreitem reset
return
gosub TM_AdvJournalScan snake VALID_ADVANCE You_don't_seem_to_be_able_to_persuade_that_to_move.
if #RESULT = #TRUE
{
return UseFlute
}
gosub TM_AdvJournalScan snake NONE persuade_that_to_move
if #RESULT = #TRUE
{
gosub TM_AdvJournalSync snake
return UseFlute
}
; 1
gosub TM_AdvJournalScan snake VALID_ADVANCE to_persuade_that_to_move it_to_recharge ; looking for two action here
if #RESULT = #TRUE
{
gosub TM_AdvJournalSync snake
wait 6s
goto UseFlute
}
; 2
gosub TM_AdvJournalScan snake VALID_ADVANCE The_animal_walks already_taming where_it_was_instructed_to. ; looking for two action here
if #RESULT = #TRUE
{
gosub TM_AdvJournalSync snake
ignoreitem %snake
wait 6s
goto UseFlute
}
; 3
gosub TM_AdvJournalScan snake VALID_ADVANCE the_nest_collapses Target_cannot_be_seen
if #RESULT = #TRUE
{
gosub TM_AdvJournalSync snake
gosub ignore
Return ; go back to beginning to target a new hole
}
sub HuntEgg
UseFlute:
gosub TM_AdvJournalScan snake VALID_ADVANCE the_nest_collapses Target_cannot_be_seen
if #RESULT = #TRUE
{
gosub TM_AdvJournalSync snake
; pause
gosub ignore
Return ; go back to beginning to target a new hole
}
finditem %flute C_ , #BACKPACKID ; Charmer Flute
event property #findid
if Charmer in #property
set %flute #findid ; find only charmer flute
else
{
ignoreitem #findid
event macro 8 7 ; Open main pack
wait 15
contpos 1050 320
goto UseFlute
}
set #lobjectid %flute
event macro 17 0
;======================================================
; S Goto Target Snake
;======================================================
FindSnake:
finditem %snakes G_10
set #ltargetid #findid
set #ltargetkind 1
set %snake #findid
; if %snakes <> #ltargetid
; event exmsg %snakes 3 30 Pick
target
event macro 22 ; Last Target
; event exmsg %snakes 3 30 Pick
wait 5
click %lootx %looty d
wait 1s
gosub TM_AdvJournalScan snake VALID_ADVANCE to_persuade_that_to_move it_to_recharge
if #RESULT = #TRUE
{
gosub TM_AdvJournalSync snake
; pause
wait 6s
goto UseFlute
}
gosub TM_AdvJournalScan snake VALID_ADVANCE The_animal_walks already_taming where_it_was_instructed_to.
if #RESULT = #TRUE
{
gosub TM_AdvJournalSync snake
ignoreitem %snake
; pause
wait 6s
goto UseFlute
}
goto UseFlute
;======================================================
; Sub Ignor snake
;======================================================
sub ignore
ignoreitem reset ;Reset all snake
return
;============
gosub TM_AdvJournalScan detect ADVANCED Detecting_Hidden
MSG #result $
finditem IS G_5 ;friend's char type IS
if #findkind <> -1
set #lobjectid #findID
event macro 17 ;last object
wait 25
set #lobjectid UYNKSND ; friend's backpak id
Event Macro 17 0
wait 1s
gosub TM_AdvJournalScan snoop ADVANCE Snooping
wait 10
if #RESULT = #FALSE
msg #result $
if #RESULT = #TRUE
msg #result $
halt
gosub TM_AdvJournalSync snoop 100
I'm assuming you're including the subroutines at the end of your code? Also, what is the trigger text values you're looking for? I see you're looking for "snooping", but what's the full text?
Finally, you should initialize the routine at the beginning of your script. Include this line:Code: [Select]gosub TM_AdvJournalSync snoop 100
I just can't get this to work
I want to add this to Raziel's BOD gathering script.
I added these two lines at the beginning of the script;Code: easyuo
gosub TM_AdvJournalSync travel 100 gosub TM_AdvJournalSync bod 100
Then this in the BOD collecting subroutine;Code: easyuo
gosub TM_AdvJournalScan bod VALID_ADVANCE An_offer_may be_available if #result = #true { namespace pop return #true }
I want it to move on to the next !bodType if too early to get another same type of BOD. I have it set to gather three BODs at a time currently.
I just can't get this to work
I want to add this to Raziel's BOD gathering script.
I added these two lines at the beginning of the script;Code: easyuo
gosub TM_AdvJournalSync travel 100 gosub TM_AdvJournalSync bod 100
Then this in the BOD collecting subroutine;Code: easyuo
gosub TM_AdvJournalScan bod VALID_ADVANCE An_offer_may be_available if #result = #true { namespace pop return #true }
I want it to move on to the next !bodType if too early to get another same type of BOD. I have it set to gather three BODs at a time currently.
Instead of "VALID_ADVANCE" just try "ADVANCE"
Obvious question.... Have you tacked the two subs of mine to the end of your code somewhere?
Yep
Hehe. I know. You had to ask.
Did you mean for this:Code: easyuo
gosub TM_AdvJournalScan bod ADVANCE An_offer_may be_available
to be 2 entires? An_off_may and be_available
Did you mean:Code: easyuo
gosub TM_AdvJournalScan bod ADVANCE An_offer_may_be_available
Did you mean for this:Code: easyuo
gosub TM_AdvJournalScan bod ADVANCE An_offer_may be_available
to be 2 entires? An_off_may and be_available
Did you mean:Code: easyuo
gosub TM_AdvJournalScan bod ADVANCE An_offer_may_be_available
I've watched it some.
But no not that I've noticed. I'll go thru it and pay close attention to it.
I've watched it some.
But no not that I've noticed. I'll go thru it and pay close attention to it.
I ask because I see you play a freeshard and I'm not sure what era your shard does. Not sure if journal scanning works on your shard like it does on later era shards and OSI.
Oh, I bet my profile still says I play ABCUO. I'm on EA specifically Siege Perilous and Pacific occasionally.
Are you running EasyUO as administrator?
Your TEST works perfectly.
Are you running EasyUO as administrator?