Select game:
Search:
Select a record type:
|
SE13AllySCRIPT (0x0001ac8a)
- Record Type: SCPT
- Editor ID: SE13AllySCRIPT
- Form ID: 0x0001ac8a
- Source File: Oblivion.esm.mod
- Patch Status: FormID has not been modified.
Parameter |
Value |
SCTX |
scn SE13AllySCRIPT
; script for allies to track their deaths and generate new GS/DS
short dying
float timer
ref tempRef ; used for death blow
ref mySelf
short looking ; set just before death...
begin OnDeath
set SE13.deadAllies to SE13.deadAllies + 1
end
begin OnLoad
set mySelf to getSelf
; disable me if battle is over and player isn't around
if getstage SE13 >= 100
disable
else
; battle allies always ignore friendly hits
setignorefriendlyhits 1
endif
end
Begin GameMode
; don't run this script if I'm disabled or dead
if GetDisabled == 1 || getDead == 1
return
endif
if getStageDone SE13 35 == 1 && looking == 0
set looking to 1
stopcombat
setalert 1
modav aggression -100
evp
look SE13JygaFXCloudSwirlREF
endif
if getStageDone SE13 38 == 1 && dying == 0
; run a timer (randomized) to blow myself up
set dying to 1
; unfreeze me in case I was hit by Staff
setactorsai 1
; use distance from boss marker to determine timer
set timer to GetDistance SE13BossMarker ; 3300 is about the max
set timer to timer/3300
endif
if dying == 1 || dying == 2
if timer > 0
set timer to timer - getSecondsPassed
elseif dying == 1
set dying to 2
set timer to 1
set tempRef to SE13.bossRef
tempRef.PushActorAway mySelf 30
elseif dying == 2
set dying to 3
kill
endif
endif
End
; shouts about reinforcements arriving
begin OnHitWith SEOrderKnight0SwordSteel
if getRandomPercent <= 33
if getdistance player < 800
Say SE13AllyShoutReinforcements 1
endif
endif
end
begin OnHitWith SEOrderKnight1SwordSilver
if getRandomPercent <= 33
if getdistance player < 800
Say SE13AllyShoutReinforcements 1
endif
endif
end
begin OnHitWith SEOrderKnight2SwordDwarven
if getRandomPercent <= 33
if getdistance player < 800
Say SE13AllyShoutReinforcements 1
endif
endif
end
begin OnHitWith SEOrderKnight3SwordElven
if getRandomPercent <= 33
if getdistance player < 800
Say SE13AllyShoutReinforcements 1
endif
endif
end
begin OnHitWith SEOrderKnight4SwordGlass
if getRandomPercent <= 33
if getdistance player < 800
Say SE13AllyShoutReinforcements 1
endif
endif
end
begin OnHitWith SEOrderKnight5SwordEbony
if getRandomPercent <= 33
if getdistance player < 800
Say SE13AllyShoutReinforcements 1
endif
endif
end
begin OnHitWith SEOrderKnight6SwordDaedric
if getRandomPercent <= 33
if getdistance player < 800
Say SE13AllyShoutReinforcements 1
endif
endif
end
|
|