// 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
  IfAmmoOut
    tmpargument = 3
    PlaySound

//Check if user poisoned himself
IfUsed
  SetTargetToWhoeverIsHolding
  tmpargument = [POIS]
  IfTargetHasSkillID		//Poison skill?
    MakeNameKnown
  Else
    tmpx = rand % 2816 + 2048 	//Wisdom determines the chance, 19 is never and 8 is almost always
    tmpy = rand % 512 + targetwis	//Randomness to decrease chance
    IfXIsMoreThanY
      SetOwnerToTarget
      EnchantTarget
      tmpargument = 2
      SendMessageNear
      DetachFromHolder
      MakeNameKnown

IfNameIsKnown
  tmpargument = 1
Else
  tmpargument = 0
ChangeArmor

//Guys with a code dont use poisoned weapons
IfGrabbed
  SetTargetToWhoeverIsHolding
  tmpargument = [CODE]
  IfTargetHasSkillID
    DetachFromHolder
    tmpargument = 3
    SendMessageNear
  
End					// All done
