//Magical effects
IfTimeOut
  tmpargument = 5 + rand & 10
  SetTime

  //Lightning along the blade
  tmpargument = 2
  tmpx = 0
  tmpy = 0
  tmpdistance = rand % 9 + 5 // Pick a vertex along the blade ( look at model )
  SpawnParticle

  //Sound effect?
  GetContent
  tmpx = tmpargument
  tmpy = 175
  IfXIsMoreThanY
    tmpargument = 3
    tmpdistance = rand & 8000 + 10000
    PlaySound
    tmpargument = 0
    SetContent
  Else
    GetContent
    tmpargument = rand & 4 + tmpargument
    SetContent

//Lightning sound
IfUsed
  tmpargument = 4
  tmpdistance = rand & 8000 + 10000
  PlaySound
  tmpargument = 15
  SetReloadTime

//Standard weapon AI
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 + 10000	  //
  PlaySound				  //
IfNotDropped
  tmpargument = 2
  SendMessageNear
IfTakenOut
  tmpargument = 2
  tmpdistance = rand & 2047 + 10000
  PlaySound
  SetTargetToWhoeverIsHolding
  IfTargetIsAPlayer
    tmpargument = 4
    SendMessageNear
IfNotPutAway
  tmpargument = 3
  SendMessageNear
End					// All done
