Jump to content

One quick question about dialogue and one long one about script


Recommended Posts

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 list

float jailDay
float LocalDaysPassed

if ( player-> GetRace "Dark Khajiit" == 0 )
stopscript "rh_Jail"
endif

if ( LocalDaysPassed == 0 )
set jailDay to Day
set LocalDaysPassed to 1
endif

player -> removespell "rh_shame_ra'mora"

if ( jailDay != Day )
set JailDay to Day
set LocalDaysPassed to ( LocalDaysPassed + 1 )
endif

if ( 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"
;endif

End 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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...