Discussion in   General Discussions   started     9 years ago   October 07, 2015, 07:34:46 PM   by   GeFuzzles

EasyUO Journal Chatlog + Saving [SCRIPT] **UPDATE 15/12/2015**

GeFuzzles
Offline
12 Posts
Topic :   EasyUO Journal Chatlog + Saving [SCRIPT] **UPDATE 15/12/2015**
9 years ago  October 07, 2015, 07:34:46 PM

Hello hello,

I'm a lazy no-good slacker.

I sit at work with Teamviewer open to my home computer so I can chat/macro/play UOEvo.

I have a problem.

...

The problem is that the journal is too hard to keep up with and keep track of for chats! The colour also makes it a bit difficult. (Note: My problem is not UO or slacking.)

That sent me in search of something to output it or read it so I can get links and advice later. EasyUO seemed to be the tool to do it. I checked out 12 different journal scripts and they were all terrible, except one that had a few minor problems but otherwise perfect.

I settled on "TIM'S Journal Scanner" by timginter. Found here: http://www.easyuo.com/psl.php?cat=89 (for attribution only, don't use this link)

I mentioned that there were a few issues. I reached out to the community here for help and Torden here at UOEvo was gracious enough to try and fix the issues.

The two issues were:
1. Window too small vertically.
2. Save output wasn't functioning that great.

Thanks Torden for the assistance!

I also removed the 'Comic Sans' font used in the original. Blech

You can find the script below.

Please modify TWO lines to suit your needs.
First one is 'menu Window title GeFuzzles' Journal' because you're not me.
Second is 'menu edit path 110 %yCoordinate 150 D:\Games\External\JournalNew.txt' to output to your chosen directory. (This may not work without Admin privileges)

**UPDATE 1: Now updated to include Druid/Cleric words of power filters**

**UPDATE 2: Fixed some spells that weren't filtered properly**

**KNOWN BUGS: Any chat with '< >' brackets will not save to log file. If any script wizards can work magic, please try. :) **

Code: [Select]
; Script Name: TIM's Journal Scanner
; Author: TIM (timginter)
; Version: 1.1
; Client Tested with: 5.0.1j
; EUO version tested with: 1.5 v. 102
; Shard OSI / FS:  OSI/FS
; Revision Date: 28/01/09
; Public Release: 28/01/09
; Purpose: Shows journal entries via resizeable menu. Saves journal entries to a specified file. Filters messages to display

gosub menuBody

