2021-10-05 22:15:58 +00:00
|
|
|
Scriptname _00E_NQ_Bounty01_TargetScript extends ReferenceAlias
|
|
|
|
|
|
|
|
; SCRIPT AUTHOR DENNIS MAY 2014
|
|
|
|
; Script handles Bandit appearance and checks if bounty job is done
|
|
|
|
; SCRIPT CHANGE TILL MAY 2018
|
|
|
|
; Added-in Body Clean-up suggested by gavrant for performance reasons, check out WIDeadBodyCleanupScript for original code
|
2024-01-24 16:57:20 +00:00
|
|
|
; Eddoursul, January 2024: Made bounty targets protected instead of essential. Protected actors can be killed by apparitions as well.
|
2024-01-12 19:13:38 +00:00
|
|
|
|
2021-10-05 22:15:58 +00:00
|
|
|
; ====================================================================================
|
|
|
|
; EVENTS
|
|
|
|
; ====================================================================================
|
|
|
|
|
|
|
|
Event OnCellAttach() ;FIRE WHEN PLAYER ENTERS THE CELL THE NEEDED ACTOR IS IN
|
2024-01-10 14:08:24 +00:00
|
|
|
If NQ_Bounty01.GetCurrentStageID() == __Config_iEnableAtStage && GetReference().IsDisabled()
|
2021-10-05 22:15:58 +00:00
|
|
|
GetReference().Enable() ; Enable the bandit when he is needed in the quest
|
2024-01-24 16:57:20 +00:00
|
|
|
|
|
|
|
; Technically, not required since 2.1, adding this in case of overwrite by an outdated mod
|
2024-01-12 19:13:38 +00:00
|
|
|
(GetReference() as Actor).GetActorBase().SetEssential(false)
|
2021-10-05 22:15:58 +00:00
|
|
|
Endif
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
Event OnDeath(Actor akKiller)
|
|
|
|
Int iStage = __Config_iEnableAtStage
|
|
|
|
|
|
|
|
NQ_Bounty01.SetObjectiveCompleted(iStage) ;MissionObjective: Kill the bandit - Done
|
|
|
|
|
|
|
|
iStage += 5
|
2024-01-10 14:08:24 +00:00
|
|
|
NQ_Bounty01.SetCurrentStageID(iStage) ;MissionObjective: Take your bounty - New
|
2021-10-05 22:15:58 +00:00
|
|
|
NQ_Bounty01.SetObjectiveDisplayed(iStage) ;Show Objective
|
|
|
|
BountyScript._00E_NQ_Bounty01_Status = 2 ;Unlock bounty board to receive your gold
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
; ====================================================================================
|
|
|
|
; PROPERTIES
|
|
|
|
; ====================================================================================
|
|
|
|
|
|
|
|
Quest Property NQ_Bounty01 Auto
|
|
|
|
_00E_NQ_Bounty01_Functions Property BountyScript Auto ;ACCESS TO QUEST SCRIPT
|
|
|
|
Int Property __Config_iEnableAtStage Auto
|
|
|
|
{Type the quest stage number to enable the bandit 10, 30, 50. Enable new enemy every 20th stage }
|