//Ready messages
IfSpawned
  tmpargument = 0
  IfContentIs
    tmpargument = 3
    SetContent
    
  //Set up general stuff
  tmpargument = ACTIONJB
  DoAction
  KeepAction
  MakeCrushValid
    
//Let them wonder...
IfUsed
  SetTargetToWhoeverIsHolding
  tmpargument = 75
  SetReloadTime
  tmpargument = selfcontent
  SendMessageNear
  
  //Ready next message
  tmpx = selfcontent
  tmpy = 8
  IfXIsLessThanY
    tmpargument = selfcontent + 1
    SetContent
  Else
    tmpargument = 3
    SetContent
  
//Poof!
IfCrushed
  SpawnPoof
  SpawnPoof
  tmpargument = 1
  SendMessageNear

// Make it lie on the floor
IfDropped
  KeepAction

// Play a clink or clang
IfHitGround
  tmpargument = 0
  PlaySound

// Alert others to draw
IfTakenOut
  SetTargetToWhoeverIsHolding
  IfTargetIsAPlayer
    tmpargument = 2
    SendMessageNear

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

// Finish up
End
