enderalse/scripts/source/_00e_nq02_newhorizons_library.psc

157 lines
5.0 KiB
Plaintext
Raw Normal View History

Scriptname _00E_NQ02_NewHorizons_Library extends Quest
;=====================================================================================
; FUNCTIONS
;=====================================================================================
Function AddKP(bool bKnowledgePointEarned)
; Convenience function
If !bKnowledgePointEarned
if bKnowledgePointEarned != bKnowledgeBook
bKnowledgePointEarned = True
EndIf
If !Self.IsRunning()
Self.SetStage(5)
EndIf
if !(Self.IsObjectiveCompleted(5))
_00E_NQ02_KnowledgeGathered.SetValue(_00E_NQ02_KnowledgeGathered.GetValue() + 1)
Self.UpdateCurrentInstanceGlobal(_00E_NQ02_KnowledgeGathered)
int CurrentCount = _00E_NQ02_KnowledgeGathered.GetValueInt()
if CurrentCount >= 40
Self.SetObjectiveCompleted(5, 1)
Self.SetObjectiveCompleted(10, 1)
Self.SetStage(10)
ElseIf CurrentCount < 40
Self.SetObjectiveCompleted(5,0)
Self.SetObjectiveDisplayed(5, True, True)
EndIf
EndIf
Levelsystem.GiveEP(50)
CheckForBuff()
EndIf
EndFunction
Function CheckForBuff()
int iKnowledgePoints = _00E_NQ02_KnowledgeGathered.GetValueInt()
if iKnowledgePoints >= 10
if iKnowledgePoints < 20
if !PlayerREF.HasSpell(_00E_Ab_VagabondsBlessing_01)
_00E_NQ02_sKnowledgeBuffGained.Show()
PlayerREF.AddSpell(_00E_Ab_VagabondsBlessing_01)
EndIf
Elseif iKnowledgePoints >= 20 && iKnowledgePoints < 30
if !PlayerREF.HasSpell(_00E_Ab_VagabondsBlessing_02)
PlayerREF.RemoveSpell(_00E_Ab_VagabondsBlessing_01)
PlayerREF.AddSpell(_00E_Ab_VagabondsBlessing_02)
EndIf
Elseif iKnowledgePoints >= 30 && iKnowledgePoints < 40
if !PlayerREF.HasSpell(_00E_Ab_VagabondsBlessing_03)
PlayerREF.RemoveSpell(_00E_Ab_VagabondsBlessing_02)
PlayerREF.AddSpell(_00E_Ab_VagabondsBlessing_03)
EndIf
Elseif iKnowledgePoints == 40
if !PlayerREF.HasSpell(_00E_Ab_VagabondsBlessing_04)
PlayerREF.RemoveSpell(_00E_Ab_VagabondsBlessing_03)
PlayerREF.AddSpell(_00E_Ab_VagabondsBlessing_04)
EndIf
SetStage(10)
EndIf
EndIf
EndFunction
Function FinishUp()
Levelsystem.GiveEP(1500)
If _00E_AchievementsEnabled.GetValueInt() == 1
Game.UnlockAchievement("END_KNOWLEDGE_01")
EndIf
EndFunction
;=====================================================================================
; PROPERTIES
;=====================================================================================
; use this function in dialogue fragments
; NQ02.AddKP(NQ02.*boolVariableName)
; NQ02.*boolVariableName = true
_00E_QuestFunctions Property Levelsystem Auto
Actor Property PlayerREF Auto
GlobalVariable Property _00E_NQ02_KnowledgeGathered Auto
GlobalVariable Property _00E_AchievementsEnabled Auto
Message Property _00E_NQ02_sKnowledgeBuffGained Auto
Spell Property _00E_Ab_VagabondsBlessing_01 Auto
Spell Property _00E_Ab_VagabondsBlessing_02 Auto
Spell Property _00E_Ab_VagabondsBlessing_03 Auto
Spell Property _00E_Ab_VagabondsBlessing_04 Auto
Bool Property bKnowledgeBook Auto Hidden
Bool Property bMQ01FinnOptional01e Auto Hidden
Bool Property bMQ01FinnOptional01f Auto Hidden
Bool Property NQ15_D4BranchTopic01 Auto Hidden
Bool Property Generic_Priest_ThePathTropic_01a Auto Hidden
Bool Property Generic_Priest_ThePathTopic_01b Auto Hidden
Bool Property Generic_Priest_ThePathTropic_01c Auto Hidden
Bool Property _00E_MQ02_D6_02a Auto Hidden
Bool Property MQ02_D1_3a Auto Hidden
Bool Property MQ02_D2_02c Auto Hidden
Bool Property bYuslanDialogue_D0_Schools_01a_02 Auto Hidden
Bool Property bYuslanDialogue_D0_Schools_01b Auto Hidden
Bool Property bYuslanDialogue_D0_Schools_01c Auto Hidden
Bool Property bGenericDialogue_Ark_PriestBranchTopic Auto Hidden
Bool Property bMQ05_D01_03a Auto Hidden
Bool Property bNQ_G_07Mael_D3_LeoraEren_DijaamCapturedTalk_5 Auto Hidden
Bool Property bMQ06D7TealorTopic02 Auto Hidden
Bool Property bMerchantDialogue_Ark_YrintoShaAmgashInterestTopic Auto Hidden
Bool Property bMQ08_IntoTheDeep_JesparBranchCrystallwoodTopic2 Auto Hidden
Bool Property MQ02_D02_03a Auto Hidden
Bool Property Generic_Priest_ThePathTopic Auto Hidden
Bool Property ArkGenericDialogue_Turios_ApothekariiTopic Auto Hidden
Bool Property MyradDialogue_StartTopic_T2Topic Auto Hidden
Bool Property MQ02_D0_5a Auto Hidden
Bool Property MerchantDialogue_Ark_UaljaanVuulInquire_02a Auto Hidden
Bool Property MQ07b_D00_02c Auto Hidden
Bool Property JesparDialogue_Scar_01a Auto Hidden
Bool Property MQ08Prologue_D00_03 Auto Hidden
Bool Property NQ17_D0_WissenTopic Auto Hidden
Bool Property MerchantDialogue_Steinschlag_02c Auto Hidden
Bool Property _00E_MQ11c_Generic_TaharaTopic011 Auto Hidden
Bool Property NQ23_D0_Branch04Topic Auto Hidden
Bool Property MQ02_D7_01b Auto Hidden
Bool Property MQ05Prologue_D4_02a Auto Hidden
;New in Forgotten Stories
Bool Property FS_NQR02_D00_01b Auto Hidden
Bool Property FS_NQR03_D01_01a Auto Hidden
Bool Property FS_NQ02_D15_EsmeStart_3 Auto Hidden
Bool Property FS_TharaelDialogue_D00_Structure_01a Auto Hidden