User Tools

Site Tools


journal_func

Scripting - Journal data and function

Here can find some information about Enhanced Scripting function and data for journal operation!

Clear

Clear Journal
Syntax Journal.Clear( )
Description:
Clear data in journal buffer.
Returns void
In Object: Journal
Parameters: none

Search Journal
Syntax Journal.Search(string)
Description:
Search a string in all journal buffer, if present get true. String is case sensitive.
Returns bool
In Object: Journal
Parameters: TextToSearch
Search Journal by name
Syntax Journal.SearchByName(stringToLookFor, PlayerName)
Description:
Search for stringToLookFor in all journal buffer by sender name, if present get true. String and name is case sensitive.
Returns bool
In Object: Journal
Parameters: stringToLookFor, senderName
Example

Journal.Clear()
while not Journal.SearchByName("Hello", "Credzba"):
    Misc.Pause(1000)

Search Journal by color
Syntax Journal.SearchByColor(string, string)
Description:
Search a string in all journal buffer by font color, if present get true. String is case sensitive.
Returns bool
In Object: Journal
Parameters: ColorToSearch

Search Journal by message type
Syntax Journal.SearchByType(string, string)
Description:
Search a string in all journal buffer by message type, if present get true. String and Type is case sensitive.
Returns bool
In Object: Journal
Parameters: string TextToSearch, string MessageType
Parameters type list:

  • Regular
  • System
  • Emote
  • Label
  • Focus
  • Whisper
  • Yell
  • Spell
  • Guild
  • Alliance
  • Party
  • Encoded
  • Special

Get Data

Search and Get text line
Syntax Journal.GetLineText(string, optional bool)
Description:
Search and get last line whit searched string, if present return a string whit all text in line. String is case sensitive. Use optional bool true for add name of mobile or item send text.
Returns string
In Object: Journal
Parameters: bool
Get Speech Name
Syntax Journal.GetSpeechName()
Description:
Get a list of all name of player and object speech.
Returns list (string)
In Object: Journal
Parameters: none

Get Text by Type
Syntax Journal.GetTextByType(string, optional bool)
Description:
Get a list of all speech by specific type. Use optional bool true for add name of mobile or item send text.
Returns list (string)
In Object: Journal
Parameters: string textType, optional bool addMobileId
TextTypes:

  • System
  • Emote
  • Label
  • Focus
  • Whisper
  • Yell
  • Spell
  • Guild
  • Alliance

Get Text by Name
Syntax Journal.GetTextByName(string)
Description:
Get a list of all speech by specific player name.
Returns list (string)
In Object: Journal
Parameters: name
Get Text by Color
Syntax Journal.GetTextByColor(int, optional bool)
Description:
Get a list of all speech by specific color. Use optional bool true for add name of mobile or item send text.
Returns list (string)
In Object: Journal
Parameters: bool
Get Text by Serial
Syntax Journal.GetTextBySerial(int)
Description:
Get a list of all speech by specific serial.
Returns list (string)
In Object: Journal
Parameters: serial

Wait for Journal

Wait for journal to have Text String
Syntax Journal.WaitJournal(string, int)
Description:
Pause script and wait when a text is present in journal. Text is case sensitive and max wait delay is in ms.
Returns bool - True if string found, False - timeout
In Object: Journal
Parameters: MaxWaitTime
Example

Journal.WaitJournal("Hello", 20000)

Wait for journal to have text from Name
Syntax Journal.WaitByName(Player/Mobile Name, int)
Description:
Pause script and wait for when a name sends text in journal. Text is case sensitive and max wait delay is in ms.
Returns bool
In Object: Journal
Parameters: MaxWaitTime
Example

if Journal.WaitByName(Player.Name, 20000):
    Misc.SendMessage("FOUND IT")
else:
    Misc.SendMessage("TIME OUT")  

journal_func.txt · Last modified: 2024/03/18 21:09 by 127.0.0.1

Exception: Git command failed to perform periodic pull: From https://github.com/RazorEnhanced/razorenhanced.github.io * branch main -> FETCH_HEAD error

Exception: Git command failed to perform periodic pull: From https://github.com/RazorEnhanced/razorenhanced.github.io * branch main -> FETCH_HEAD error

An unforeseen error has occured. This is most likely a bug somewhere. It might be a problem in the gitbacked plugin.

More info has been written to the DokuWiki error log.