Strategy: AutoReader

Purpose To read Reports
When to use when want to read and optionally default some or all reports
When to avoid

Server strategy to automatically read messages and optionally send messages for certain events.

Place either before or after all village strategies but inside server

Notes

  • currently only supports the specific English strings below not local language

Syntax

   <serverStrategy class="AutoReader" desc="DESCRIPTION" minPauseMinutes="MINS"	enabled="true"	runWhile="RUNWHILE_UID" waitFor="WAITFOR_UID" uid="UID">
		<output append="APPEND" format="FORMAT" />
                <delete type="DELETE" /> 
    </serverStrategy>

Attributes and parameters

DESCRIPTION some optional description of your choice
WAITFOR_UID See "Strategies"
RUNWHILE_UID See "Strategies"
UID Unique IDentifier. See "Strategies"
MINSthe time in minutes to wait before running again
APPENDtrue/false flag to indicate if should append to csv file or create new each run, default is true
FORMATlist of type of reports to read (see DELETE) and output targets combined with ”+” character. Output to “events” file, “log” file, or “csv” file called reports.csv. Default is to read all reports into log file
DELETEtrade/attack/rein/scout - type of report to delete, can be combined with ”+” character, default is none

Examples

Simple Syntax, reads messages every 10 minutes and output them to events.txt, log.txt and also own csv file It deletes any Trade or Reinforcement messages it finds leaving the others still available

   <serverStrategy class="AutoReader" desc="Read Messages" minPauseMinutes="10"	enabled="true"	uid="rmss">
			<output append="true" format="log+event+csv" />
                        <delete type="trade+rein" /> 
    </serverStrategy>

Complex Syntax with event message sending

It reads only attack reports and sends messages according to the type of report.

It also deletes without reading any Trade or Reinforcement Messages

Therefore scout messages will remain unread

	<serverStrategy class="AutoReader" desc="Read Messages"		minPauseMinutes="10"	enabled="true"	uid="ukxssrp">
		<output append="true" format="event+attack" />
                <delete type="trade+reins" /> 
                <item	title="attacked"	name="report"	id=""	msgTitle="lost defenders at %s"	msgText="incoming"		desc="send message if attacked and lose troops" />
                <item	title="farmed"		name="report"	id=""	msgTitle="lost res at %s"		msgText="we should build a cranny"	desc="send message if attacked and lose res" />
                <item	title="dodged"		name="report"	id=""	msgTitle="no losses at %s"		msgText="missed"	desc="send message if attacked with no impact" />
                <item	title="casualty"	name="report"	id=""	msgTitle="lost attackers at %s"		msgText="build more"	desc="send message if lose some on attack" />
                <item	title="empty"		name="report"	id=""	msgTitle="empty"		msgText="dont attack there again"	desc="send message if empty attack" />
	</serverStrategy>

As a protection from flooding with IGM a message is only sent once for a report relating to a title of that type. However an item line can be included more than once so that a “farmed” item could be included 5 times which would generate 5 messages. I would suggest with slightly different text so the last one could say “oh no not again”



Personal Tools