SCN 0AAMWAmuletOfShadesSCRIPT

; Applied to the Amulet of Shades

Short Casting
Short Timer
Short Countdown

Begin OnEquip Player
	If Casting == 0
		Set Casting to 1
		PlaySound 0ConjurationScast
	EndIf
	
	If Casting == 2
		PlaySound SPLConjurationFail		
		Set Casting to 3
		Set Timer to GetSecondsPassed
		Set Countdown to 1
	EndIf

	If Casting == 4
		PlaySound SPLConjurationFail
		Message "This magic item has insufficient charge." 
		Set Casting to 5
	EndIf

	If Casting == 6
		Message "Amulet has recharged now.  Equip to cast spell."
		Set Casting to 0
	EndIf	
End

Begin GameMode
	If Casting == 1
		Player.Cast 0summonSleastSbonewalker Player
		Set Casting to 2
	EndIf

	If Casting == 3
		Set Casting	to 4	
	EndIf

	If Countdown == 1
		If GetSecondsPassed >= Timer + 60
			Set Casting to 0
			Set Countdown to 0
		EndIf
	EndIf		

	If Casting == 5
		Set Casting to 6
	EndIf
End
