Energy #

Read more about the Energy system in Hiro here.

Get all energies #

Get the energies and their current timers for the player.

1
2
var energyList = await hiro.energyGet(session)
print(energyList)

Spend one or more energies #

Spend one or more energies for the player.

1
2
3
4
5
6
7
8
var request =  Hiro.EnergySpendRequest.new()
request.amounts = {
    "power": 10,
    "tickets": 1
}

var energySpendRewards = await hiro.energySpend(session, request)
print(energySpendRewards)

Granting energy #

While energy can be granted as part of a reward, you can also grant it directly.

1
2
3
4
5
6
7
8
var request = Hiro.EnergyGrantRequest.new()
request.amounts = {
    "power": 10,
    "tickets": 1
}

var energyList = await hiro.energyGrant(session, request)
print(energyList)