//Play music
IfSpawned
  tmpargument = 24
  tmpdistance = 0
  PlayMusic
  
  //Show the map
  ShowMap
  ShowYouAreHere

//Keep track of how many souls are saved
IfOrdered
  tmpx = selforder
  tmpy = [SOUL]
  IfXIsEqualToY
    tmpargument = selfcontent + 1
    SetContent
    
    //Save seven souls and it's done!
    tmpargument = 7
    IfContentIs
      tmpargument = 4
      SendMessage
      BeatModule
      EnableExport
      
      //Mark as beaten
      tmpargument = [BEAT]
      AddIDSZ
      
      //Do the end text
      ClearEndMessage
      tmpargument = 0
      AddEndMessage
      tmpargument = 1
      AddEndMessage
      tmpargument = 2
      AddEndMessage
      tmpargument = 3
      AddEndMessage
      
      //Victory tune
      tmpargument = 14
      tmpdistance = 0
      PlayMusic
      
      //Award some XP
      tmpargument = 100
      tmpdistance = EXPQUEST
      GiveExperienceToGoodTeam
      
End					// All done
