Author Topic: TrailMyx's Advanced Journal Handler  (Read 26534 times)

0 Members and 1 Guest are viewing this topic.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13169
  • Activity:
    0.4%
  • Reputation Power: 153
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1346
  • Referrals: 32
    • View Profile
    • ScriptUO
TrailMyx's Advanced Journal Handler
« on: June 09, 2008, 01:01:15 PM »
0
Code: [Select]
;=================================================================
; 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.
;=================================================================

... Snipped from another thread...

By this example:

Code: [Select]
gosub TM_AdvJournalScan heal VALID_ADVANCE you_heal_what that_patient_is_not

The first argument "heal" what you are calling this particular journal scanner.  Since you can have different scanners looking for different things and behaving differently, then you can set this.  An example of multiple journal scanners is perhaps you are looking for journal information that's spell casting related, but another part of your script is looking for journal output that's healing related.  Now you can separate these.

The second argument can be the following values:

NONE: defaults to basic journal scan (no SPAM checking, no #jindex pointer copy advancing)
ADVANCE: no spam checking, advances #jindex copy
VALID: invokes SPAM filtering, no advance of #jindex copy
VALID_ADVANCE, VALIDADVANCE, ADVANCE_VALID, etc.: invokes SPAM filtering, advances of #jindex copy

arguments after the first and the second are considered strings you will be searching for to appear in your journal.

About SPAM filtering:

With the NONE option, the script will not filter the journal and will agree with any resulting match with the list your supply as arguments.  

With the VALID option, the script will compare several criterion to the text found within your journal.  These criteria are:
(Joe_Spammer is a fictional grief player trying to mess with your script)

1) Journal entry does not contain ":_" i.e. "Joe_Spammer:_you_heal_what" <will not trigger>
2) Journal entry does contain ":_", but is the first text <this will pass, example boat commands, taming>
3) Journal entry does contain "Your_Charname:_you_heal_what..." <this will pass, since YOU said it.>
4) Journal entry does contain "Joe_Spammer:_Your_Charname:_you_heal_what" <this will not pass because your character name did not come first>

Note there are combinations of the above examples, and may require you to play with it a bit.

With the ADVANCE option, the script will automatically sync the jindex copy when you do a search.  There are times however when you might want to search the same journal information again for another trigger word, so you can sync by hand by:

Code: [Select]
gosub TM_AdvJournalScan heal VALID you_heal_what that_patient_is_not
if #RESULT = #TRUE
{
  gosub TM_AdvJournalSync heal
  .. do something about it..
}

Finally, you notice that most of my scripts will call TM_AdvJournalSync at the beginning of the script execution for each journal scanner, but will include a number for the second argument:

Code: [Select]
 gosub TM_AdvJournalSync heal 100
  gosub TM_AdvJournalSync CastSpell 100

This is just setting the default #LPC for each scanner.  If you have time-critical needs, you may invoke faster scanning for subsequent TM_AdvJournalScan calls.

There are 2 attachment(s) in this post. You must register and post an acceptable introduction to download
tool_advancedjournalscan11.txt
tool_advancedjournalscan12.txt
« Last Edit: January 11, 2012, 07:26:40 PM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline rana70

  • Elite
  • *
  • *
  • Posts: 294
  • Activity:
    0%
  • Reputation Power: 5
  • rana70 has no influence.
  • Gender: Male
  • Respect: +37
  • Referrals: 2
    • View Profile
    • MyScripts
Re: TrailMyx's Advanced Journal Handler
« Reply #1 on: August 04, 2008, 11:00:57 AM »
0
Hi TM,

I look for a howto for your TrailMyx's Advanced Journal Scanner SUB.

I am not really sure how to use it ....
My Basic problems are ....
- What does this 1st Parameter mean ? Journal Name
- What exactly does the Sync do

I use a pathfind command and I would like to monitor the journal
to catch a "can't_get_there" Msg from the journal and
somehow I was to stupid to figure it out on my own

So I looked around on EUO and here but without to much luck as you can see

