wiki:pk

This command tells you the opcode and id number of the command that will be executed after it finishes. (In other words, if you do a "n pk ... 0" it will tell you what command was currently executing when you sent that.)

Parameters:

  • 1: integer depth. A value of zero indicates the command that will execute as soon as this peek finishes, a value of -1 is this command. 2 and beyond are further down the queue.

Responds:

  • X OC ID where X, is the number of commands in the queue (not counting this command), OC is the opcode of the next command, and ID is the id number of the next command.
  • X 00 0 with X as above if X is less than the depth. (In this case there is no OC or ID to print.)

Reports:

  • done immediately.
  • popped if popped by po.
  • forgotten if deleted by fa or fm.
  • replaced if replaced by a command scheduled with 'r'.

Example:

  • User sends: "n mi 222 0 0 1"
  • Bot begins moving.
  • User sends: "n pk 512 0"
  • Bot replies "rs pk 512 1 mi 222"
  • Bot replies "cp pk 512 done"
Last modified 13 years ago Last modified on Jun 15, 2011 3:05:28 PM