IfSpawned
  tmpargument = 8
  tmpdistance = 0
  PlayMusic
  
  tmpargument = rand % 5        //Random particle type
  tmpdistance = 0
  tmpx = rand % 768 - 348 + selfspawnx
  tmpy = rand % 768 - 348 + selfspawny
  SpawnExactParticle
  
  tmpargument = rand % 5        //Random particle type
  tmpdistance = 0
  tmpx = rand % 768 - 348 + selfspawnx
  tmpy = rand % 768 - 348 + selfspawny
  SpawnExactParticle
  
  tmpargument = rand % 5        //Random particle type
  tmpdistance = 0
  tmpx = rand % 768 - 348 + selfspawnx
  tmpy = rand % 768 - 348 + selfspawny
  SpawnExactParticle
  
  tmpargument = rand % 5        //Random particle type
  tmpdistance = 0
  tmpx = rand % 768 - 348 + selfspawnx
  tmpy = rand % 768 - 348 + selfspawny
  SpawnExactParticle
  
  tmpargument = rand % 5        //Random particle type
  tmpdistance = 0
  tmpx = rand % 768 - 348 + selfspawnx
  tmpy = rand % 768 - 348 + selfspawny
  SpawnExactParticle

  tmpargument = rand % 5        //Random particle type
  tmpdistance = 0
  tmpx = rand % 768 - 348 + selfspawnx
  tmpy = rand % 768 - 348 + selfspawny
  SpawnExactParticle
  
  tmpargument = rand % 5        //Random particle type
  tmpdistance = 0
  tmpx = rand % 768 - 348 + selfspawnx
  tmpy = rand % 768 - 348 + selfspawny
  SpawnExactParticle
  
  tmpargument = rand % 5        //Random particle type
  tmpdistance = 0
  tmpx = rand % 768 - 348 + selfspawnx
  tmpy = rand % 768 - 348 + selfspawny
  SpawnExactParticle  
  
  tmpargument = 50*60*60 //one hour
  SetContent

//Update the game timer
tmpx = selfcontent
tmpy = 0
IfXIsMoreThanY
  tmpargument = selfcontent - 1
  SetContent
  ShowTimer
  
IfOrdered
  tmpx = selforder
  tmpy = [BEAT]
  IfXIsEqualToY
    tmpargument = [IMPA]          //Imprisoned one level 1
    tmpdistance = selfcontent     //Store time left on this level
    AddQuestAllPlayers
    BeatModule
    EnableExport
    EndModule
    ClearEndMessage
    tmpy = selfcontent / 60 / 50      //Calculate amount of time left from the ticks
    tmpx = selfcontent / 50
    tmpx = tmpx % 60
    tmpargument = 0
    AddEndMessage
    tmpargument = 1
    AddEndMessage
    tmpargument = 2
    AddEndMessage
    tmpargument = 3
    AddEndMessage
    tmpargument = 4
    AddEndMessage

//------------------------------------------------------------------------------------
End					// All done
//------------------------------------------------------------------------------------
