Screen

The Screen object contains the content as you see it on your screen. This means certain things you see in the bot can be referenced through scripts. Below I've included a collection of references that will assist you to grab data from certain Screen elements. As well as referencing these elements, you can also add values to some of them. the addEvent function shows this.

Name

Type

Description

Screen.mainLog

String

Contains the information seen in the main log tab.

Screen.cityLog

String

Contains the information seen in the city Log tab.

Screen.reportLog

String

Contains the information seen in the Reports tab.

Screen.aChat

String

Contains the information seen in the Alliance chat tab.

Screen.pChat

String

Contains the information seen in the Private chat tab.

Screen.wChat

String

Contains the information seen in the World chat tab.

Screen.bChat

String

Contains the information seen in the Beginners chat tab.

Screen.sChat

String

Contains the information seen in the System chat tab.

Screen.commandLog

String

Contains the information seen in the commandLog tab.

MainLog

Usage:

Screen.mainlog.buffer

Example:

echo Screen.mainLog.buffer

Outputs the contents of the main Log.

CityLog

Usage:

Screen.cityLog.buffer

Example:

echo Screen.cityLog.buffer

Outputs the contents of the city Log.

ReportLog

Usage:

Screen.reportLog.buffer

Example:

echo Screen.reportLog.buffer

Outputs the contents of the report Log.

AllianceChat

Usage:

Screen.aChat.buffer

Example:

echo Screen.aChat.buffer

Outputs the contents of the alliance chat.

PrivateChat

Usage:

Screen.pChat.buffer

Example:

echo Screen.pChat.buffer

Outputs the contents of the private chat.

WorldChat

Usage:

Screen.wChat.buffer

Example:

echo Screen.wChat.buffer

Outputs the contents of the world chat.

BeginnersChat

Usage:

Screen.bChat.buffer

Example:

echo Screen.bChat.buffer

Outputs the contents of the beginners chat.

SystemChat

Usage:

Screen.sChat.buffer

Example:

echo Screen.sChat.buffer

Outputs the contents of the system chat.

CommandLog

Usage:

Screen.commandLog.buffer

Example:

echo Screen.commandLog.buffer

Outputs the contents of the command Log.


addEvent

Usage:

Screen.mainLog.addEvent("Contents")

Example:

Screen.mainLog.addEvent("<b>Why hello there.</b>")

Outputs the contents of the addEvent function to the specified Screen object.

This addEvent method also allows you to use HTML markup within the event. This means you're able to (somewhat) use styling within the logs.

Example:

Note The addEvent() function only adds the event to the local client, meaning even if it looks like it posted to world-chat using Screen.wChat.addEvent("hi") it in-fact did NOT.


ScriptObjects

Screen (last edited 2015-09-04 16:51:45 by LKD70)