IfStateIs0
  tmpargument = 0
  tmpdistance = 0
  tmpx = selfx
  tmpy = selfy
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle

IfTimeOut

  tmpargument = 0
  SetState		//Reset

  // Wait a while
  tmpargument = 3
  SetTime

  // Check the passage
  tmpdistance = 128*2
  SetTargetToDistantEnemy
    IfTargetIsOnOtherTeam
      // The trap has been tripped
      tmpargument = 15
      tmpdistance = EXPDARE
      GiveExperienceToTarget

      tmpargument = 0
      SendMessageNear
      PlaySound

      tmpargument = [XENC]
      IfTargetHasID			//Can it be enchanted?
        DoNothing
      Else
        EnchantTarget			//Yup

      // Wait before resetting
      tmpargument = 50*30		//30 seconds
      SetTime
      tmpargument = 1
      SetState

// All done
End
