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

0 Members and 1 Guest are viewing this topic.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • 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: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Advanced Journal Handler
« Reply #75 on: January 06, 2020, 12:14:28 PM »
0
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.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Tommy Boy

  • Jr. Member
  • **
  • Posts: 79
  • Activity:
    0%
  • Reputation Power: 2
  • Tommy Boy has no influence.
  • Respect: +14
  • Referrals: 0
    • View Profile
Re: TrailMyx's Advanced Journal Handler
« Reply #76 on: January 06, 2020, 12:16:55 PM »
0
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 again.
« Last Edit: January 06, 2020, 01:54:10 PM by Tommy Boy »

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • 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: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Advanced Journal Handler
« Reply #77 on: January 06, 2020, 12:20:28 PM »
0

Oh, I bet my profile still says I play ABCUO.  I'm on EA specifically Siege Perilous and Pacific occasionally.

Should definitely work on EA.  Check that #JOURNAL values change.  I can't verify on EA; I haven't had an account there for several years now.  I do know it works just fine on Lexia.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • 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: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Advanced Journal Handler
« Reply #78 on: January 06, 2020, 12:26:08 PM »
0
Here's a quick test script.  Just type "hello" in your chat and it should pop up with "hello" everytime you type hello

I just tested this on Lexia, so I know it works.

