IfKilled
  tmpargument = [FAER]
  IssueOrder
  tmpdistance = [FAER]
  OrderSpecialID            //Tell the faerie ring that its done

IfHealed
  // Spawn a defense ping
  IfStateIs0
    tmpx = selfx
    tmpy = selfy
    tmpdistance = selfz
    tmpargument = 0
    SpawnExactParticle
    tmpargument = 1
    SetState
    tmpargument = 20
    SetTime

IfAttacked
  // Must die in 1 hit to disallow punching it open
  tmpargument = 512
  HealSelf
  // Spawn a defense ping
  IfStateIs0
    tmpx = selfx
    tmpy = selfy
    tmpdistance = selfz
    tmpargument = 0
    SpawnExactParticle
    tmpargument = 1
    SetState
    tmpargument = 20
    SetTime

IfTimeOut
  // Ready the pings
  tmpargument = 0
  SetState
  tmpargument = 500
  SetTime

IfKilled
  // Smash open
  tmpargument = [GOOD]
  IfTargetHasSpecialID
    tmpargument = 20
    tmpdistance = EXPROLEPLAY
    GiveExperienceToTarget
    tmpturn = 0
  Else
    tmpturn = 1

  // Check for passages to open
  tmpx = passage
  tmpy = 0
  IfXIsEqualToY
    // Play the break sound
    tmpargument = 2
    PlaySound
  Else
    tmpargument = tmpx
    OpenPassage
    // Play the secret music
    tmpargument = 1
    PlaySound
    // Give experience
    tmpargument = 20
    tmpdistance = EXPSECRET
    GiveExperienceToTarget
    tmpturn = 2
  tmpargument = tmpturn
  SendMessageNear

  // Drop goodies
  DropItems
  tmpargument = 65535
  DropMoney

  // Replace self with an imposter...
  tmpargument = 48
  tmpx = selfx
  tmpy = selfy
  tmpdistance = selfz
  tmpturn = selfturn
  SpawnExactCharacterXYZ
  GoPoof
End
