ouch_sunder
Morrowind.esm
Variables
5
Local Variables
extraDamage
OnPCEquip
doOnce
messageOnce
timer
Source
1Begin ouch_sunder
2
3;hurt PC as long as it is equipped, and wraithguard or wraithguard_jury_rig are not equipped
4;add a journal first time player picks it up
5
6short extraDamage
7short OnPCEquip
8short doOnce
9float timer
10short messageOnce
11;global short wraithguardEquipped
12
13if ( MenuMode == 1 )
14 return
15endif
16
17if ( Player->GetHealth <= 0 )
18 return
19endif
20
21if ( OnPCEquip == 1 )
22
23 if ( timer < 1 )
24 set timer to ( timer + GetSecondsPassed )
25 return
26 endif
27
28 set timer to 0
29
30 if ( wraithguardEquipped == 0 )
31 Set extraDamage to Random 75
32 Set extraDamage to ( 0 - extraDamage )
33 Set extraDamage to ( extraDamage - 50 )
34 player->ModCurrentHealth extraDamage
35 if ( messageOnce == 0 )
36 Set messageOnce to 1
37 MessageBox "Sunder has dealt you a mortal wound."
38 endif
39 endif
40endif
41
42if ( doOnce == 1 )
43 return
44endif
45
46if ( Player->GetItemCount "sunder" == 0 )
47 return
48endif
49
50Journal C0_Act_C 15
51Set doOnce to 1
52
53End