Send statistic?

From Unofficial QEdit Wiki Guide
Jump to: navigation, search

Syntax

Syntax: send_statistic? register1, register2, register3, register4, register5, register6, register7, register8

  • register1 = This register contains the value of whether or not the quest was completed successfully.
  • register2 = This register contains the number of kills made during the quest.
  • register3 = This register contains the time in seconds.
  • register4 = This register contains the number of frames.
  • register5 = This register contains the gender of the player.
  • register6 = This register contains the characters class (race).
  • register7 = This register contains the characters class (class type: HU/RA/FO).
  • register8 = This register contains flag for whether or not hacking/tampering was detected.

NOTE: While you can put any values into send_statistic? and in any order, the above is what Sega tend to use the value for.

Use

This Opcode must be used after prepare_statistic?. It informs the ship of the quest scores.

Example


100:     leti R100, 00000001 //Quest number 1. This is validated by the Ship so an incorrect number will return an error.
         prepare_statistic? R100, 200, 210
         send_statistic? R1, R2, R3, R4, R5, R6, R7, R8
         clear R10
         clear R11
         clear R12
101:     sync
         addi R10, 000000001
         jmpi_>= R10, 00000012C, 110 //If loop has run for 300 frames (10 Seconds)
         jmpi_= R11, 000000001, 120
         jmpi_= R12, 000000000, 101 
         window_msg 'The Ship has responded and has requested to open thread on success function'
         winend 
         ret 
110:     window_msg 'There has been no response from the ship. Timed out.'
         winend 
         ret 
120:     window_msg 'There has been an error. Ship has requested to open thread on failure function.'
         winend 
         ret 
200:     set R12 //Received successful response from Ship.
         ret 
210:     set R11 //Received failure response from Ship.
         ret 

Also see

leti, prepare_statistic?, clear, sync, addi, jmpi_>=, jmpi_=, jmp, window_msg, winend, set, ret