//Make it Glow
ReaffirmCharacter

//Blacken Status bars
SetTargetToWhoeverIsHolding
  UndoEnchant
  SetOwnerToTarget
  EnchantTarget
Else
  UndoEnchant

// ZZ> This function makes an item fall to the floor when spawned
IfSpawned				//
  tmpargument = ACTIONJB		  //
  DoAction				  //
  KeepAction				  //
  MakeCrushValid

//Poof if crushed
IfCrushed
  tmpx = selfx
  tmpy = selfy
  tmpdistance = selfz
  tmpargument = 1
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  GoPoof
  tmpargument = 1
  SendMessageNear

//Scream every so often
IfTimeOut
  tmpargument = rand & 63 + 90
  SetTime
  SetTargetToWhoeverIsHolding
    IfTargetIsAPlayer
      tmpx = 20
      tmpy = rand & 100
      IfXIsMoreThanY
        tmpargument = 5
        SendMessageNear
        PlaySound

IfDropped				// Make it lie on floor
  KeepAction				  //
  UndoEnchant

IfGrabbed				// Tell them what they've won...
  SetTargetToWhoeverIsHolding		  //
  IfTargetIsAPlayer			  //
    tmpargument = 0			  //
    SendMessageNear			  //

//Make a sound if dropped on ground
IfHitGround				// Make a sound
  tmpargument = 1			  //
  tmpdistance = rand & 2047 + 10000	  //
  PlaySound				  //

//Tell its cursed
IfNotDropped
  tmpargument = 2
  SendMessageNear
IfNotPutAway
  tmpargument = 3
  SendMessageNear


//Tell the players what they got
IfTakenOut
  SetTargetToWhoeverIsHolding
  IfTargetIsAPlayer
    tmpargument = 4
    SendMessageNear

//Remove enchant if not holding
IfPutAway
  UndoEnchant

End					// All done
