Scriptname SandsScript extends ObjectReference  

FormList Property SandsList Auto  
 
Spell Property sandsSpell auto

weapon property sands auto


Event OnAnimationEvent(ObjectReference akSource, string asEventName)
	if(akSource == self)
		 if (asEventName == "WeaponDraw")

			if Game.GetPlayer().IsEquipped(sands) 

			sandsSpell.cast (self)


			endif

			

			endif
			
		elseif (asEventName == "WeaponSheathe") 
			

			
		endif
	




endEvent










Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference)

if (Game.GetPlayer().RemoveSpell (sandsSpell ))
 
endIf

endEvent



Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference)

	if  SandsList.HasForm(akBaseObject)
		RegisterForAnimationEvent(Game.GetPlayer(), "WeaponDraw")
		RegisterForAnimationEvent(Game.GetPlayer(), "WeaponSheathe")
		Game.GetPlayer().AddSpell(sandsSpell, false)
	




		

	endif

endEvent