//-----------------------------------------------------------------------------
// ZZ> Gong sound
IfCleanedUp
  tmpargument = 6
  tmpdistance = 8000
  PlayFullSound


IfTooMuchBaggage
  tmpargument = 8
  tmpdistance = rand & 1023 + 13000
  PlaySound
  tmpargument = 6
  SendMessageNear


IfUsed
  tmpargument = 7
  tmpdistance = rand & 2047 + 13000
  PlaySound


IfKilled				// This reduces the height of the char
  tmpargument = 2			  // Death sound
  tmpdistance = rand & 2047 + 13000	  //
  PlaySound				  //
  tmpargument = 3
  IfArmorIs
    tmpargument = MESSAGECOSTUME
  Else
    tmpargument = MESSAGEDEATH		  // Last words...
  IfTargetIsOnSameTeam			  // Fragged!
    tmpargument = MESSAGEFRAG		    //
    IfTargetIsSelf			    // No, just a damage tile
      tmpargument = MESSAGEACCIDENT           //
  SendMessage				  //
  tmpargument = selflevel*selflevel*100		//The money loss formula
  DropMoney				  //
  DropKeys
  tmpargument = 45			  //
  SetBumpHeight				  //


//------------------------------------------------------------------------------
//Invoke special power if enough xp gained
SetTargetToSelf
tmpx = targetexp
tmpy = 9998
IfXIsMoreThanY
  UndoEnchant		//Hinder looping of same enchant
  SetOwnerToTarget
  EnchantTarget		//Give the special bonus
  tmpargument = 2	//Spawn some fancy sparklies
  tmpx = selfx
  tmpy = selfy
  tmpdistance = selfz
  SpawnExactParticle
Else
  UndoEnchant		//Remove if needed xp is lost


IfLeaderKilled				// Take control
  BecomeLeader				  //
IfAttacked				// Yell at friends
  SetTargetToWhoeverAttacked		  //
  IfTargetIsOnSameTeam			  //
    tmpargument = MESSAGEOUCH		    //
    SendMessageNear			    //
    tmpargument = 5			    // Stop That sound
    tmpdistance = rand & 2047 + 13000	    //
    PlaySound				    //
  Else					  //
    tmpargument = rand & 1 + 3		    // Damage sounds
    tmpdistance = rand & 2047 + 13000	    //
    PlaySound				    //
End