Thx
 

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13169
  • Activity:
    0.4%
  • Reputation Power: 153
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1346
  • Referrals: 32
    • View Profile
    • ScriptUO
Re: TrailMyx's Advanced Journal Handler
« Reply #2 on: August 04, 2008, 11:52:03 AM »
0
Hum, yeh, there's a bit of tribal knowledge there.  I need to impart it somehow.  I don't have time this afternoon, but perhaps I can whip up a little how-to this evening.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline rana70

  • Elite
  • *
  • *
  • Posts: 294
  • Activity:
    0%
  • Reputation Power: 5
  • rana70 has no influence.
  • Gender: Male
  • Respect: +37
  • Referrals: 2
    • View Profile
    • MyScripts
Re: TrailMyx's Advanced Journal Handler
« Reply #3 on: August 04, 2008, 11:56:40 AM »
0
Would be great ....

I will wait for it np

thx

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13169
  • Activity:
    0.4%
  • Reputation Power: 153
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1346
  • Referrals: 32
    • View Profile
    • ScriptUO
Re: TrailMyx's Advanced Journal Handler
« Reply #4 on: August 04, 2008, 08:25:20 PM »
0
Ok, so I don't have a lot of time this evening, but I said I'd give some information.  So hopefully this will help a bit.

By this example:

Code: [Select]
gosub TM_AdvJournalScan heal VALID_ADVANCE you_heal_what that_patient_is_not

The first argument "heal" what you are calling this particular journal scanner.  Since you can have different scanners looking for different things and behaving differently, then you can set this.  An example of multiple journal scanners is perhaps you are looking for journal information that's spell casting related, but another part of your script is looking for journal output that's healing related.  Now you can separate these.

The second argument can be the following values:

NONE: defaults to basic journal scan (no SPAM checking, no #jindex pointer copy advancing)
ADVANCE: no spam checking, advances #jindex copy
VALID: invokes SPAM filtering, no advance of #jindex copy
VALID_ADVANCE, VALIDADVANCE, ADVANCE_VALID, etc.: invokes SPAM filtering, advances of #jindex copy

arguments after the first and the second are considered strings you will be searching for to appear in your journal.

About SPAM filtering:

With the NONE option, the script will not filter the journal and will agree with any resulting match with the list your supply as arguments. 

With the VALID option, the script will compare several criterion to the text found within your journal.  These criteria are:
(Joe_Spammer is a fictional grief player trying to mess with your script)

1) Journal entry does not contain ":_" i.e. "Joe_Spammer:_you_heal_what" <will not trigger>
2) Journal entry does contain ":_", but is the first text <this will pass, example boat commands, taming>
3) Journal entry does contain "Your_Charname:_you_heal_what..." <this will pass, since YOU said it.>
4) Journal entry does contain "Joe_Spammer:_Your_Charname:_you_heal_what" <this will not pass because your character name did not come first>

Note there are combinations of the above examples, and may require you to play with it a bit.

With the ADVANCE option, the script will automatically sync the jindex copy when you do a search.  There are times however when you might want to search the same journal information again for another trigger word, so you can sync by hand by:

Code: [Select]
gosub TM_AdvJournalScan heal VALID you_heal_what that_patient_is_not
if #RESULT = #TRUE
{
  gosub TM_AdvJournalSync heal
  .. do something about it..
}

Finally, you notice that most of my scripts will call TM_AdvJournalSync at the beginning of the script execution for each journal scanner, but will include a number for the second argument:

Code: [Select]
  gosub TM_AdvJournalSync heal 100
  gosub TM_AdvJournalSync CastSpell 100

This is just setting the default #LPC for each scanner.  If you have time-critical needs, you may invoke faster scanning for subsequent TM_AdvJournalScan calls.
« Last Edit: August 04, 2008, 08:29:30 PM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13169
  • Activity:
    0.4%
  • Reputation Power: 153
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1346
  • Referrals: 32
    • View Profile
    • ScriptUO