; magery
set %wordsOfPower %wordsOfPower , __Uus_Jux__In_Mani_Ylem__Rel_Wis__In_Mani__In_Por_Ylem__In_Lor__Flam_Sanct__Des_Mani__Ex_Uus__Uus_Wis__An_Nox__An_Mani__In_Jux__An_Jux__Uus_Sanct__Uus_Mani__
set %wordsOfPower %wordsOfPower , __Rel_Sanct__Vas_Flam__An_Por__In_Nox__Ort_Por_Ylem__Rel_Por__Ex_Por__In_Sanct_Ylem__Vas_An_Nox__Vas_Uus_Sanct__Des_Sanct__In_Flam_Grav__In_Vas_Mani__
set %wordsOfPower %wordsOfPower , __Por_Ort_Grav__Ort_Rel__Kal_Ort_Por__In_Jux_Hur_Ylem__An_Grav__Kal_In_Ex__In_Jux_Sanct__Por_Corp_Wis__An_Ex_Por__In_Nox_Grav__Kal_Xen__An_Ort__
set %wordsOfPower %wordsOfPower , __Corp_Por__Vas_Ort_Flam__An_Lor_Xen__Kal_Por_Ylem__Vas_Des_Sanct__In_Ex_Grav__Wis_Quas__Vas_Ort_Grav__In_Sanct_Grav__Kal_Vas_Flam__Vas_Rel_Por__
set %wordsOfPower %wordsOfPower , __Ort_Sanct__Vas_An_Ort__Flam_Kal_Des_Ylem__Vas_Ylem_Rel__In_Vas_Por__Vas_Corp_Por__An_Corp__Kal_Vas_Xen_Hur__Kal_Vas_Xen_Corp__Kal_Vas_Xen_Ylem__
set %wordsOfPower %wordsOfPower , __Kal_Vas_Xen_Flam__Kal_Vas_Xen_An_Flam__
; necromancy
set %wordsOfPower %wordsOfPower , __Uus_Corp__In_Jux_Mani_Xen__In_Agle_Corp_Ylem__An_Sanct_Gra_Char__Pas_Tym_An_Sanct__Rel_Xen_Vas_Bal__Rel_Xen_Corp_Ort__Wis_An_Ben__In_Sar__
set %wordsOfPower %wordsOfPower , __In_Vas_Nox__In_Bal_Nox__Kal_Xen_Bal__Rel_Xen_An_Sanct__Kal_Xen_Bal_Beh__Kal_Vas_An_Flam__Rel_Xen_Um__Ort_Corp_Grav__
; chivlary
set %wordsOfPower %wordsOfPower , __Expor_Flamus__Obsu_Vulni__Consecrus_Arma__Dispiro_Malas__Divinum_Furis__Forul_Solum__Augus_Luminos__Dium_Prostra__Extermo_Vomica__Sanctum_Viatas__
; spellweaving
set %wordsOfPower %wordsOfPower , __Myrshalee__Olorisstra__Thalshara__Haeldril__Erelonia__Rauvvrae__Alalithra__Nylisstra__Tarisstree__Haelyn__Anathrae__Rathril__Orlavdra__Nyraxle__
set %wordsOfPower %wordsOfPower , __Illorae__Aslavdra__
; druid
set %wordsOfPower %wordsOfPower , __Ess_Lore_En_Ohm__En_Crur_Aeta_Sec_En_Ess__En_Sec_Ohm_Ess_Sepa__En_Sepa_Aete__En_Ohm_Sepa_Tia_Kes__Kes_Ohm__Ess_Ohm_En_Sec_Tia__Vauk_Ohm_En_Tia_Crur__
set %wordsOfPower %wordsOfPower , __Lore_Sec_En_Sepa_Ohm__En_Ess_Ohm__En_Ante_Ohm_Sepa__En_Kes_Ohm_Crur__Kes_Sec_Vauk__Vauk_Sepa_Ohm__Ohm_Sepa_Ante__Kes_En_Sepa_Ohm__
; cleric
set %wordsOfPower %wordsOfPower , __Angelus_Terum__Abigo_Malus__Abicio_Spiritus__Divinium_Cogitatus__Malleus_Terum__Repurgo__Reductio_Aetas__Vir_Consolatio__Anh_Mi_Sah_Ko__
set %wordsOfPower %wordsOfPower , __Adoleo__Ferio__Tactus_Vitalis__Temptatio_Exsuscito__



set %jEntry #jIndex
set %listIndex 0
  mainLoop:
