//This describes the contents effects:
//0: Spawn zombi
//1: Spawn Ghost
//2: Just a normal body
//3: Spawn random

//Bodies are dead (Duh)
IfSpawned
  tmpargument = rand & 3
  ChangeArmor			//Randomize skin
  tmpargument = ACTIONKA	//Killed
  DoActionOverride
  KeepAction
  JoinEvilTeam

  //Randomize what monster to become
  tmpargument = 3
  IfContentIs
    tmpargument = rand & 1
    SetContent

//Check if to rise undead
IfTimeOut
  tmpx = selfcontent
  tmpy = 2			//2 is normal body
  IfXIsLessThanY
    tmpargument = rand % 300 + 300	//Distance to check
    SetTargetToDistantEnemy
      tmpargument = 0
      IfContentIs
        tmpargument = 52	//Zombi
      Else
        tmpargument = 47	//Ghost
      tmpx = selfx
      tmpy = selfy
      tmpturn = selfturn
      tmpdistance = selfz
      SpawnExactCharacterXYZ
        tmpargument = ACTIONMD	//Rise from the dead
        ChildDoActionOverride
        GoPoof		//Remove Body
        tmpargument = 0 //Message and sound
        SendMessageNear
        PlaySound
  tmpargument = rand & 7 + 15
  SetTime

//------------------------------------------------------------------------------
End
//------------------------------------------------------------------------------