Code: easyuo
  1. gosub TM_AdvJournalSync test 100
  2.  
  3. repeat
  4.   gosub TM_AdvJournalScan test ADVANCE hello
  5.   if #RESULT = #TRUE
  6.   {
  7.     display ok Hello
  8.   }
  9. until #FALSE
  10. ;-------------------------------------------------------------------------------
  11. ; %1 - Journal Name
  12. ; %2 - #LPC setting (optional)
  13. ; Brings !_jindex up to the most recent #journal entry
  14. sub TM_AdvJournalSync
  15.   namespace push
  16.   namespace local TM_AdvJS_ , %1
  17.   set !_jindex #jindex + 1
  18.   if %0 > 1
  19.     set !lpc_set %2
  20.   namespace pop
  21.   set !TM_FunctionCalled #TRUE
  22. return
  23. ;-------------------------------------------------------------------------------
  24. ; %1 - Journal Name
  25. ; %2 - NONE, ADVANCE , ( _VALID ) - advances jindex pointer, anything else
  26. ; %3, %4, %5, etc strings to match
  27. ; returns #TRUE for match, #FALSE for no match
  28. ;  Will not advance !_jindex pointer to allow for scanning journal history for more than one search.
  29. ;  Also searches for : , #SPC in journal entry to be sure someone isn't spamming the text
  30. ;  About %2 arguments:
  31. ;    NONE: defaults to basic journal scan (no SPAM checking, no #jindex pointer copy advancing)
  32. ;    ADVANCE: no spam checking, advances #jindex copy
  33. ;    VALID: invokes SPAM filtering, no advance of #jindex copy
  34. ;    VALID_ADVANCE, VALIDADVANCE, ADVANCE_VALID, etc.: invokes SPAM filtering, advances of #jindex copy
  35. sub TM_AdvJournalScan
  36.   namespace push
  37.   namespace local TM_AdvJS_ , %1
  38.   set !args %2
  39.   set !temp_lpc #LPC
  40.   if !lpc_set = N/A
  41.     set #LPC 1000
  42.   else
  43.     set #LPC !lpc_set
  44.   set !num_args %0
  45.   set !first_arg 3
  46.   set !sampled_jindex #JINDEX
  47.   if !_jindex = N/A
  48.     set !_jindex !sampled_jindex
  49.   if !charname = N/A
  50.   {
  51.     set !charname #CHARNAME
  52. AdvJournalScan_loop1:
  53.     str pos !charname #SPC
  54.     if #STRRES <> 0
  55.     {
  56.       set !val #STRRES - 1
  57.       str left !charname !val
  58.       set !left #STRRES
  59.       set !val !val + 1
  60.       str del !charname 1 !val
  61.       set !charname !left , _ , #STRRES
  62.       goto AdvJournalScan_loop1
  63.     }
  64.   }
  65.   set !index !first_arg
  66.   repeat
  67.     set !temp_jindex !_jindex
  68.     set !text % . !index
  69.     while !temp_jindex <= !sampled_jindex
  70.     {
  71.       scanjournal !temp_jindex
  72.       str pos #JOURNAL !charname 1
  73.       set !namepos #STRRES
  74.       str count #JOURNAL !charname
  75.       set !namecnt #STRRES
  76.       str pos #JOURNAL :_ 1
  77.       set !smcpos #STRRES
  78.       str pos #JOURNAL !text 1
  79.       set !textpos #STRRES
  80.       if !textpos < !smcpos && !smcpos <> 0 || !smcpos = 1 || :_ notin #JOURNAL || VALID notin !args
  81.         set !pass #TRUE
  82.       else
  83.         set !pass #FALSE
  84.       if ( !text in #journal && ( ( !namepos = 1 && !namecnt <= 1 ) || !pass ) )
  85.       {
  86.         set !temp_jindex !temp_jindex + 1
  87.         if ADVANCE in !args
  88.           set !_jindex !temp_jindex
  89.         set !trigger !text
  90.         set #LPC !temp_lpc
  91.         namespace pop
  92.         set !TM_FunctionCalled #TRUE
  93.         return #TRUE
  94.       }
  95.       set !temp_jindex !temp_jindex + 1
  96.     }
  97.     set !index !index + 1
  98.   until !index - !first_arg > !num_args - !first_arg
  99.   set %10 !sampled_jindex - !_jindex
  100.   set %10 %1 , _ , %10 ; for debugging purposes
  101.   set #LPC !temp_lpc
  102.   set TM_AdvJournalGetTrigger #FALSE
  103.   namespace pop
  104.   set !TM_FunctionCalled #TRUE
  105. return #FALSE
  106. ;-------------------------------------------------------------------------------
  107.  
  108.  
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Tommy Boy

  • Jr. Member
  • **
  • Posts: 79
  • Activity:
    0%
  • Reputation Power: 2
  • Tommy Boy has no influence.
  • Respect: +14
  • Referrals: 0
    • View Profile
Re: TrailMyx's Advanced Journal Handler
« Reply #79 on: January 06, 2020, 12:29:21 PM »
0
I stepped thru it several times.

It loops thru the while/until section like 20+ times and #JOURNAL is N/A always never changes.

Each time it returns and asks for a BOD again and your scanner is called #JINDEX does increase +1

Here's a screenie of my journal


There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
UO0109.jpg

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • 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: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Advanced Journal Handler
« Reply #80 on: January 06, 2020, 12:32:14 PM »
0
Are you running EasyUO as administrator?
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Tommy Boy

  • Jr. Member
  • **
  • Posts: 79
  • Activity:
    0%
  • Reputation Power: 2
  • Tommy Boy has no influence.
  • Respect: +14
  • Referrals: 0
    • View Profile
Re: TrailMyx's Advanced Journal Handler
« Reply #81 on: January 06, 2020, 12:33:31 PM »
0
Are you running EasyUO as administrator?

Pretty sure I am.

I'll dbl check.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • 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: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Advanced Journal Handler
« Reply #82 on: January 06, 2020, 12:35:01 PM »
0
#JOURNAL should be changing constantly, especially with that test code.  If not, then EasyUO isn't connecting correctly to your client. 
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Tommy Boy

  • Jr. Member
  • **
  • Posts: 79
  • Activity:
    0%
  • Reputation Power: 2
  • Tommy Boy has no influence.
  • Respect: +14
  • Referrals: 0
    • View Profile
Re: TrailMyx's Advanced Journal Handler
« Reply #83 on: January 06, 2020, 12:36:01 PM »
0
Your TEST works perfectly.

Shows "hello"  in #journal too

« Last Edit: January 06, 2020, 12:38:21 PM by Tommy Boy »

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • 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: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Advanced Journal Handler
« Reply #84 on: January 06, 2020, 12:38:13 PM »
0
Your TEST works perfectly.

I guess you can just take and try to expand that test code and see if you can make it work from within your own code.  Shouldn't be much different, but at least you have a working platform to leap from.  :)
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Tommy Boy

  • Jr. Member
  • **
  • Posts: 79
  • Activity:
    0%
  • Reputation Power: 2
  • Tommy Boy has no influence.
  • Respect: +14
  • Referrals: 0
    • View Profile
Re: TrailMyx's Advanced Journal Handler
« Reply #85 on: January 06, 2020, 01:03:48 PM »
0
Are you running EasyUO as administrator?

Holy crap!

So I have two shortcuts to easyuo on my desktop and both are setup in compatibility mode to "run as administrator."
I used one of those shortcuts to put a link in my startmenu.  I use that most of the time as my desktop is always covered.
Apparently that startmenu shortcut was NOT running as administrator.  I right clicked it and manually chose to Run as Admin and the damn thing works now.
I've been Fing with this for 15 hours now.  Damn!

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • 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: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Advanced Journal Handler
« Reply #86 on: January 06, 2020, 02:08:08 PM »
0
When you said that #JOURNAL was returning "N/A", I was pretty sure that's the problem.  It's really the first thing I check now when I start up EasyUO.  Just check your character stats and if they aren't returning anything that you'd expect, there's a good chance that you didn't get admin rights applied.

No worries, I do it from time to time myself.  But after you get hit by the same bus a few times, one tends to try and step aside.  :) 
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline lit2fly

  • Jr. Member
  • **
  • Posts: 10
  • Activity:
    0%
  • Reputation Power: 1
  • lit2fly has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: TrailMyx's Advanced Journal Handler
« Reply #87 on: August 21, 2020, 02:30:15 AM »
0
My char has Lord title, while #CHARNAME will return Lord XXX, in journal the title Lord doesn't show up so the Journal scanning missed the detection. (actually I hit this issue when using your own full-auto fisherman script, in which it can't detect "the fish doesn't seem to be biting here" and keep fishing the same spot)

I made a quick dirty fix and the journal scan works again:


  if !charname = N/A
  {
    if lord in #charname || lady in #charname
    {
       str len #charname
       str mid #charname 6 #strres
    }

    set !charname #strres
« Last Edit: August 25, 2020, 07:46:22 PM by lit2fly »

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • 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: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Advanced Journal Handler
« Reply #88 on: August 25, 2020, 01:37:23 PM »
0
Quick and dirty, but perfect for those with the same Lord or Lady problem.  Thanks for sharing that.
Please read the ScriptUO site RULES
Come play RIFT with me!