Re: TrailMyx's Advanced Journal Handler
« Reply #5 on: August 04, 2008, 08:53:56 PM »
0
Oh, and BTW, there have been several times when I thought I found a bug in these, only to find out I had misspelled my trigger works, or was improperly using the VALID option.  What's saved me is a bit of test code, and having a second account to "spam" my script to see if it triggers.  So if you are having problems, start small and use the debugger closely.  I always grumble with I misspell something.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3640
  • Activity:
    0%
  • Reputation Power: 40
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +319
  • Referrals: 2
    • View Profile
Re: TrailMyx's Advanced Journal Handler
« Reply #6 on: August 05, 2008, 03:13:25 AM »
0
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
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline Xclio

  • Officially "The MAN"
  • Elite
  • *
  • *
  • Posts: 981
  • Activity:
    0%
  • Reputation Power: 9
  • Xclio has no influence.
  • Gender: Male
  • Respect: +56
  • Referrals: 1
    • View Profile
Re: TrailMyx's Advanced Journal Handler
« Reply #7 on: August 05, 2008, 05:29:43 AM »
0
I've been wanting to use these in my tamer for a while but I haven't ever managed to get them straight in my head yet, so hopefully I can use this and make it work :)

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13169
  • Activity:
    0.4%
  • Reputation Power: 153
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1346
  • Referrals: 32
    • View Profile
    • ScriptUO
Re: TrailMyx's Advanced Journal Handler
« Reply #8 on: August 05, 2008, 07:46:43 AM »
0
These work really well for tamer scripts.  I remember one time I was out "messing" with an obvious scripter.  I would run up and say "you have no chance" and he would keep wandering around.  Eventually I got him over to the Juka without taming a single thing.  The Juka took care of the rest.  ;)  If he would have used this scanner, then I would have been foiled, tipped my scripter's hat and moved on to find my next crappy scripter victim.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Xclio

  • Officially "The MAN"
  • Elite
  • *
  • *
  • Posts: 981
  • Activity:
    0%
  • Reputation Power: 9
  • Xclio has no influence.
  • Gender: Male
  • Respect: +56
  • Referrals: 1
    • View Profile
Re: TrailMyx's Advanced Journal Handler
« Reply #9 on: August 05, 2008, 09:28:52 AM »
0
Yeah that is the exact reason i want to use it in my tamer script so that it can prevent stuff like that :)

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: TrailMyx's Advanced Journal Handler
« Reply #10 on: August 05, 2008, 07:51:26 PM »
0
lol.. I thought I was the only one that liked to play tricks on Scripters....

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13169
  • Activity:
    0.4%
  • Reputation Power: 153
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1346
  • Referrals: 32
    • View Profile
    • ScriptUO
Re: TrailMyx's Advanced Journal Handler
« Reply #11 on: August 05, 2008, 08:23:07 PM »
0
lol.. I thought I was the only one that liked to play tricks on Scripters....

Oh no, I love f*cking with scripters!!  It's a community service to help them to learn to script better.  hehe
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Xclio

  • Officially "The MAN"
  • Elite
  • *
  • *
  • Posts: 981
  • Activity:
    0%
  • Reputation Power: 9
  • Xclio has no influence.
  • Gender: Male
  • Respect: +56
  • Referrals: 1
    • View Profile
Re: TrailMyx's Advanced Journal Handler
« Reply #12 on: August 06, 2008, 05:15:40 AM »
0
Screwing with people that are scripting is hilarious!  I think TM and I have a similar philosophy.  If I can know you are scripting and I can break your script then it needs improvement ;)

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13169
  • Activity:
    0.4%
  • Reputation Power: 153
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1346
  • Referrals: 32
    • View Profile
    • ScriptUO
Re: TrailMyx's Advanced Journal Handler
« Reply #13 on: August 06, 2008, 10:14:15 AM »
0
Some scripters out there kinda get their panties in a bunch when you hear of one scripter messing with another.  It's like we have a code of honor or something.  I'm no thief. My code only includes respect of a good scripter.  When I determine that a person is running a quality script, I will just leave them be. 
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: TrailMyx's Advanced Journal Handler
« Reply #14 on: August 08, 2008, 03:52:31 PM »
0
my Favorite was/is Killing 8x8'er on there own boat.