Script Objects

Tournament

The Tournament object is the root object. All other objects are accessed through the Tournament object. For example, to get the name of the player at the first position of the first table, use tables[0].players[0].name, or to get the number of players at the first table use tables[0].players.count

Tournament Variables:

title         String, for example: "My Tournament"

timer         Timer object

chips         Array of Chip objects

currentLevel  Level object

nextLevel     Level object

levels        Array of Level objects

players       Players object

tables        Array of Table objects

payouts       Payouts object

history       History object

isPortrait    true or false depending on the orientation of the device

Array

All arrays have the variables isEmpty, count, and [#]. The [#] is how to access objects in the array. Like most programming languages, it is zero based. For example, to access the first object in the array use [0], and for the second object use [1], etc..

isEmpty   true or false

count     Number of items in the array

[#]       Accessing each object in the array

Timer

isRunning                 true or false

clock                     String representing the current level's clock (e.g. "05:52")

minutes                   Number, minutes left on the current level's clock (e.g. 5)

seconds                   Number, seconds left on the current level's clock (e.g. 52)

totalSeconds              Number, total seconds left in the current level  (e.g. 352)

secondsUntilNextBreak     Number, total seconds until the next break

estimatedSecondsUntilEnd  Number, total seconds until the end of the tournament

level                     Number, index of the current level in the `levels` array

Chip

value   Number, example: 25

Level

isBreak         true or false

isPregameBreak  true or false

title           String representing the level's title

subtitle        String representing the level's subtitle

smallBlind      nil or Number, value of the small blind, example 20

bigBlind        nil or Number, value of the big blind, example 40

bringIn         nil or Number, value of the bring-in

ante            nil or Number, value of the ante

minutes         Number, length of the level in minutes

Players

active      Array of Player objects, players that have bought in and are not eliminated

eliminated  Array of Player objects, players that are eliminated

played      Array of Player objects, players that are either active or eliminated

didNotPlay  Array of Strings, the names of the people who did not play

all         Array of all Player objects

Player

name             String representing the player's name

status           String with value Active, Eliminated, or Inactive.

place            nil if not Eliminated, otherwise Number representing their finishing place

placeCount       Number of players who share the same finishing place as this player (typically 1)

eliminatedBy     Array of Player objects — the player(s) who eliminated this player.

eliminatedCount  Number of people this player eliminated, 0 if none.

totalPayed       Total amount this player paid in the buy-in, re-buys, and add-ons.

totalChips       Total chips this player received in the buy-in, re-buys, and add-ons.

totalPlayed      Total time this player played, not counting breaks or timer pauses.

Table

players   Array of Player objects representing the players at the table

Payouts

totalCollected  String representing the total amount collected from buy-ins, re-buys, and add-ons, for example "$2,100"

adjustment      String representing the adjustment to the prize amount, for example "-5%"

netPrize        String representing the net prize amount, for example "$2,100"

roundTo         String representing the amount to round payouts to, for example "$20"

payoutCount     Number of payout positions, example 4.

totalAmounts    String representing the total payout amount, for example "$2,100"

totalPercent    String representing the percent total of all payouts, should be "100%"

amounts         Array of Numbers, for example [200, ...]

percentages     Array of Numbers, for example [0.45...]

History

The History object has the following variables. Each is an array of Event objects. Note, the array will be empty if the event has not happened yet. The "last..." events are ordered by when the event happened, with the most recent first. So, for example, to get the names of the player or players who most recently purchased a re-buy, use history.lastReBuy[0].names

lastBuyIn           Array of BuyIn Event objects, ordered with most recent first

lastReBuy           Array of ReBuy Event objects, ordered with most recent first

lastAddOn           Array of AddOn Event objects, ordered with most recent first

lastEliminated      Array of Elimination Event objects, ordered with most recent first

lastPlacedAtTable   Array of Placement Event objects, ordered with most recent first

lastPlayerEvent     Array of Player Event objects, ordered with most recent first

lastChipEvent       Array of Chip Event objects, ordered with most recent first

lastLevelEvent      Array of Level Event objects, ordered with most recent first

tournamentStarted   Array of TournamentStart Event objects

tournamentFinished  Array of TournamentEnd Event objects

Event

An event has the following variables, though the value of some may be nil, depending on the type of event. For example, only the lastEliminated events use the byNames variable, and only the lastBuyIn, lastReBuy, and lastAddOn events use the cost and chips variables, and only the placedAtTable events use the table and position variables.

time         date and time object, indicating when the event happened

names        nil or Array of Strings, the names of players related to the event

byNames      nil or Array of Strings, the names of the players who perpetrated the event

playerArray  nil or Array of Player objects related to the event

level        nil or a Number, the index of the related blind or break level

cost         nil or a Number, the amount of money each player paid

chips        nil or a Number, the amount of chips each player received

table        nil or a Number, the table number related to the event

position     nil or a Number, the position at the table