SCTX |
ScriptName SEUshnarsDogScript
Short DogDead ; is the dog dead or not
Short NewDogDate ; date a "new" dog appears
Begin GameMode
If GetStage SE43 < 110
If SE43.HasDogFood == 1 ; If Bhisha has the dog food...
If GetDistance SEBhishaRef <= 600
StartCombat SEBhishaRef ; ...make the dog attack Bhisha
SEBhishaRef.StartCombat SEUshnarsDogRef
EndIf
EndIf
EndIf
If SE43.DogAttackPC == 1
If GetDistance Player < 512
StartCombat Player
EndIf
EndIf
If DogDead == 1
If GameDaysPassed >= NewDogDate ; If the dog dies, after two days a "new" one appears (resurrected)
If Player.GetDistance SEUshnarsDogRef >= 4000
SEUshnarsDogRef.Resurrect 1
Set DogDead to 0
EndIf
EndIf
EndIf
End
Begin OnDeath
Set DogDead to 1
Set NewDogDate to GameDaysPassed + 2
If IsActionRef Player == 1 ; if the player kills the dog, decrement dispositions
SEBhishaRef.ModDisposition Player -25
SEUshnarGroShadborgobRef.ModDisposition Player -25
EndIf
End |