The script is as follows.
scriptname cohTransformTiming extends Quest{Controls the Timing for transformation.}float property cohGetMoonPhase autofloat property cohPhaseDay autobool property cohCanTransform autobool property cohbmvar autoSpell property WerewolfChangeEffect autoGlobalVariable Property TimeOfDayGlobalProperty autoGlobalVariable Property GameDaysPassed autoGlobalVariable Property PlayerIsWerewolf auto;declaring propertiesEvent OnUpdateGameTime()RegisterForUpdateGameTime(5.0)float timeOfDay = TimeOfDayGlobalProperty.GetValue()float DaysPassed = GameDaysPassed.GetValue()cohGetMoonPhase = (( DaysPassed + ( TimeOfDay / 24 ) - 0.5 ) % 24 )cohPhaseDay = cohGetMoonPhase / 3; Most of the above is placeholder, I can't quite remember how logic dragon got it working in Curse of Hircine, though apparently Skyrim's lunar cycle is identical to the one in Oblivion, so naturally that can be reused. The problem here seems to be in the % 24, which doesn't seem to signify what it did in Oblivion, namely the previous calculation as a random chance multipled by 24.;/List of moon phases returned by cohGetMoonPhase calculation0 = full moon1 = 3/4 waning2 = half waning3 = 1/4 waning4 = new moon5 = 1/4 waxing6 = half waxing7 = 3/4 waxing/;If TimeOfDay >= 20 || TimeOfDay <= 6 && cohPhaseDay == 1SetStage(5)cohCanTransform == trueelseif TimeOfDay <= 20 || TimeOfDay >= 6 && cohPhaseDay == 0SetStage(0)cohCanTransform == falseendifif PlayerIsWerewolf.GetValue() == 1if cohCanTransform == trueWerewolfChangeEffect.Cast(player, player); I'm not exactly sure how to make this reference on the player...elseif game.getplayer().HasMagicEffect(WerewolfChangeEffect) == true && cohCanTransform == false; This one is also the location of an error two actaully, I haven't the faintest idea why this is happening.game.getplayer().DispelSpell(WerewolfChangeEffect)endifendifEndEvent The errors were as follows.
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(18,61): Cannot calculate the modulus of non-integersc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(41,26): variable player is undefinedc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(41,34): variable player is undefinedc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(42,24): type mismatch on parameter 1 (did you forget a cast?)c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(42,61): cannot compare a none to a bool (cast missing or types unrelated)
I'd greatly appreciate any help in resolving these issues, and the ones that are bound to follow when this finally gets compiled. Thanks in advance for any advice I may recieve.