if ( %jEntry < #jIndex || %jEntry = N/A )
{
  set %scanLine #jIndex - %jEntry
  scanJournal %scanLine
  set %journal #journal
  menu get filter_spam
  set *filterSpam #menuRes
  menu get filter_spells
  set *filterSpells #menuRes
  menu get chat_only
  set *chatOnly #menuRes
  menu get filter_spotting
  set *filterSpotting #menuRes
  if *filterSpells = #true
  {
    str pos %journal : 1
    str del %journal 1 #strRes
    set %spellCheckStr #strRes
  }

; ------------- THE "IF" BELOW FILTERS MESSAGES -------------

  if ( %journal <> %lastEntry || *filterSpam = #false ) && ( %spellCheckStr notIn %wordsOfPower || *filterSpells = #false ) &&
  +  ( :_ in %journal || *chatOnly = #false ) && ( You_see:_ notIn %journal || *filterSpotting = #false )
  {
    set %lastEntry %journal
    str count %journal _
    while #strRes > 0
    {
      str pos %journal _
      set %underscorePos #strRes
      str del %journal #strRes 1
      str ins #strRes #spc %underscorePos
      set %journal #strRes
      str count %journal _
    }
    set %listIndex %listIndex + 1
    gosub time
    set %line_ . %listIndex %time , #spc , %journal
    menu list add journal %line_ . %listIndex
    menu list select journal %listIndex
  }
  set %jEntry %jEntry + 1
}
if #menuButton <> NONE
{
  gosub #menuButton
  set #menuButton NONE
}
goto mainLoop

; ------------------------------------------------------

sub save
  menu get path
  set %file #menuRes
  gosub time
  set %listIndex %listIndex + 1
  set %line_ . %listIndex %time , #spc , SAVING , #SPC , TO: , #SPC , %file
  menu list add journal %line_ . %listIndex
  menu list select journal %listIndex
  set %jEntry %jEntry + 1
  if %saveIndex = N/A
  {
    set %saveIndex 1
  }
  set %saveGroupIndex 1
  set %groups ( %listIndex - %saveIdex ) / 20
  event sysMessage %groups
    saveLoop:
  set %params %listIndex - %saveIndex
  if %params > 20
  {
    set %params %saveIndex + 18
    set %lastParam %saveIndex + 19
    set %saveGroup . %saveGroupIndex
    for %save_i %saveIndex %params
    {
      set %saveLine %line_ . %save_i
      set %saveGroup . %saveGroupIndex %saveGroup . %saveGroupIndex , #SPC , %saveLine , #SPC , >> , #SPC , %file , #SPC , && , #SPC , echo
    }
    set %saveLine %line_ . %lastParam
    set %saveGroup . %saveGroupIndex %saveGroup . %saveGroupIndex , #SPC , %saveLine , #SPC , >> , #SPC , %file
    set %saveGroupIndex %saveGroupIndex + 1
    set %saveIndex %params + 1
    goto saveLoop
  }
  else
  {
    set %params %params - 1
    set %params %saveIndex + %params
    set %lastParam %saveIndex + %params + 1
    set %saveGroup . %saveGroupIndex
    for %save_i %saveIndex %params
    {
      set %saveLine %line_ . %save_i
      set %saveGroup . %saveGroupIndex %saveGroup . %saveGroupIndex , #SPC , %saveLine , #SPC , >> , #SPC , %file , #SPC , && , #SPC , echo
    }
    set %saveLine %line_ . %lastParam
    set %saveGroup . %saveGroupIndex %saveGroup . %saveGroupIndex , #SPC , %saveLine , #SPC , >> , #SPC , %file
  }
  for %save_i 1 %saveGroupIndex
  {
    execute cmd.exe /c echo %saveGroup . %save_i
  }
  gosub time
  set %listIndex %listIndex + 1
  set %line_ . %listIndex %time , #spc , SAVING , #SPC , DONE
  menu list add journal %line_ . %listIndex
  menu list select journal %listIndex
  set %jEntry %jEntry + 1
return

sub left
  if %width > 300
  {
    gosub menuBody -100 0
  }
  gosub rewriteList
return

sub right
  if %width < 1200
  {
    gosub menuBody 100 0
  }
  gosub rewriteList
return

sub rewriteList
  menu list clear journal
  for %restoreList_i 1 %listIndex
  {
      menu list add journal %line_ . %restoreList_i
  }
  menu list select journal %listIndex
return

sub closed
  stop
return

; -----------------------------------------------------

sub time
  set %time #time
  str ins %time : 5
  str ins #strRes : 3
  set %time [ , #strRes , ]
return

sub menuBody
  menu Clear
  menu Font Name Verdana
  menu Window title GeFuzzles' Journal
 menu Window color black
 menu Font Name Verdana
 menu Font color green
 menu Font bgcolor black
 menu Font size 8
 if %width = N/A
 {
    set %width 500
 }
 if %height = N/A
 {
    set %height 360
 }
 set %yCoordinate 5
 if %0 > 0
 {
   set %width %width + %1
 }
 menu list create journal 5 %yCoordinate %width %height

 menu Font Name Verdana
 set %yCoordinate %yCoordinate + %height
 set %yCoordinate %yCoordinate + 5
 if *filterSpam = N/A || *filterSpells = N/A || *filterSpotting = N/A || *chatOnly = N/A
 {
   set *filterSpam #false
   set *filterSpells #false
   set *filterSpotting #false
   set *chatOnly #false
 }
 menu check filter_spam 5 %yCoordinate 100 20 *filterSpam Filter spam?
 menu check filter_spells 100 %yCoordinate 100 20 *filterSpells Filter spells?
 menu check filter_spotting 200 %yCoordinate 100 20 *filterSpotting Filter spotting?
 menu check chat_only 400 %yCoordinate 100 20 *chatOnly Chat only?

 set %yCoordinate %yCoordinate + 20
 menu button save 5 %yCoordinate 100 20 SAVE
 menu edit path 110 %yCoordinate 150 D:\Games\External\JournalNew.txt

 menu button left 265 %yCoordinate 20 20 <
 menu button right 287 %yCoordinate 20 20 >

 set %yCoordinate %yCoordinate + 25
 set %windowSize %width + 10
 menu Window Size %windowSize %yCoordinate
 menu Show
 set #menuButton NONE
return


Here's a snazzy shot, I'd suggest ticking the boxes I have ticked to filter spells and name pop-ins etc. You can use the left and right arrows to make window wider horizontally.




Cheers :)

WafflesNCyanide
Offline
116 Posts
#1 Re :   EasyUO Journal Chatlog + Saving [SCRIPT] **UPDATE 15/12/2015**
9 years ago  October 07, 2015, 07:57:51 PM

Oh wow that's Awesome Fuzzles!  Keep up the great work!!!

Frank
Offline
3 Posts
#2 Re :   EasyUO Journal Chatlog + Saving [SCRIPT] **UPDATE 15/12/2015**
9 years ago  October 07, 2015, 09:58:09 PM

very good stuff. thanks for contributing this  8)

after using it for a bit, here are my issues/suggestions/whatever. don't take it as ingratitude, just giving feedback. if you need a guinea pig to test revisions, you know where to find me. I have multiple OS options to test on.

  • save file doesn't work (Win7 64-bit. yes, I changed the file path. yes, I'm running EasyUO as admin)
  • druid and cleric spells aren't filtered. as dumb as I is, I could prolly figure out how to add them to the filter list along with other spells, but why not be part of the official g-fuzz release?
  • poison/resist poison/hidden messages still display with all filters on
  • any way to filter messages from UOSteam? filter spam stops messages from showing up more than once in a row, but I'd rather not see them at all
  • no word wrap in display window
even as is, I like this a lot. the time-stamp is quite handy


*edit to clarify save file issues* I've used save 6 times. 5 times there was a brief window popup and it said the saving was done, but no file was created. the other time it saved only the last 16 lines of chat when there were >50 lines in the window.

GeFuzzles
Offline
12 Posts
#3 Re :   EasyUO Journal Chatlog + Saving [SCRIPT] **UPDATE 15/12/2015**
9 years ago  October 07, 2015, 10:10:28 PM

Hey Frank,

I appreciate the feedback, and I still have my own qualms with it, unfortunately this level of scripting is way beyond anything I am able to manage. Haha, I've already stared at it quite a bit.

First thing, the save didn't work for me at all at first either, then it suddenly did. Change the path in the script rather than the box in window and make sure case matches and try again? The save button will spawn a cmd window, then another, then another, then another, then it's all saved to file. Try experimenting with it as I've confirmed it functioning on Win7 x64. It just seems to be fickle. Maybe even try a reboot?

The words of power seem to be pretty easy to add to the filter, though I don't have a druid or cleric or any extra book to know the words, so I would accept tested submissions. If you add them I'll edit the OP. :)

