denbub Posted February 16, 2013 Share Posted February 16, 2013 I'm new to the creationkit and trying make this my self but I've hit a wall. I tried to edit the playersleepquestscript so that beds in a guild hall would give the well rested bonus, and the script looks like this ScriptName PlayerSleepQuestScript extends Quest Spell Property Rested AutoSpell Property WellRested AutoSpell Property MarriageSleepAbility AutoReferenceAlias Property LoveInterest AutoKeyword Property LocTypeInn AutoKeyword Property LocTypePlayerHouse AutoKeyword Property LocTypeGuild AutoQuest Property RelationshipMarriageFIN AutoSpell Property pDoomLoverAbility AutoCompanionsHousekeepingScript Property CHScript Auto Function RemoveRested() ;remove all previous rested states Game.GetPlayer().RemoveSpell(Rested) Game.GetPlayer().RemoveSpell(WellRested) Game.GetPlayer().RemoveSpell(MarriageSleepAbility) EndFunction Event OnSleepStop(bool abInterrupted) ; debug.trace(self + "Player is sleeping") If CHScript.PlayerHasBeastBlood == 1; Debug.Trace(Self + "Player is werewolf; no restedness on sleep.") RemoveRested() BeastBloodMessage.Show() ElseIf Game.GetPlayer().HasSpell(pDoomLoverAbility) == 0 ;don't run this if player has the Lover sign If RelationshipMarriageFIN.IsRunning() == True && RelationshipMarriageFIN.GetStage() > 10 && Game.GetPlayer().GetCurrentLocation() == LoveInterest.GetActorRef().GetCurrentLocation(); debug.trace(Self + "Giving player the Lover's Comfort spell on Sleep End") MarriageRestedMessage.Show() RemoveRested() Game.GetPlayer().AddSpell(MarriageSleepAbility, abVerbose = false) ElseIf Game.GetPlayer().GetCurrentLocation().HasKeyword(LocTypeInn) == True; debug.trace(Self + "Giving player the Well Rested spell for sleeping in an Inn") WellRestedMessage.Show() RemoveRested() Game.GetPlayer().AddSpell(WellRested, abVerbose = false) ElseIf Game.GetPlayer().GetCurrentLocation().HasKeyword(LocTypeGuild) == True; debug.trace(Self + "Giving player the Well Rested spell for sleeping in a Guild Hall") WellRestedMessage.Show() RemoveRested() Game.GetPlayer().AddSpell(WellRested, abVerbose = false) ElseIf Game.GetPlayer().GetCurrentLocation().HasKeyword(LocTypePlayerHouse) == True; debug.trace(Self + "Giving player the Well Rested spell for sleeping in Player House") Game.GetPlayer().AddSpell(WellRested, abVerbose = false) Else; debug.trace(Self + "Giving player the Rested spell for sleeping") RestedMessage.Show() RemoveRested() Game.GetPlayer().AddSpell(Rested, abVerbose = false) EndIf EndIf EndEvent Message Property RestedMessage Auto Message Property WellRestedMessage Auto Message Property MarriageRestedMessage Auto Message Property BeastBloodMessage Auto What did I do wrong? Link to comment Share on other sites More sharing options...
RaktoastTheSandwichTopper Posted February 17, 2013 Share Posted February 17, 2013 i suggest you move this to the mod talk area instead of here Link to comment Share on other sites More sharing options...
Recommended Posts