Scriptname __LALLTriggerboxSetStageScript  extends ReferenceAlias
;Attach to a triggerbox using referenceAlias in quest. Sets a stage when box is entered if quest stage is within stages

Actor Property PlayerRef Auto
Int Property ReqStageMin Auto
Int Property ReqStageMax Auto
Quest Property QuestToCheck Auto
Quest Property QuestToSet Auto
Int Property StageToSet Auto


Event OnTriggerEnter(objectReference akActionRef)
if akActionRef == PlayerRef
int QstStage = QuestToCheck.GetStage()
if QstStage >= ReqStageMin && QstStage <= ReqStageMax
QuestToSet.SetStage(StageToSet)
endif
endif
EndEvent