SCTX |
ScriptName HelviusCeciaScript
short combatvar
short starthealth
float currenthealth
float modhealth
float timer
float percenthealth
Begin OnDeath
if ( GetStage TrainingHandtoHand >= 10 ) && ( GetStage TrainingHandtoHand < 100 )
SetStage TrainingHandtoHand 200
endif
End
Begin GameMode
If GetStage TG08Blind == 20
If Player.GetInCell BrumaHelviusCeciasHouse == 0
SetStage TG08Blind 25
EndIf
EndIf
If GetStage TG08Blind == 40
If Player.GetInCell BrumaHelviusCeciasHouse == 0
SetStage TG08Blind 50
EndIf
EndIf
if ( Combatvar == 1 )
if ( Player.GetWeaponAnimType == 0 )
SetCombatStyle HelviusCeciaTraining
addspell AbHelviusCeciaTraining
setfactionrank ThievesGuild -1
startcombat Player
set combatvar to 2
else
SetCombatStyle
set Combatvar to 5 ;if player has weapon equipped at the beginning, don't even start combat
startconversation player
setfactionrank thievesguild 2
endif
elseif ( Combatvar == 2 )
;if player pulls out weapon during combat, stop and forcegreet
if ( Player.GetWeaponAnimType != 0 )
stopcombat Player
SetCombatStyle
removespell AbHelviusCeciaTraining
set currenthealth to GetAV Health
set modhealth to ( 163 - currenthealth )
ModAV Health modhealth
set Combatvar to 5
set timer to 0
setfactionrank thievesguild 2
startconversation player
endif
;if player has done enough damage, stop combat and forcegreet
if ( HelviusCeciaRef.GetAV Health < 90 )
set combatvar to 3
SetCombatStyle
removespell AbHelviusCeciaTraining
set currenthealth to GetAV Health
set modhealth to ( 163 - currenthealth )
ModAV Health modhealth
stopcombat player
set timer to 0
setfactionrank thievesguild 2
startconversation player
endif
;if player isn't doing enough damage, stop after certain amount of time has elapsed
if ( timer < 40 )
set timer to ( timer + GetSecondsPassed )
else
stopcombat Player
SetCombatStyle
removespell AbHelviusCeciaTraining
set currenthealth to GetAV Health
set modhealth to ( 163 - currenthealth )
ModAV Health modhealth
set Combatvar to 4
set timer to 0
setfactionrank thievesguild 2
Startconversation player
endif
endif
End |