UlfgarGhostScript
Bloodmoon.esm
Variables
9
Local Variables
controlvar
greetonce
NoLore
OnPCHitMe
disabling
xpos
ypos
zpos
timer
Source
1Begin UlfgarGhostScript
2
3float xpos
4float ypos
5float zpos
6
7; This script enables Ulgar as a ghost after he's killed. He forces greeting if approached or attacked.
8
9short controlvar
10short greetonce
11short NoLore
12short OnPCHitMe
13short disabling
14float timer
15
16if ( menumode == 1 )
17 return
18endif
19
20if ( disabling == 2 )
21 return
22endif
23
24if ( disabling == 1 )
25 set timer to ( timer + getsecondspassed )
26 if (timer > .75 )
27 disable
28 set disabling to 2
29 endif
30 return
31endif
32
33if ( GetDisabled == 0 )
34 if ( GetJournalIndex "BM_BrodirGrove" = 100 )
35 set xpos to ( GetPos, X )
36 set ypos to ( GetPos, Y )
37 set zpos to ( GetPos, Z )
38 Placeitem "ulfgar_ring" xpos ypos zpos 0
39 set disabling to 1
40 endif
41endif
42
43if ( GetDisabled == 0 )
44 if ( GetJournalIndex "BM_BrodirGrove" < 90 )
45 Disable
46 endif
47endif
48
49if ( GetDisabled == 1 )
50 if ( GetJournalIndex "BM_BrodirGrove" = 90 )
51 Enable
52 endif
53endif
54
55If ( controlvar == 0 )
56 AddSpell Ulfgar_Ghost_sp ulfgar_ghost
57 Set controlvar to 1
58endif
59
60if ( GetJournalIndex "BM_BrodirGrove" = 90 )
61 if ( GetDistance, Player <= 220 )
62 if ( greetonce == 0 )
63 ForceGreeting
64 set greetonce to -1
65 endif
66 endif
67endif
68
69if ( OnPCHitMe == 1 )
70 if ( greetonce == 0 )
71 ForceGreeting
72 set greetonce to -1
73 endif
74endif
75
76end UlfgarGhostScript