// ZZ> This function makes an item fall to the floor when spawned
IfSpawned				//
  MakeAmmoKnown				  //
  tmpargument = ACTIONJB		  //
  DoAction				  //
  KeepAction				  //
  MakeCrushValid

IfCrushed
  tmpx = selfx
  tmpy = selfy
  tmpdistance = selfz
  tmpargument = 2
  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			  //
IfUsed
  tmpargument = 25		//Attack speed
  SetReloadTime
  IfAmmoOut
    tmpargument = 3
    PlaySound

//Check if user poisoned himself
IfUsed
  SetTargetToWhoeverIsHolding
  tmpargument = [POIS]
  IfTargetHasSkillID		//Poison skill?
    DoNothing			//nothing happens
    MakeNameKnown
  Else
    tmpx = rand & 2816 + 1536 	//Wisdom determines the chance, 17 is never and 6 is almost always
    tmpy = rand & 1000 + targetwis	//Randomness to decrease chance
    IfXIsMoreThanY
      SetOwnerToTarget
      EnchantTarget
      tmpargument = 5
      SendMessageNear
      DetachFromHolder
      MakeNameKnown

IfNameIsKnown
  tmpargument = 1
Else
  tmpargument = 0
ChangeArmor

//Paladins dont use poisoned weapons
IfGrabbed
  SetTargetToWhoeverIsHolding
  tmpargument = [PALA]
  IfTargetHasID
    DetachFromHolder
    tmpargument = 6
    SendMessageNear
  
End					// All done
