Author Topic: Ignoring a particular term when scanning the journal:  (Read 1816 times)

0 Members and 1 Guest are viewing this topic.

Offline silentsentinelTopic starter

  • Jr. Member
  • **
  • Posts: 31
  • Activity:
    0%
  • Reputation Power: 0
  • silentsentinel has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Ignoring a particular term when scanning the journal:
« on: April 19, 2009, 12:29:49 PM »
0
Hi guys, got a quick question on journal scanning. Basically I am writing a GM/speech detection sub for use in my script, currently flagged is

if :_bob in #journal
   flag

if *_bob in #journal
    flag

HOWEVER, I do not want the word "bob" by itself flagged. The reason for this is it comes up whenever the character banks or speaks in the journal, in the format of "Bob: Says this", so that's out.

The scanning (seems) to work ok, and picks up things like "hey bob" and "GM PITA: Bob!!", however... at the VERY beginning of the journal when the character first logs in is the text "Welcome, Bob, to the server! Blah blah yadda yadda!"

I've tried using "deleteJournal" at the beginning of my script and starting/loading the script several seconds after the char is logged in, but it still for some reason picks up this flag.

I'm not sure how to exclude this snippet of text from stopping my script, if anyone might know the proper way to handle this it'd be awesome! Thanks again all.

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: Ignoring a particular term when scanning the journal:
« Reply #1 on: April 19, 2009, 12:37:08 PM »
0
Are you using #jindex?  Makes sense to me that if you were to be looking at #jindex, you should be able to avoid that startup issue.

You might want to take a look at my advanced journal handling routines and see how I handle things in there.  I have a "VALID" flag that helps filter if the text came from you, or was spammed by someone.  The thoughts are similar.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline silentsentinelTopic starter

  • Jr. Member
  • **
  • Posts: 31
  • Activity:
    0%
  • Reputation Power: 0
  • silentsentinel has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Ignoring a particular term when scanning the journal:
« Reply #2 on: April 19, 2009, 06:37:26 PM »
0
Looks like the asterisk I was using made it act funky - nice sub btw, checking that out

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: Ignoring a particular term when scanning the journal:
« Reply #3 on: April 19, 2009, 07:05:37 PM »
0
I don't believe you can use asterisks in EUO as wildcards anyhow.  It's considered a literal.  bummer.
Please read the ScriptUO site RULES
Come play RIFT with me!

Tags: