Barebones function 121

From Unofficial QEdit Wiki Guide
Revision as of 23:57, 26 March 2013 by Japanaman2 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Barebones function 121

Function 121: 121:

  • Function 121 = Part of UTC time.

UTC time

Coordinated Universal Time (UTC) can be used for several things most commonly used to lock events, or access to cretin parts of a quest, or even access to quests by time of day, or run seconds games it is very useful. And anything else you can think of to base time on be creative.

For conversions from beat time see beat time conversion tool [1]

Barebones function 120 = Function 120 is threaded when the quest begins in Barebones function 10500. Waits 1 frame. Store the current number of frames in a day in register 64. Then jumps to function 121.

Barebones function 121 = Function 121 breaks down the current number of frames in the day into current number of seconds in the day, and current UTC time. Then jumps back to function 120 to re get the time and keep the time moving and current.

Barebones function 122 = Function 122 Displays a window message telling the player the current UTC time (24hour clock) hours register 67 : minutes register 68 : seconds register 69. the current number of seconds in the day register 66, and the current number of frames in the day register 64.


Use

Function 121 breaks down the current number of frames in the day into current number of seconds in the day, and current UTC time. Then jumps back to function 120 to re get the time and keep the time moving and current.

How the function appears in the script


121:     let R65, R64 //Makes register 65 equal to register 64.
         modi R65, 00015180 //Preforms modular math on the value of register 65 by 00015180, and stores the new value in register 65.
         let R66, R65 //Makes the value of register 66 equal the value of register 65.
         let R67, R66 //Makes the value of register 67 equal the value of register 66.
         divi R67, 00000E10 //Divides the value of register 67 by 00000E10.
         let R68, R66 //Makes the value of register 68 equal the value of register 66.
         modi R68, 00000E10 //Preforms modular math on the value of register 65 by 00000E10, and stores the new value in register 68.
         divi R68, 0000003C //Divides the value of register 68 by 0000003C.
         let R69, R66 //Makes the value of register 69 equal the value of register 66.
         modi R69, 0000003C //Preforms modular math on the value of register 69 by 0000003C, and stores the new value in register 69.
         jmp 120 //Jumps to function 120.

Also see

let, modi, divi, jmp,

Barebones function 120, Barebones function 122