HroldarScript
Bloodmoon.esm
Variables
19
Local Variables
nolore
initialized
OnPCHitMe
hroldargreet
hroldarbeaten
walkonce
hroldardead
castonce
away
atdoor
placed
deathtimer
fatiguestart
healthstart
fatiguecurrent
healthcurrent
xpos
ypos
zpos
Source
1Begin HroldarScript
2
3short nolore
4short initialized
5short OnPCHitMe
6short hroldargreet
7short hroldarbeaten
8short walkonce
9short hroldardead
10short castonce
11short away
12short atdoor
13short placed
14
15float deathtimer
16float fatiguestart
17float healthstart
18float fatiguecurrent
19float healthcurrent
20float xpos
21float ypos
22float zpos
23
24if ( GetDisabled == 0 )
25 if ( GetJournalIndex "CO_2" < 10 )
26 Disable
27 endif
28endif
29
30if ( GetDisabled == 1 )
31 if ( GetJournalIndex "CO_2" >= 10 )
32 if ( hroldardead == 0 )
33 if ( hroldarbeaten == 0 )
34 Enable
35 endif
36 endif
37 endif
38endif
39
40if ( GetJournalIndex CO_2 >=90 )
41 if ( GetDisabled == 0 )
42 Disable
43 endif
44endif
45
46if ( GetJournalIndex CO_2 == 10 )
47 if ( placed == 0 )
48 Position -198195.625 160980.813 972.612 270
49 AIWander 0 0 0 0 0 0 0 0 0
50 set placed to 1
51 endif
52endif
53
54if ( GetJournalIndex "CO_2" < 40 )
55 if ( OnPCHitMe == 1 )
56 SetFight 100
57 StartCombat Player
58 endif
59endif
60
61
62if ( hroldarbeaten == 0 )
63 if ( atdoor == 0 )
64 if ( ColonyState >= 2 )
65 if ( GetDistance "ex_colony_minedoor" >= 512 )
66 StopCombat
67 SetFight 30
68 set away to 1
69 set atdoor to 1
70 endif
71 endif
72 endif
73endif
74
75if ( away == 1 )
76 AITravel -198195.625 160980.813 972.612 270
77 set away to 0
78endif
79
80if ( atdoor == 1 )
81 if ( GetDistance "ex_colony_minedoor" < 256 )
82 set atdoor to 0
83 endif
84endif
85
86
87
88if ( GetJournalIndex CO_2 >= 10 )
89 if ( GetJournalIndex CO_2 < 90 )
90 if ( OnDeath == 1 )
91 set xpos to ( GetPos, X )
92 set ypos to ( GetPos, Y )
93 set zpos to ( GetPos, Z )
94 Placeitem "Hroldar_ring" xpos ypos zpos 0
95 Disable
96 Journal CO_2 60
97 set hroldardead to 1
98 endif
99 endif
100endif
101
102if ( hroldardead == 0 )
103 If ( GetJournalIndex CO_2 == 40 )
104 if ( initialized == 0 )
105 set fatiguestart to GetFatigue
106 set healthstart to GetHealth
107 set initialized to 1
108 set hroldargreet to 1
109 endif
110 if ( OnPCHitMe == 1 )
111 set fatiguecurrent to GetFatigue
112 set healthcurrent to GetHealth
113 if ( fatiguestart > fatiguecurrent )
114 StopCombat
115 SetFight 0
116 endif
117 if ( healthstart > healthcurrent )
118 StopCombat Player
119 SetFight 0
120 endif
121 if ( hroldargreet == 1 )
122 set hroldargreet to 2
123 elseif ( hroldargreet == 2 )
124 if ( fatiguecurrent <= 150 )
125 ForceGreeting
126 set hroldargreet to 3
127 endif
128 endif
129 elseif ( hroldargreet == 3 )
130 if ( fatiguecurrent <= 50 )
131 set hroldarbeaten to 1
132 ForceGreeting
133 SetFight 30
134 endif
135 endif
136 set OnPCHitMe to 0
137 endif
138 elseif ( OnPCHitMe == 1 )
139 SetFight 100
140 StartCombat Player
141 endif
142endif
143
144if ( walkonce == 0 )
145 if ( hroldarbeaten == 1 )
146 AITravel -197877.984 163202.344 1197.672 0
147 set walkonce to 1
148 endif
149endif
150
151
152
153
154
155
156
157End HroldarScript