//Set our hp on spawn
IfSpawned
  tmpargument = selflife
  SetState
    
//Someone is taking pictures or punching us
tmpx = selfstate
tmpy = selflife
IfXIsMoreThanY
  SetTargetToNearestEnemy
  IfTimeOut
    tmpargument = 50
    SetTime
    
    //Become a bit more angry
    GetContent
    SendMessage
    PlayFullSound
    tmpargument = tmpargument + 1
    SetContent

    //Fourth time is the charm
    tmpargument = 4
    IfContentIs
      GoPoof
      tmpargument = 0
      tmpx = selfx
      tmpy = selfy
      tmpdistance = selfz
      SpawnExactParticle
 
      //Release the mummy!
      tmpargument = 54		//mummy
      tmpx = selfx
      tmpy = selfy
      tmpdistance = selfz
      tmpturn = selfturn
      SpawnExactCharacterXYZ
      
      //Give some XP
      tmpargument = 100
      tmpdistance = EXPSECRET
      GiveExperienceToGoodTeam
      
      //Play some more dramatic music
      tmpargument = 20
      tmpdistance = 0
      PlayMusic
    
  //Remember our last hp
  tmpargument = selflife
  SetState

//Interest the player  
IfBumped
  IfTimeOut
    tmpargument = 4
    SendMessageNear
    tmpargument = 50
    SetTime

End
