-
Notifications
You must be signed in to change notification settings - Fork 0
/
TrailsofDestructionFrostMovingScript.psc
108 lines (100 loc) · 5.02 KB
/
TrailsofDestructionFrostMovingScript.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
105
106
107
108
Scriptname TrailsofDestructionFrostMovingScript 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(3)
Elseif (PlayerRef.IsWeaponDrawn() && !PlayerRef.isSneaking())
Utility.Wait(2)
HazardScaled = PlayerRef.PlaceAtMe(HazardLevel3)
HazardScaled.SetScale(3)
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())
HazardScaled = PlayerRef.PlaceAtMe(HazardLevel2)
HazardScaled.SetScale(2)
Elseif (PlayerRef.IsWeaponDrawn() && !PlayerRef.isSneaking())
Utility.Wait(2)
HazardScaled = PlayerRef.PlaceAtMe(HazardLevel2)
HazardScaled.SetScale(2)
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())
HazardScaled = PlayerRef.PlaceAtMe(HazardLevel1)
Elseif (PlayerRef.IsWeaponDrawn() && !PlayerRef.isSneaking())
Utility.Wait(2)
HazardScaled = 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())
HazardScaled = PlayerRef.PlaceAtMe(HazardLevel2)
HazardScaled.SetScale(2)
Elseif (PlayerRef.IsWeaponDrawn() && !PlayerRef.isSneaking())
Utility.Wait(2)
HazardScaled = PlayerRef.PlaceAtMe(HazardLevel2)
HazardScaled.SetScale(2)
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(3)
Elseif (PlayerRef.IsWeaponDrawn() && !PlayerRef.isSneaking())
Utility.Wait(2)
HazardScaled = PlayerRef.PlaceAtMe(HazardLevel3)
HazardScaled.SetScale(3)
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