Jump to content

TG Specials By Total


gsmanners

Recommended Posts

I'm not planning to publish this. I'm just wondering if I'm on the right track, here. (See the attachment if you want to try it out.)

 

Here's is the relevant portion of the code:

 

function TGRadiantCount(Location TGRadiantCity)

if TGRadiantCity == pTGRWhiterun
	pTGRWhiterunCount += 1
elseif TGRadiantCity == pTGRWindhelm
	pTGRWindhelmCount += 1
elseif TGRadiantCity == pTGRRiften
	pTGRRiftenCount += 1		; why are we doing this? (because shut up)
elseif TGRadiantCity == pTGRMarkarth
	pTGRMarkarthCount += 1
elseif TGRadiantCity == pTGRSolitude
	pTGRSolitudeCount += 1
endif

; how many cappers have been done already?
int jobs = 0
if GetStageDone(160) == 1
	jobs += 1
endif
if GetStageDone(170) == 1
	jobs += 1
endif
if GetStageDone(180) == 1
	jobs += 1
endif
if GetStageDone(190) == 1
	jobs += 1
endif

; the number of total jobs we need to earn a capper (min of 15, plus 7 per capper done already)
int jobsx = (jobs * 7) + 15

; check for if we need a capper
if (jobs < 4) && (jobsx <= pTGRMasterTotal.Value)
	int earned = 0

	; check if player has a highest count
	if (pTGRWhiterunCount > pTGRWindhelmCount) && (pTGRWhiterunCount > pTGRMarkarthCount) && (pTGRWhiterunCount > pTGRSolitudeCount)
		if GetStageDone(160) == 0
			SetStage(160)	; Whiterun capper
			earned = 1
		endif
	elseif (pTGRWindhelmCount > pTGRMarkarthCount) && (pTGRWindhelmCount > pTGRSolitudeCount)
		if GetStageDone(180) == 0
			SetStage(180)	; Windhelm capper
			earned = 1
		endif
	elseif (pTGRMarkarthCount > pTGRSolitudeCount)
		if GetStageDone(190) == 0
			SetStage(190)	; Markarth capper
			earned = 1
		endif
	elseif (pTGRSolitudeCount > pTGRMarkarthCount)
		if GetStageDone(170) == 0
			SetStage(170)	; Solitude capper
			earned = 1
		endif
	endif

	; no particular favorite from Nocturnal, so just pick the next one
	if earned == 0
		if GetStageDone(160) == 0
			SetStage(160)	; Whiterun capper
		elseif GetStageDone(180) == 0
			SetStage(180)	; Windhelm capper
		elseif GetStageDone(190) == 0
			SetStage(190)	; Markarth capper
		else
			SetStage(170)	; Solitude capper
		endif
	endif

endif	; if cappered

endFunction

Link to comment
Share on other sites

  • Recently Browsing   0 members

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