//Dont let players get this weapon
IfHitGround
  GoPoof

//Attack speed
IfUsed
  SetTargetToWhoeverIsHolding
  tmpargument = targetdex > 8
  tmpargument = 50 - tmpargument
  SetReloadTime

//Spawn elemental effects along the blade
tmpargument = selfstate + 2
tmpx = 0
tmpy = 0
tmpdistance = rand % 70 // Pick a vertex along the blade ( look at model )
SpawnParticle

//Change element when used
IfUsed
  tmpargument = rand & 3
  SetState
  IfStateIs0
    tmpargument = DAMAGEFIRE
    SetDamageType
  IfStateIs1
    tmpargument = DAMAGEICE
    SetDamageType
  IfStateIs2
    tmpargument = DAMAGEZAP
    SetDamageType
  IfStateIs3
    tmpargument = DAMAGEEVIL
    SetDamageType

  tmpargument = selfstate
  ChangeArmor
  PlaySound

// 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				  //
IfHitGround				// Make a sound
  tmpargument = 4			  //
  PlaySound				  //
IfTakenOut				// Make a sound
  tmpargument = 5			  //
  PlaySound				  //
  SetTargetToWhoeverIsHolding		  //
  IfTargetIsAPlayer			  //
    tmpargument = 2			  //
    SendMessageNear			  //
IfGrabbed				// Tell them what they've won...
  SetTargetToWhoeverIsHolding		  //
  IfTargetIsAPlayer			  //
    tmpargument = 0			  //
    SendMessageNear			  //
End					// All done
