Skip to content

2 Query

HydraheadHunter edited this page Jun 30, 2024 · 1 revision

The Query mood reads it's targets stats. If it was executed through the chat, it will provide the executor with feedback which answering the query.

statistics query [@p] [stat type] [stat] [? unit]

Arguments

Query takes takes the standard three arguments: player target(s), stat type, stat.

Optionally, it can take a unit.

Unit (Optional)

Unit is a string word argument which is associated with a conversion factor (eg, an in is 2.54 cm).

Function

For each of its targets, query checks the stat requested value and provides that as feedback. When it finished doing that, it returns the sum of all stats queried. If it cannot find a player, a stat, or otherwise incurs an error, it returns -1.

With Units

When given a string, it will check if that string can be parsed as a unit, if that unit make sense for the stat being queried. If no, it will return provide feedback about the error and return -1 early. If the unit can be parsed and is sensical, it will divide the result of each query while giving feedback, but it will still return a sums based on the raw values.

Clone this wiki locally