Word wrap would be nice but that may not be possible as Torden said the windows EasyUO generate are very simple. Can't even have drag-to-resize. So just click the widen buttons and deal. lol

As for more filters... Honestly I'm too lost. All I can do is hack shit together. In the official thread in the source I posted there were some custom filters added and someone made a changed version (which wouldn't work for us) but other than that I dunno.

Really though... I think this may be the best we get unless we get a Programming Angel to clean it up for us... If you take a test of some of the other scripts where I linked you'll see just how good we got it, hahah. Please try :P

PS: I would like a scroll lock function like the journal.


Cheers :)

Frank
Offline
3 Posts
#4 Re :   EasyUO Journal Chatlog + Saving [SCRIPT] **UPDATE 15/12/2015**
9 years ago  October 07, 2015, 10:49:08 PM

as requested, the druid and cleric words of power:



Tome Of Nature (druid spellbook)
Ess Lore En Ohm
En Crur Aeta Sec En Ess
En Sec Ohm Ess Sepa
En Sepa Aete
En Ohm Sepa Tia Kes
Kes Ohm
Ess Ohm En Sec Tia
Vauk Ohm En Tia Crur
Lore Sec En Sepa Ohm
En Ess Ohm
En Ante Ohm Sepa
En Kes Ohm Crur
Kes Sec Vauk
Vauk Sepa Ohm
Ohm Sepa Ante
Kes En Sepa Ohm


