count
returns int
count(items: list<int>) -> intcount(items: list<string>) -> intcount(items: list<tile>) -> intcount(items: list<item>) -> intcount(items: list<bankitem>) -> intcount(items: list<npc>) -> intcount(items: list<player>) -> intcount(items: list<object>) -> intcount(items: list<wall>) -> intcount(items: list<drop>) -> intcount(items: list<bag>) -> int
How many numbers a list holds.
How many strings a list holds.
How many tiles a list holds.
How many items a list holds.
How many bank items a list holds.
How many npcs a list holds.
How many players a list holds.
How many objects a list holds.
How many walls a list holds.
How many drops a list holds.
How many bags a list holds.
| Parameter | Type | What it does |
| itemsrequired |
list<int> |
a list of numbers |
Example
print("numbers:", count(range(0, 5)))
print("strings:", count(menuOptions()))
print("tiles:", count(path(myTile())))
print("items:", count(inv()))
print("bank items:", count(bank()))
print("npcs:", count(npcs()))
print("players:", count(players()))
print("objects:", count(objects()))
print("walls:", count(walls()))
print("drops:", count(drops()))
print("bags:", count(bagList()))
isEmpty
returns bool
isEmpty(items: list<int>) -> boolisEmpty(items: list<string>) -> boolisEmpty(items: list<tile>) -> boolisEmpty(items: list<item>) -> boolisEmpty(items: list<bankitem>) -> boolisEmpty(items: list<npc>) -> boolisEmpty(items: list<player>) -> boolisEmpty(items: list<object>) -> boolisEmpty(items: list<wall>) -> boolisEmpty(items: list<drop>) -> boolisEmpty(items: list<bag>) -> bool
Whether a list of numbers holds nothing. The same as count() == 0, and it reads better in a condition.
Whether a list of strings holds nothing. The same as count() == 0, and it reads better in a condition.
Whether a list of tiles holds nothing. The same as count() == 0, and it reads better in a condition.
Whether a list of items holds nothing. The same as count() == 0, and it reads better in a condition.
Whether a list of bank items holds nothing. The same as count() == 0, and it reads better in a condition.
Whether a list of npcs holds nothing. The same as count() == 0, and it reads better in a condition.
Whether a list of players holds nothing. The same as count() == 0, and it reads better in a condition.
Whether a list of objects holds nothing. The same as count() == 0, and it reads better in a condition.
Whether a list of walls holds nothing. The same as count() == 0, and it reads better in a condition.
Whether a list of drops holds nothing. The same as count() == 0, and it reads better in a condition.
Whether a list of bags holds nothing. The same as count() == 0, and it reads better in a condition.
| Parameter | Type | What it does |
| itemsrequired |
list<int> |
a list of numbers |
Example
if isEmpty(range(0, 5)) { print("no number here") }
if isEmpty(menuOptions()) { print("no string here") }
if isEmpty(path(myTile())) { print("no tile here") }
if isEmpty(inv()) { print("no item here") }
if isEmpty(bank()) { print("no bankitem here") }
if isEmpty(npcs()) { print("no npc here") }
if isEmpty(players()) { print("no player here") }
if isEmpty(objects()) { print("no object here") }
if isEmpty(walls()) { print("no wall here") }
if isEmpty(drops()) { print("no drop here") }
if isEmpty(bagList()) { print("no bag here") }
print
print()print(value1: any)print(value1: any, value2: any)print(value1: any, value2: any, value3: any)print(value1: any, value2: any, value3: any, value4: any)print(value1: any, value2: any, value3: any, value4: any, value5: any)print(value1: any, value2: any, value3: any, value4: any, value5: any, value6: any)print(value1: any, value2: any, value3: any, value4: any, value5: any, value6: any, value7: any)print(value1: any, value2: any, value3: any, value4: any, value5: any, value6: any, value7: any, value8: any)
Writes a line to the console, joining its arguments with a space. Takes any value of any type, so a number does not have to be turned into text first.
| Parameter | Type | What it does |
| value1required |
any |
anything at all |
| value2required |
any |
anything at all |
| value3required |
any |
anything at all |
| value4required |
any |
anything at all |
| value5required |
any |
anything at all |
| value6required |
any |
anything at all |
| value7required |
any |
anything at all |
| value8required |
any |
anything at all |
Example
print()
print("trip")
print("trip", 3)
print("trip", 3, "of")
print("trip", 3, "of", 10)
print("trip", 3, "of", 10, "done")
print("trip", 3, "of", 10, "done", true)
print("trip", 3, "of", 10, "done", true, "at")
print("trip", 3, "of", 10, "done", true, "at", 600)
str
returns string
str(value: any) -> string
Any value as text. A tile reads as (303, 553) rather than as the record the game keeps it in, and none reads as "none".
| Parameter | Type | What it does |
| valuerequired |
any |
anything at all |
Example
print("standing at " + str(myTile()))
trace
trace()trace(value1: any)trace(value1: any, value2: any)trace(value1: any, value2: any, value3: any)trace(value1: any, value2: any, value3: any, value4: any)trace(value1: any, value2: any, value3: any, value4: any, value5: any)trace(value1: any, value2: any, value3: any, value4: any, value5: any, value6: any)trace(value1: any, value2: any, value3: any, value4: any, value5: any, value6: any, value7: any)trace(value1: any, value2: any, value3: any, value4: any, value5: any, value6: any, value7: any, value8: any)
Writes a line only when tracing is switched on, for the running commentary a working script should not print for hours.
| Parameter | Type | What it does |
| value1required |
any |
anything at all |
| value2required |
any |
anything at all |
| value3required |
any |
anything at all |
| value4required |
any |
anything at all |
| value5required |
any |
anything at all |
| value6required |
any |
anything at all |
| value7required |
any |
anything at all |
| value8required |
any |
anything at all |
Example
trace()
trace("trip")
trace("trip", 3)
trace("trip", 3, "of")
trace("trip", 3, "of", 10)
trace("trip", 3, "of", 10, "done")
trace("trip", 3, "of", 10, "done", true)
trace("trip", 3, "of", 10, "done", true, "at")
trace("trip", 3, "of", 10, "done", true, "at", 600)
No command on this page matches that. The search box looks across every page.