Scriptname MS12bQuestScript extends Quest  

Quest Property RealQuest auto

Quest Property CourierQuest auto
Book Property QuintusLetter auto
int Property CourierDelayInDays auto
ReferenceAlias Property CourierLetterAlias auto
ReferenceAlias Property Player auto

MiscObject Property UnmeltingSnow auto
MiscObject Property TuskPowder auto
Ingredient Property BriarHeart auto

Function Setup()
	(CourierQuest as WICourierScript).AddItemToContainer(CourierLetterAlias.GetReference())
	Player.AddInventoryEventFilter(BriarHeart)
EndFunction


Function GotIngredient(ObjectReference obj)
; 	Debug.Trace("MS12b: Got ingredient -- " + obj)
	if (obj.GetBaseObject() == UnmeltingSnow)
		SetObjectiveCompleted(30)
	elseif (obj.GetBaseObject() == TuskPowder)
		SetObjectiveCompleted(40)
	elseif (obj.GetBaseObject() == BriarHeart)
		SetObjectiveCompleted(50)
	endif
	
	if (IsObjectiveCompleted(30) && IsObjectiveCompleted(40) && IsObjectiveCompleted(50)	)
		SetStage(60)
	endif
EndFunction

Function Cleanup()
	Player.RemoveInventoryEventFilter(BriarHeart)
EndFunction