Cleric Spellbook
Angelus Terum
Abigo Malus
Abicio Spiritus
Divinium Cogitatus
Malleus Terum
Repurgo
Reductio Aetas
Vir Consolatio
Adoleo
Ferio
Tactus Vitalis
Temptatio Exsuscito



Other messages I noticed being logged that should be filtered:
Insufficient mana for this spell.
I cannot mark that object.
Select Marked item.
I cannot recall from that object.
I cannot gate travel from that object.

GeFuzzles
Offline
12 Posts
#5 Re :   EasyUO Journal Chatlog + Saving [SCRIPT] **UPDATE 15/12/2015**
9 years ago  October 07, 2015, 11:24:41 PM

If read carefully I was trying to go more for a 'do it yourself and I'll support it' vibe, but I'll take a poke later since you've provided them. lol


EDIT: The script has been updated to reflect the additional Word of Power for the Druid/Cleric spells.

The save feature seems to be very fickle, I've had my own mixed results. I wouldn't attempt to rely on it, but it still works for the most part 'enough'.

Hoping someone with some prowess can assist us in this endeavour. :)

Torden
Offline
1 Posts
#6 Re :   EasyUO Journal Chatlog + Saving [SCRIPT] **UPDATE 15/12/2015**
9 years ago  October 14, 2015, 09:21:09 AM

Save feature works every time for me. There are a couple of things that could be causing a problem with it.

If you don't have Admin privileges and try to save it to your main C drive in Windows 7, 8, 8.1 or 10 then this could be a problem. I do and was able to get it to save to C drive.  The easiest thing to do would be to save it to another drive as in D drive if you have one or make sure you have the privileges.

EasyUO cannot make folders, so if you tell this script to save to D:\Games\Journal.txt, then you should already have a FOLDER on your D drive that is named Games or this script will not save. Just insure you have the proper drive letter annotated and that you have the Folders already on that drive if you want to save in that location.

Last, I noticed that this program originally before I edited it, wanted to save the Journal file to the exact same location with the exact same name that the UO.cfg file in the UO installed directory points to for most people that already save their journals. The lines in the UO.cfg file that saves it for me are:

SaveJournal=On
JournalSaveUnicode=Off
JournalSaveFile=C:\Journal.txt


The script had the journal save file saved and named C:\Journal.txt which is probably where most already save their journal file with that exact name. The original line in this script said this:

menu edit path 110 %yCoordinate 150 C:\Journal.txt

This line tried to make this script save to a file I was already using by that name on my C drive. By just changing this in the script to:

menu edit path 110 %yCoordinate 150 C:\JournalNew.txt

fixed the problem and the file saved perfectly. I tried it in a bunch of different locations and drives with different names for the journal.txt before I sent it back to you and they all worked and have been working for me. It has not been that buggy or hit and miss for me so far. Good luck! If you have specific problems post them here and we will see if we can get them solved.

Torden

GeFuzzles
Offline
12 Posts
#7 Re :   EasyUO Journal Chatlog + Saving [SCRIPT] **UPDATE 15/12/2015**
9 years ago  October 14, 2015, 01:23:36 PM

Thank you Torden for your input!

 ;D

GeFuzzles
Offline
12 Posts
#8 Re :   EasyUO Journal Chatlog + Saving [SCRIPT] **UPDATE 15/12/2015**
9 years ago  November 27, 2015, 03:50:51 PM

Bump

GeFuzzles
Offline
12 Posts
#9 Re :   EasyUO Journal Chatlog + Saving [SCRIPT] **UPDATE 15/12/2015**
9 years ago  December 15, 2015, 10:24:54 PM

Bump. Bugfixes! There were some spells not getting properly filtered, this should be fixed now.