# [Download this plugin with Plugin Manager]

### or download [**TR_System.c2addon]** directly

# Configuration

## TR_System plugin – v1.5 – by Toby R

Property | Value |
---|---|

Description | Various general actions, conditions and expressions. An extension to the native C2 System. |

Category | General |

Cordova-plugins | No |

Flags | No |

Help | http://tobyr.wtfgamesgroup.com/c2-plugins/tr_system-construct-2-common-additional-aces/ |

Id | TR_System |

Rotatable | No |

Type | object |

# Actions

#### There are 4 actions available

**Start timer** : Start TAG timer and trigger it REPEATS times every INTERVAL seconds. Does not respect dt. *#Time*

**Tag**: Unique Timer tag**Interval**: Number of seconds between each trigger. (default value : 1)**Repeats**: Number of triggers before timer stops. (default value : 1)

**Stop timer** : Stop timer by tag. *#Time*

**Tag**: Unique Timer tag

**Stop all timers** : Stop all timers. *#Time*

**Comment** : Just a comment. *#General*

**Comment**: Comment text.

# Conditions

#### There are 6 conditions available

**If is true** : Is true when the result of logical operation is true. *#General*

**Logical operation**: Any value or logical operation. You can use logical operators here (&, |, =, <>, <, <=, >, >=, ?:).

**Comment** : Just a comment. This condition does nothing. *#General*

**Comment**: Comment text.

**On Timestamp** : True when current time equals to given timestamp with seconds precision (not milliseconds) *#Time*

**Timestamp**: UTC timestamp in seconds.

**On timer** : True when time has come. *#Time*

**Tag**: Timer tag.

**Is screen aspect ratio** : True when screen aspect ratio is equal to “Width ratio”:”Height ratio”. *#General*

**Width ratio**: Width ratio number. (default value : 16)**Height ratio**: Height ratio number. (default value : 9)

**Is value in set** : Is true when Value is equal to at least one of elements in set. *#General*

**Value**: Value to compare against the set.**Set item {n}**: A set item to compare the value against.

# Expressions

#### There are 24 expressions available

**GetTimestamp** : Return the current UTC timestamp in seconds. *#Time*

**GetFullTimestamp** : Return the current UTC timestamp in milliseconds. *#Time*

**GetGroupName** : Return the closest group name. *#General*

**GetDate** : Return the current date in specified format. *#Time*

**“yy-mm-dd hh-ii-ss.u”**: y – year, yy – full year, m – month (1-12), mm – month (01-12), d – day (1-31), dd – (01-31), h – hours (0-23), hh – hours (00-23), i – minutes (0-59), ii – minutes (00-59), s – second (0-59), ss – seconds (00-59), u – milliseconds (000)**0**: Timezone offset to the UTC time in hours

**Dec2Bin** : Convert decimal number to binary. *#Numeral systems*

**Number**: Decimal number.

**Dec2Hex** : Convert decimal number to hexadecimal. *#Numeral systems*

**Number**: Decimal number.

**Hex2Dec** : Convert hexadecimal number to decimal. *#Numeral systems*

**Hex Number**: Hexadecimal number (provided as a string).

**Hex2Bin** : Convert hexadecimal number to binary. *#Numeral systems*

**Hex Number**: Hexadecimal number (provided as a string).

**Bin2Dec** : Convert binary number to decimal. *#Numeral systems*

**Binary number**: Binary number.

**Bin2Hex** : Convert binary number to hexadecimal. *#Numeral systems*

**Binary number**: Binary number.

**Super64Encode** : Encodes provided data. *#Hashing*

**“Data”**: String (text) to encode.**FirstSalt**: Any number between 5 and 20 works the best. It is recommended so the FirstSalt was different than the SecondSalt.**SecondSalt**: Any number between 5 and 20 works the best. It is recommended so the SecondSalt was different than the FirstSalt.

**Super64Decode** : Decodes provided data. *#Hashing*

**“Data”**: String (text) to decode.**FirstSalt**: Must be exactly the same as FirstSalt provided while encoding.**SecondSalt**: Must be exactly the same as SecondSalt provided while encoding.

**MD5** : Hashing data with MD5 algorithm. *#Hashing*

**“Data”**: Data to hash.

**SHA1** : Hashing data with SHA1 algorithm. *#Hashing*

**“Data”**: Data to hash.

**SHA256** : Hashing data with SHA256 algorithm. *#Hashing*

**“Data”**: Data to hash.

**SHA512** : Hashing data with SHA512 algorithm. *#Hashing*

**“Data”**: Data to hash.

**Base64Encode** : Encodes data with Base64 algorithm. *#Hashing*

**“Data”**: Data to encode.

**Base64Decode** : Decodes data with Base64 algorithm. *#Hashing*

**“Data”**: Data to decode.

**GetTimerTimeLeft** : Return the remaining time before timer triggers (in milliseconds). *#Time*

**Tag**: Unique Timer tag

**ScreenWidth** : Return the width of currently set screen resolution. *#General*

**ScreenHeight** : Return the height of currently set screen resolution. *#General*

**GCD** : Return the Greatest Common Divisor for a and b parameters or 0 if wasn’t found. *#Math*

**a**: First number do find GCD.**b**: Second number do find GCD.

**IsScreenRatio** : Check if screen aspect ratio is equal to “WidthRatio”:”HeightRatio”. Return 1 if true and 0 if false. *#General*

**WidthRatio**: Width ratio number.**HeightRatio**: Height ratio number.

**GetScreenRatio** : Return the (string) aspect ratio of the screen (ex. “16:9”) or 0 (integer) if could not detect. *#General*

## Follow Me!