//We are supposed to activate secret?
IfOrdered
  tmpx = selforder
  tmpy = [ARCH]
  IfXIsEqualToY
    tmpargument = 1
    SetState
    tmpargument = 13500     //5 minutes
    SetContent
    
//Update timer
GetContent
tmpx = tmpargument
tmpy = 0
IfXIsMoreThanY
  tmpargument = tmpargument -1
  SetContent

// ZZ> This item is goes away when picked up, Runs end conditions
IfSpawned
  SetTurnModeToSpin
  DisableExport
IfTimeOut
  // Make sparklies
  SpawnPoof
  tmpargument = 10
  SetTime
IfGrabbed
  EnableExport
  BeatModule
  tmpargument = 0
  PlayFullSound
  StopMusic

  //Check if they made it within the time limit!
  IfStateIs1
    GetContent
    tmpx = tmpargument
    tmpy = 0
    IfXIsMoreThanY    
      tmpargument = 100
      tmpdistance = EXPSECRET
      GiveExperienceToGoodTeam
      tmpargument = [ARCH]
      AddIDSZ
      tmpargument = 1
      PlayFullSound
      tmpargument = 3
      SendMessage  
  
  SetTargetToWhoeverIsHolding
  tmpargument = 0
  SendMessageNear

  tmpargument = 100
  tmpdistance = EXPSECRET
  GiveExperienceToTarget

  tmpargument = 300
  tmpdistance = EXPQUEST
  GiveExperienceToTargetTeam

  // Set the end text
  ClearEndMessage
  tmpargument = 1
  AddEndMessage
  tmpargument = 2
  AddEndMessage

  // Mark this module as beaten, hidden modules may open up
  tmpargument = [MAIN]
  tmpdistance = 0           //The quest level
  AddQuestAllPlayers        //Add it
  
  // Become the export object
  SetTargetToSelf
  tmpargument = 125
  ChangeTargetClass
  
End					// All done
