TR_m4_AA_SehutuMummyScp
TR_Mainland.esm
Variables
4
Local Variables
button
controlvar
finalwords
timer
Source
1begin TR_m4_AA_SehutuMummyScp
2
3;this is for the mummy of Master Bel-Betu
4;killing the mummy will kill the master
5
6;global TR_m4_AA_SehutuDead
7short button
8short controlvar
9short finalwords
10float timer
11
12if ( MenuMode )
13 return
14endif
15
16if ( OnActivate )
17 if ( controlvar == 0 )
18 MessageBox "This is what remains of Master Bel-Betu's physical body. Soulless and inanimate, yet somehow alive. There's a slow, faint heartbeat." "Kill the master." "Leave the body alone."
19 set controlvar to 1
20 endif
21endif
22
23if ( controlvar == 1 )
24 set button to GetButtonPressed
25 if ( button == -1 )
26 return
27 elseif ( button == 0 )
28 set TR_m4_AA_SehutuDead to 1
29 MessageBox "You reach through the dry parchment-like skin and the brittle, ancient bones, and seize Master Bel-Betu's heart in your hand. You remove it. Slowly, the mummy's mouth begins to open..." "OK"
30 set timer to 0
31 set controlvar to 2
32 set finalwords to 1
33 player->AddItem "TR_m4_AA_SehutuHeart" 1
34 StopSound "Crystal Ringing"
35 MessageBox "Master Bel-Betu's Heart has been added to your inventory."
36 if ( GetJournalIndex "TR_m4_wil_BelBetu2" > 0 )
37 if ( GetJournalIndex "TR_m4_wil_BelBetu2" < 120 )
38 Journal "TR_m4_wil_BelBetu2" 120
39 endif
40 elseif ( GetJournalIndex "TR_m4_wil_BelBetu1" > 0 )
41 if ( GetJournalIndex "TR_m4_wil_BelBetu1" < 110 )
42 Journal "TR_m4_wil_BelBetu1" 110
43 endif
44 elseif ( GetJournalIndex "TR_m4_wil_BelBetu3" > 0 )
45 if ( GetJournalIndex "TR_m4_wil_BelBetu3" < 120 )
46 Journal "TR_m4_wil_BelBetu3" 120
47 endif
48 endif
49 if ( GetJournalIndex "TR_m4_Vf_ManCrystal" > 0 )
50 if ( GetJournalIndex "TR_m4_Vf_ManCrystal" < 30 )
51 Journal "TR_m4_Vf_ManCrystal" 30
52 endif
53 endif
54 elseif ( button == 1 )
55 set controlvar to 0
56 return
57 endif
58endif
59
60if ( finalwords == 1 )
61 if ( timer >= 2 )
62 Cast "purge magic" player
63 player->Say "Vo\tr\misc\TR_Belbetu_Death.wav" "No... Curse you... My work... Everything... You've ruined everything..."
64 set finalwords to 2
65 set timer to 0
66 endif
67endif
68
69if ( TR_m4_AA_SehutuDead == 0 )
70 if ( CellChanged == 0 )
71 if ( GetSoundPlaying "Crystal Ringing" == 0 )
72 PlayLoopSound3DVP "Crystal Ringing" 1.0 1.0
73 endif
74 endif
75endif
76
77set timer to ( timer + GetSecondsPassed )
78
79end