//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

  tmpargument = 3
  IfContentIs
    tmpargument = rand & 1
    SetContent

//Check if to rise undead and rise ghouls
IfTimeOut
  GetContent
  tmpx = tmpargument
  tmpy = 2			//2 is normal body
  IfXIsLessThanY
    tmpargument = rand % 300 + 350	//Distance to check
    SetTargetToDistantEnemy
      tmpargument = 0
      IfContentIs
        tmpargument = 47	//Zombi
      Else
        tmpargument = 42	//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 = 5
  SetTime

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