Ferren42 Posted March 15, 2017 Share Posted March 15, 2017 I am working on a race mod, and I've run into a couple of hiccups.1.I'm trying to make an npc give the PC some gold the first time they ask about a particular subject, but only the first time. I have a different response, with no gold given on the next line down. What Func/Var should I use to skip the gold-giving response after the first time it's discussed?2.One of the racial abilities of this race is sun damage. However, since the character is not necessarily a vampire, they can be arrested and sent to jail. Unfortunately, since jail lasts at least a full day, this invariably causes the player to die from the sun damage. I'm trying to create a script that negates the sun damage. A heal ability or enchantment does not work, nor does godmode. My only alternative seems to be to remove the sun damaging ability for the duration that the player is in jail. What I have created works when I run the script through the console, but if it's run when the player is arrested, it does not re-add the ability after they're released. Does anyone know how to make it work, or know a better way to prevent sun damage during jail? Here's the script:------------------------------------------------------Begin rh_Jail;Allows player to NOT get killed by racial sun damage in the event of being jailed;Will not? move effects from racial to the "front" of active effects listfloat jailDayfloat LocalDaysPassedif ( player-> GetRace "Dark Khajiit" == 0 ) stopscript "rh_Jail"endifif ( LocalDaysPassed == 0 ) set jailDay to Day set LocalDaysPassed to 1endifplayer -> removespell "rh_shame_ra'mora"if ( jailDay != Day ) set JailDay to Day set LocalDaysPassed to ( LocalDaysPassed + 1 )endifif ( LocalDaysPassed >= 2 ) player -> addspell "rh_shame_ra'mora" set LocalDaysPassed to 0 stopscript "rh_Jail"endif;NEW old version... ugh.;if ( player-> GetRace "Dark Khajiit" == 0 ); return;endif;;if ( GetPCinJail == 1 ); player -> addspell "rh_jail_protection";endif;;if ( GetPCinJail == 0 ); player -> removespell "rh_jail_protection"; stopscript "rh_Jail";endif;Old Version;if ( player-> GetSpell "rh_shame_ra'mora" == 1 ); if ( GetPCinJail == 1 ); player-> removespell "rh_shame_ra'mora"; endif;endif;;if ( GetPCinJail == 0 ); player-> addspell "rh_shame_ra'mora"; stopscript "rh_jail";endifEnd rh_Jail--------------------------------------------------------------(Note: I did rip this mod from panther production's Ra'Kath mod, so if I have offended anyone by doing this, I'm sorry)The only other way I can think to prevent death is to move every prison marker inside the fort instead of outside, so the sun can't kill the player. For obvious and numerous reasons, I do not want to do this. Link to comment Share on other sites More sharing options...
Dragon32 Posted March 16, 2017 Share Posted March 16, 2017 I'd really recommend posting this over on Bethsoft's Construction Set subforum. Whilst threads here get a lot of views there are very few posts. And modders who actually know there way around the CS (unlike me) are much more likely to be found there. Link to comment Share on other sites More sharing options...
Ferren42 Posted March 17, 2017 Author Share Posted March 17, 2017 Ok, will do, thanks! Link to comment Share on other sites More sharing options...
Recommended Posts