// ZZ> This function makes an item fall to the floor when spawned
IfUsed
  SetTargetToWhoeverIsHolding
  tmpargument = 256   //1 mana
  CostTargetMana
    tmpargument = 0          //Spawn an arrow
    tmpx = selfx
    tmpy = selfy
    tmpdistance = selfz + 100
    SpawnExactParticle
  Else
    tmpargument = 2       //Tell them they need more mana
    SendMessageNear
    tmpargument = 4
    PlaySound
    tmpargument = 50
    SetReloadTime       //long wait time
    
IfSpawned				//
  MakeAmmoKnown				  //
  tmpargument = ACTIONJB		  //
  DoAction				  //
  KeepAction				  //
  MakeCrushValid
IfCrushed
  tmpx = selfx
  tmpy = selfy
  tmpdistance = selfz
  tmpargument = 4
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  GoPoof
  tmpargument = 1
  SendMessageNear
IfDropped				// Make it lie on floor
  KeepAction				  //
IfHitGround				// Play the drop sound
  tmpargument = 2			  //
  PlaySound				  //
IfGrabbed				// Tell them what they've won...
  SetTargetToWhoeverIsHolding		  //
  IfTargetIsAPlayer			  //
    tmpargument = 0			  //
    SendMessageNear			  //

End					// All done
