enderalse/source/scripts/_00e_crimequest_functions.psc

69 lines
2.2 KiB
Plaintext
Raw Normal View History

Scriptname _00E_CrimeQuest_Functions extends Quest
;=====================================================================================
; FUNCTIONS
;=====================================================================================
Function ReduceMainSkills()
String sActorValueToReduce01
String sActorValueToReduce02
int iClassIndex = _00E_MajorClassIndex.GetValueInt()
If iClassIndex == 1
sActorValueToReduce01 = "Block"
sActorValueToReduce02 = "HeavyArmor"
ElseIf iClassIndex == 2
sActorValueToReduce01 = "OneHanded"
sActorValueToReduce02 = "LightArmor"
ElseIf iClassIndex == 3
sActorValueToReduce01 = "Destruction"
sActorValueToReduce02 = "Restoration"
ElseIf iClassIndex == 4
sActorValueToReduce01 = "Sneak"
sActorValueToReduce02 = "OneHanded"
ElseIf iClassIndex == 5
sActorValueToReduce01 = "Conjuration"
sActorValueToReduce02 = "Illusion"
ElseIf iClassIndex == 6
sActorValueToReduce01 = "Restoration"
sActorValueToReduce02 = "Alteration"
ElseIf iClassIndex == 7
sActorValueToReduce01 = "TwoHanded"
sActorValueToReduce02 = "HeavyArmor"
ElseIf iClassIndex == 8
sActorValueToReduce01 = "Marksman"
sActorValueToReduce02 = "LightArmor"
ElseIf iClassIndex == 9
sActorValueToReduce01 = "LightArmor"
sActorValueToReduce02 = "Alchemy"
Else
sActorValueToReduce01 = "OneHanded"
sActorValueToReduce02 = "TwoHanded"
EndIf
2023-12-08 02:45:53 +00:00
PlayerREF.SetActorValue(sActorValueToReduce01, PlayerREF.GetBaseActorValue(sActorValueToReduce01) - 1)
PlayerREF.SetActorValue(sActorValueToReduce02, PlayerREF.GetBaseActorValue(sActorValueToReduce02) - 1)
_00E_CrimeQuest_ReduceSkillMessage.Show()
EndFunction
Function SetGlobalInJail()
_00E_IsInJail.SetValue(1)
UpdateCurrentInstanceGlobal(_00E_IsInJail)
EndFunction
;=====================================================================================
; PROPERTIES
;=====================================================================================
Actor Property PlayerREF Auto
GlobalVariable Property _00E_IsInJail Auto
Message Property _00E_CrimeQuest_ReduceSkillMessage Auto
GlobalVariable Property _00E_MajorClassIndex Auto