Author Topic: Use of TrailMyx's Advanced Journal Scanner  (Read 2864 times)

0 Members and 1 Guest are viewing this topic.

Offline bajathiefTopic starter

  • Jr. Member
  • **
  • Posts: 23
  • Activity:
    0%
  • Reputation Power: 0
  • bajathief has no influence.
  • Respect: +10
  • Referrals: 0
    • View Profile
Use of TrailMyx's Advanced Journal Scanner
« on: April 02, 2009, 01:40:05 AM »
0
Hey TrailMyx, I am working on a script that will use your SUB to replace my scanjournal commands. My question is I give you credit and leave the sub as is but can I delete all the commented out lines to shorten the script or do you want them all to stay in? I am talking about the directions and stuff.
I tested it and so far it is working great on the journal scans. I was missing a lot before. My script looks for 7 possible journal entrys after an event and this one finds them all. Thanks for your outstanding SUB.


Bajathief

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13303
  • Activity:
    0.4%
  • 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: Use of TrailMyx's Advanced Journal Scanner
« Reply #1 on: April 02, 2009, 09:13:00 AM »
0
Sure, you can trim out the initial comments.  I never include them in my own scripts too.  Credit is all that's really required.

But I'm glad you like the subs; I'm surprised nobody ever made one quite like those.  Actually I need to update them; I found a little tiny corner-case where you might miss something when you are in the middle of running the subroutine. 
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline bajathiefTopic starter

  • Jr. Member
  • **
  • Posts: 23
  • Activity:
    0%
  • Reputation Power: 0
  • bajathief has no influence.
  • Respect: +10
  • Referrals: 0
    • View Profile
Re: Use of TrailMyx's Advanced Journal Scanner
« Reply #2 on: April 02, 2009, 09:19:04 AM »
0
After playing with it a while I finally got this to work.

Code: [Select]
gosub TM_AdvJournalScan result VALID if doesn't in #journal || if gas in #journal || if touch in #journal || if face in #journal || if purple in #journal || if flesh in #journal || if dart in #journal
if #RESULT = #TRUE
« Last Edit: April 02, 2009, 09:24:25 AM by Cerveza »

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13303
  • Activity:
    0.4%
  • 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: Use of TrailMyx's Advanced Journal Scanner
« Reply #3 on: April 02, 2009, 09:28:07 AM »
0
Oh, you may have to post a bit more code.  From what it looks like you have some syntax wrong there.  The "||" is implied in the journal scanner, so you don't need those.  Also the "if" "in" and "#journal" are also components included in the sub iteself.  So really for the arguments for the journal scanner, you only need the text you are looking for:

Code: [Select]
gosub TM_AdvJournalScan result VALID doesn't gas touch face purple flesh dart

One thing to keep in mind with EasyUO is that you can't have more than one expression per line, so all those "if" statements in your example were actually considered arguments for the script.  Actually, the script would trigger if you found an "if" somewhere.  ;)
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline bajathiefTopic starter

  • Jr. Member
  • **
  • Posts: 23
  • Activity:
    0%
  • Reputation Power: 0
  • bajathief has no influence.
  • Respect: +10
  • Referrals: 0
    • View Profile
Re: Use of TrailMyx's Advanced Journal Scanner
« Reply #4 on: April 02, 2009, 09:35:14 AM »
0
Ah ok thanks. I will post the script when I get home. I added a cure and heal sub at work and have not tested it yet. I have never added more than one If statement to look for and thought I needed the or inserted. on second thought I will go post the whole thing now so it can be ripped apart hehe.

Offline VicVega

  • Jr. Member
  • **
  • Posts: 71
  • Activity:
    0%
  • Reputation Power: 0
  • VicVega has no influence.
  • Respect: +8
  • Referrals: 0
    • View Profile
Re: Use of TrailMyx's Advanced Journal Scanner
« Reply #5 on: April 19, 2009, 04:11:37 AM »
0
So, if I understand correctly, I could use it something like this for a fishing sub:

Code: [Select]
gosub TM_AdvJournalScan fishing none you_catch_a_fish
if #result = #true
gosub fishAgain
else
return

It would be a very nice and useful sub if I learn to use it correctly.
« Last Edit: April 19, 2009, 04:13:55 AM by VicVega »
To learn, read.
To know, write.
To master, teach.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13303
  • Activity:
    0.4%
  • 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: Use of TrailMyx's Advanced Journal Scanner
« Reply #6 on: April 19, 2009, 09:29:08 AM »
0
Yup that's it.

You can also create other handlers that might have different types of text triggers and clear them without impacting triggers from another handler.  These are pretty much the most useful subs I've written so far.
Please read the ScriptUO site RULES
Come play RIFT with me!

Tags: