-
Notifications
You must be signed in to change notification settings - Fork 0
/
TrailsofDestructionMovingScript.psc
104 lines (96 loc) · 4.77 KB
/
TrailsofDestructionMovingScript.psc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
Scriptname TrailsofDestructionMovingScript extends activemagiceffect
GlobalVariable Property TrailsofDestructionOverride Auto
GlobalVariable Property TrailsofDestructionDamageGlob Auto
Hazard Property HazardLevel1 Auto
Hazard Property HazardLevel2 Auto
Hazard Property HazardLevel3 Auto
Spell Property MagnitudeSpell Auto
Actor Property PlayerRef Auto
ObjectReference HazardScaled
Event OnEffectStart(Actor akTarget, Actor akCaster)
RegisterForSingleUpdate(0)
EndEvent
Event OnUpdate()
If TrailsofDestructionOverride.GetValue() == 0.0
If PlayerRef.GetBaseAV("Destruction") >= 75
If ((PlayerRef.IsRunning() || PlayerRef.IsSprinting()) && PlayerRef.IsWeaponDrawn() && !PlayerRef.isSneaking())
HazardScaled = PlayerRef.PlaceAtMe(HazardLevel3)
HazardScaled.SetScale(1.5)
Elseif (PlayerRef.IsWeaponDrawn() && !PlayerRef.isSneaking())
Utility.Wait(2)
HazardScaled = PlayerRef.PlaceAtMe(HazardLevel3)
HazardScaled.SetScale(1.5)
Endif
If TrailsofDestructionDamageGlob.GetValue() > 0.0
MagnitudeSpell.SetNthEffectMagnitude(0, 6 * (4 * (1 + PlayerRef.GetBaseAV("Destruction"))))
Else
MagnitudeSpell.SetNthEffectMagnitude(0, 0.0)
Endif
Elseif PlayerRef.GetBaseAV("Destruction") >= 50
If ((PlayerRef.IsRunning() || PlayerRef.IsSprinting()) && PlayerRef.IsWeaponDrawn() && !PlayerRef.isSneaking())
PlayerRef.PlaceAtMe(HazardLevel2)
Elseif (PlayerRef.IsWeaponDrawn() && !PlayerRef.isSneaking())
Utility.Wait(2)
PlayerRef.PlaceAtMe(HazardLevel2)
Endif
If TrailsofDestructionDamageGlob.GetValue() > 0.0
MagnitudeSpell.SetNthEffectMagnitude(0, 6 * (2 * (1 + PlayerRef.GetBaseAV("Destruction"))))
Else
MagnitudeSpell.SetNthEffectMagnitude(0, 0.0)
Endif
Elseif PlayerRef.GetBaseAV("Destruction") >= 25
If ((PlayerRef.IsRunning() || PlayerRef.IsSprinting()) && PlayerRef.IsWeaponDrawn() && !PlayerRef.isSneaking())
PlayerRef.PlaceAtMe(HazardLevel1)
Elseif (PlayerRef.IsWeaponDrawn() && !PlayerRef.isSneaking())
Utility.Wait(2)
PlayerRef.PlaceAtMe(HazardLevel1)
Endif
If TrailsofDestructionDamageGlob.GetValue() > 0.0
MagnitudeSpell.SetNthEffectMagnitude(0, 6 * (1 + PlayerRef.GetBaseAV("Destruction")))
Else
MagnitudeSpell.SetNthEffectMagnitude(0, 0.0)
Endif
Endif
Else
If TrailsofDestructionOverride.GetValue() == 1.0
If ((PlayerRef.IsRunning() || PlayerRef.IsSprinting()) && PlayerRef.IsWeaponDrawn() && !PlayerRef.isSneaking())
PlayerRef.PlaceAtMe(HazardLevel1)
Elseif (PlayerRef.IsWeaponDrawn() && !PlayerRef.isSneaking())
Utility.Wait(2)
PlayerRef.PlaceAtMe(HazardLevel1)
Endif
If TrailsofDestructionDamageGlob.GetValue() > 0.0
MagnitudeSpell.SetNthEffectMagnitude(0, 6 * (1 + PlayerRef.GetBaseAV("Destruction")))
Else
MagnitudeSpell.SetNthEffectMagnitude(0, 0.0)
Endif
Elseif TrailsofDestructionOverride.GetValue() == 2.0
If ((PlayerRef.IsRunning() || PlayerRef.IsSprinting()) && PlayerRef.IsWeaponDrawn() && !PlayerRef.isSneaking())
PlayerRef.PlaceAtMe(HazardLevel2)
Elseif (PlayerRef.IsWeaponDrawn() && !PlayerRef.isSneaking())
Utility.Wait(2)
PlayerRef.PlaceAtMe(HazardLevel2)
Endif
If TrailsofDestructionDamageGlob.GetValue() > 0.0
MagnitudeSpell.SetNthEffectMagnitude(0, 6 * (2 * (1 + PlayerRef.GetBaseAV("Destruction"))))
Else
MagnitudeSpell.SetNthEffectMagnitude(0, 0.0)
Endif
Elseif TrailsofDestructionOverride.GetValue() == 3.0
If ((PlayerRef.IsRunning() || PlayerRef.IsSprinting()) && PlayerRef.IsWeaponDrawn() && !PlayerRef.isSneaking())
HazardScaled = PlayerRef.PlaceAtMe(HazardLevel3)
HazardScaled.SetScale(1.5)
Elseif (PlayerRef.IsWeaponDrawn() && !PlayerRef.isSneaking())
Utility.Wait(2)
HazardScaled = PlayerRef.PlaceAtMe(HazardLevel3)
HazardScaled.SetScale(1.5)
Endif
If TrailsofDestructionDamageGlob.GetValue() > 0.0
MagnitudeSpell.SetNthEffectMagnitude(0, 6 * (4 * (1 + PlayerRef.GetBaseAV("Destruction"))))
Else
MagnitudeSpell.SetNthEffectMagnitude(0, 0.0)
Endif
Endif
Endif
RegisterForSingleUpdate(0.2)
EndEvent