T.I.T.S. script functions¶
Functions for C# (Cb.Call) and Python (cb.call). See Script functions for how to use them.
tits.activateTrigger¶
Runs one of the triggers you set up in T.I.T.S., by its id or name. Fails with an error when T.I.T.S. is not connected.
| Value | What to put in |
|---|---|
trigger |
The trigger's id or name, like "Rain". |
Gives back: true when T.I.T.S. accepted it.
var answer = await Cb.Call("tits.activateTrigger", new { trigger = "Rain" });
answer = cb.call("tits.activateTrigger", trigger="Rain")
tits.activateTriggerByName¶
Runs one of the triggers you set up in T.I.T.S., by its name. Fails with an error when T.I.T.S. is not connected.
| Value | What to put in |
|---|---|
triggerName |
The trigger's name as T.I.T.S. shows it, like "Rain". |
Gives back: true when T.I.T.S. accepted it.
var answer = await Cb.Call("tits.activateTriggerByName", new { triggerName = "Rain" });
answer = cb.call("tits.activateTriggerByName", triggerName="Rain")
tits.connect¶
Starts connecting to T.I.T.S. It does not wait: Cuebot keeps trying in the background until it works.
Gives back: true once connecting has started (not when it is connected).
var answer = await Cb.Call("tits.connect");
answer = cb.call("tits.connect")
tits.disconnect¶
Disconnects Cuebot from T.I.T.S.
Gives back: true when done.
var answer = await Cb.Call("tits.disconnect");
answer = cb.call("tits.disconnect")
tits.getItems¶
Lists the items you can throw in T.I.T.S.
Gives back: A list of items. Each has id and name.
var answer = await Cb.Call("tits.getItems");
answer = cb.call("tits.getItems")
tits.getTriggers¶
Lists the triggers you set up in T.I.T.S.
Gives back: A list of triggers. Each has id and name.
var answer = await Cb.Call("tits.getTriggers");
answer = cb.call("tits.getTriggers")
tits.isConnected¶
Checks whether Cuebot is connected to T.I.T.S. (Twitch Integrated Throwing System) right now.
Gives back: true while connected, otherwise false.
var answer = await Cb.Call("tits.isConnected");
answer = cb.call("tits.isConnected")
tits.throwItemByName¶
Throws an item at your model in T.I.T.S. Fails with an error when T.I.T.S. has no item with that name or is not connected.
| Value | What to put in |
|---|---|
itemName |
The item's name as T.I.T.S. shows it, like "Tomato". An id works too. |
delay |
Optional. Seconds between throws when throwing more than one. Default 0.05. |
amount |
Optional. How many to throw, 1 or more. Default 1. |
Gives back: true when something was thrown.
var answer = await Cb.Call("tits.throwItemByName", new { itemName = "Tomato", amount = 5 });
answer = cb.call("tits.throwItemByName", itemName="Tomato", amount=5)
tits.throwItems¶
Throws items at your model in T.I.T.S., picked at random from your list. Fails with an error when one of the items is unknown.
| Value | What to put in |
|---|---|
items |
The items to pick from, by name or id: a list like ["Tomato", "Pillow"], or text split with commas. |
delay |
Optional. Seconds between throws. Default 0.05. |
amount |
Optional. How many to throw, 1 or more. Default 1. |
Gives back: How many items were thrown.
var answer = await Cb.Call("tits.throwItems", new { items = new[] { "Tomato", "Pillow" }, amount = 10 });
answer = cb.call("tits.throwItems", items=["Tomato", "Pillow"], amount=10)