// ZZ> This function makes an item fall to the floor when spawned
IfSpawned				//
  tmpargument = ACTIONJB		  //
  DoAction				  //
  KeepAction				  //
  MakeCrushValid
IfCrushed
  tmpx = selfx
  tmpy = selfy
  tmpdistance = selfz
  tmpargument = 1
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  GoPoof
  tmpargument = 1
  SendMessageNear
IfDropped				// Make it lie on floor
  KeepAction				  //
IfGrabbed				// Tell them what they've won...
  SetTargetToWhoeverIsHolding		  //
  IfTargetIsAPlayer			  //
    tmpargument = 0			  //
    SendMessageNear			  //
IfHitGround				// Make a sound
  tmpargument = 1			  //
  tmpdistance = rand % 2047 + 6000	  //
  PlaySound				  //
IfNotDropped
  tmpargument = 2
  SendMessageNear
IfTakenOut
  SetTargetToWhoeverIsHolding
  IfTargetIsAPlayer
    tmpargument = 4
    SendMessageNear
IfNotPutAway
  tmpargument = 3
  SendMessageNear
IfSpawned
  tmpargument = 1000
  SetTime
IfUsed
  tmpargument = 40 // Make it attack a bit slowly
  SetReloadTime
// This is the script to make it strike you (and instantly kill you) when you don't use it
// for twenty seconds.
IfHeld
  IfTimeOut
    tmpargument = 50                       //1 second
    SetTime
    GetContent                                 //Content=total seconds
    tmpargument = tmpargument + 1
    SetContent

    tmpx = tmpargument
    tmpy = 5
    IfXIsLessThanY                        //5 seconds and below
      tmpargument = 0
      SetRedShift
    tmpy = 20                                //20 seconds and above
    IfXIsMoreThanY
      SetTargetToWhoeverIsHolding
      KillTarget
      tmpargument = 0
      SetContent
      tmpargument = 3
      tmpx = targetx                    //Too late. Time to DIE!
      tmpy = targety
      tmpdistance = targetz
      SpawnExactParticle
      tmpargument = 2
      PlaySound
      tmpargument = 6
      SendMessageNear
      tmpargument = 0
      SetRedShift
    Else
      tmpy = 15                                //15 seconds and above
      IfXIsMoreThanY
        tmpargument = 3
        SetRedShift
        tmpargument = 5
        SendMessageNear                 //Uh-oh....
      Else
        tmpy = 10                             //10 seconds and above
        IfXIsMoreThanY
          tmpargument = 2
          SetRedShift
        Else
          tmpy = 5                            //5 seconds and above
          IfXIsMoreThanY
            tmpargument = 1
            SetRedShift

//Reset counter
IfUsed
  tmpargument = 0
  SetContent

End					// All done
