ScriptName HorsePCPaintLeyawiinScript
Short RespawnHorse
Short TellPC
Short Mounted
Begin OnDeath
Set RespawnHorse to 1
Set Horses.OwnLeyawiinPaint to 0
Set Mounted to 0
HorseSalePaintLeyawiinRef.Enable
ModPCMiscStat 14 -1
End
Begin OnPackageEnd HorsePCLeyawiinGoHome
If TellPC == 0 && Mounted == 1
If GetInCell Leyawiin == 1
Message "Your Paint horse has returned to Leyawiin's stables."
Set TellPC to 1
EndIf
EndIf
End
Begin OnActivate
if isActionRef player == 1
If Horses.LeyawiinAtahbaPresent == 1
Set Horses.LeyawiinAtahbaPresent to 0
Set Mounted to 1
EndIf
endif
Set TellPC to 0
Activate
EvaluatePackage
End
|