[EasyUO] Excelsior Chat Viewer + UOS Bug Fix

If you make a Client-side script you can publish it here for other players to use
Post Reply
Jantra
Grandmaster Scribe
Posts: 72
Joined: Sun Apr 24, 2016 9:54 am

[EasyUO] Excelsior Chat Viewer + UOS Bug Fix

Post by Jantra »

Hello! I discovered a bug where if you used Excelsior Chat Viewer for EasyUO and UOSteam at the same time and had an attack macro with 'getenemy' in the macro (as most attack macros do), it would put the [Enemy] Name into the chat window and really mess up your global chat viewer. Below is the fix for that. The problem was that since [Enemy] starts with the same line that global does [, it would grab that as well. So I made it double check more of the line and dismiss anything that starts with the [core that the combat enemy name line does. Enjoy the fix!

Code: Select all

  
    ;============================================
    ;============================================
    ; Script: Excelsior's Chat Viewer
    ; Author: Praxiiz Spectreon
    ; Purpose: Records Guild OR Global Chat and
    ; displays it in a separate window for easy reading.
    ; Version: 1.1
    ; Made to work with Excelsior Shard by Elron/Datguy
    ; Further revisions by BlaZe Budd[le]/Devlin
    ;=============================================

    set *symb *Type ;use [ for global and < for guild


    set #menubutton N/A
    set %index 0
    set %newLine #journal

    menu clear
    menu Window Title Chat Viewer
    menu Window Color blue
    menu Window Size 600 150
    menu List Create mainBuffer 0 0 600 150
    menu Button Guild 500 125 50 25 Guild
    menu Button Global 550 125 50 25 Global
    menu Show

    loop:
    	if #menubutton = Guild
    	{
    		set #menubutton 0
    		set *Type <
    		set *symb *Type
    		event sysmessage Guild Chat will now be recorded.
    	}
    	if #menubutton = Global
    	{
    		set #menubutton 0
    		set *Type [
    		set *symb *Type
    		event sysmessage Global Chat will now be recorded.
    	}
    	scanJournal 1
    	if #menubutton = CLOSED
      		stop
    	if %newLine <> #journal
    	{
    		set %temp #journal
    		str pos %temp < p
    		str Left %temp 1
		set %setSym1 #STRRES
		str Left %temp 5
		set %setSym5 #STRRES
    		if You_see: in #JOURNAL
    		{
    			goto loop:
    		}
    		if  %setSym1 = *symb
    		{
			if %setSym5 <> [core
			{
				set %string #journal
    				loop2:
    				str Pos %string _
    				set %pos #strRes
    				str Del %string #strRes 1
    				str Ins #strRes #spc %pos
    				set %string #strRes
    				str Count %string _
    				if #strRes > 0
   					goto loop2
    				menu List Add mainBuffer %string
    				set %newLine #journal
    				set %index %index + 1
    				menu List Select mainBuffer %index
			}
    		}
    	}
    goto loop:
    halt
Post Reply