benilla-re systems structs docs

GetDrawRecord

function · ui · primitive

Address
0x4c41a0 · 105 bytes, up to 0x4c4208
Meaning
Copies the four numbers and the age of the draw record an index selects
Confidence
verified, proof one
Finding
ui/lottery#draws

Finding: Draws in ui: the lottery and minigame functions

GetNextDrawTime() pushes the next draw time minus now and GetNumPastDrawResults() the count of records whose first number is nonzero; both return 0, so Lua receives nothing. GetPastDrawResult(i) returns five values: the record's four numbers and its age in seconds, now minus +0x4. It picks the first record at which the running count of used records equals i - 1, so i from 2 to 5 gives the used records in order and 1 gives the first record only when that record is empty. No such record raises Invalid index in GetPastDrawResults("type", index).

The derivation is in the doc.

Callers 1

Callees 1

Calls and jumps by a bare address, from tables/calls.tsv.