SCTX |
ScriptName AltarofZenithar
short doonce
short DayofLastUse
ref target
Begin OnActivate
if IsActionRef player == 1
If Player.GetCrimeGold > 0 || GetPCInfamy > GetPCFame
MessageBox "Zenithar hates the thief and lawbreaker!"
elseif FameZenithar == 0
MessageBox "Make a pilgrimage to a Wayshrine of Zenithar, and henceforth receive a blessing at Zenithar's holy altars."
elseif FameZenithar > 0
if GetDayofWeek == DayofLastUse
MessageBox "You've already been blessed this day."
else
MessageBox "You work for the glory of Zenithar!"
Cast AltarZenithar Player
Set DayofLastUse to GetDayofWeek
endif
endif
else
set target to GetActionRef
Cast AltarAkatosh target
endif
end
begin gamemode
if doonce == 0 ;days are numbered 0-6 - prevents first visit on 0 day and being told you've used it today
set DayofLastUse to 10
set doonce to 1
endif
end |