IfSpawned
  SetTargetToSelf
  SetOwnerToTarget
  
//Give the target some kurses
IfHeld
  SetTargetToWhoeverIsHolding
  IfStateIs0
    EnchantTarget
    tmpargument = 1
    SetState
Else
  IfStateIs1
    tmpargument = 0
    SetState
    UndoEnchant

//IfNotPutAway
//  tmpargument = 4         //No longer needed, this is handled by the sourcecode now...
//  SendMessageNear

IfNotDropped
  tmpargument = 3
  SendMessageNear

IfUsed
  tmpargument = 75
  SetReloadTime

//The usual stuff
IfSpawned				//
  SetTargetToSelf
  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
  GetContent
  tmpx = tmpargument
  tmpy = 255
  IfXIsMoreThanY
    tmpargument = 255
    SetContent
  SetTargetToSelf
  KeepAction				  //

IfHitGround				// Make a sound
  tmpargument = 1			  //
  tmpdistance = rand & 2047 + 10000	  //
  PlaySound				  //

IfTakenOut				// Make a sound
  tmpargument = 2			  // 
  tmpdistance = rand & 2047 + 10000	  //
  PlaySound				  //
  SetTargetToWhoeverIsHolding		  //
  IfTargetIsAPlayer			  //
    tmpargument = 2			  //
    SendMessageNear			  //

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