Watches

Watches allow a player’s system to automatically react to changes in state, regardless of the player’s online status. Every time a Watch fires, the player gains Watch experience.

There are several kinds of watches:
  • Petty Cash: a Petty Cash watch will cause a program to automatically run if it is observing a Bank port that is On and the player’s petty cash exceeds an amount specified. At high levels, one can use this to automatically deposit funds into a Bank account, making a Store a much more secure venture.
  • Scanning: responds when another player scans your system. This can potentially be used to launch preemptive measures against one’s enemies, or to log information of events that have occurred while the player is offline.
  • Health: fires when a port’s health diminishes beyond a pre-specified point.

Logging

A player can use the method logMessage to store notifications of watches firing while offline. Similarly, the function message can be used to send messages (these can be viewed only while online).

Installing a Watch

http://www.plink-search.com

A Watch is installed from within the Watch Manager by clicking “File—Install New Watch”. At installation, you must specify the Type of Watch to be installed, as well as its Observed Port. While the ports can be changed after installation, the Type cannot.


Parameters

http://www.plink-search.com

Watches are managed from within the Watch Manager under System—Administration. Here you can install Watches and vary their parameters by right clicking on an installed Watch under Type (shown highlighted in green in the screen shot).

Like ports, a Watch can be turned On and Off and has an associated CPU cost (highlighted in red), and there is an option to make a note concerning a Watch.

Highlighted in purple is the list of the ports the Watch is allowed to affect. These are the Observed Ports which are set by right clicking, as with any Watch parameter.

On the right we can see (highlighted in gray) the values specified by the player upon installing the Watch which determine when it fires—in this case, when health dips below 100.

Some functions, like searchFirewall, allow a user to switch their firewall between ports to maximize their defense. Here we can see that the player is using an Ultimate Attacking Firewall (set by the same method as all other parameters).

Uses

  • At high levels, a Petty Cash Watch can automatically deposit money from your Petty Cash into your Bank; this is invaluable for a Merchant.
  • A Health Watch can help you switch powerful defenses (firewalls) between an array of ports. With a Watch level above 50, a player can launch counter-attacks, causing their attacker to overheat.
  • A Scan Watch can be used to launch preemptive attacks. For instance, you might attack the Default Bank of someone who has scanned your system.
  • One of the lowest level Watch functions available (and most useful to all types of Watches) is a Watch that logs

This example is a Watch that both sends you a message (if you are online) and logs a message (if you are offline), informing you of an attack on your port. The message provides you with the attacker’s IP and what port they are attacking.

In fire:


logMessage(printf("%s attacked your port %s",getTargetIP(),getPort()));
message(getSourceIP(),printf("%s attacked your port %s",getTargetIP(),getPort()));