TR_m1_q_57_MudlapScript
TR_Mainland.esm
Variables
6
Local Variables
mudvar
TR_Map
control
nolore
T_Local_NPC
T_Local_NoLore
Source
1Begin TR_m1_q_57_MudlapScript
2
3;This script disables Mudlap when necessary and makes
4;him call for help when his mudcrabs turn on him
5
6Short mudvar
7Short TR_Map
8Short control
9Short nolore
10short T_Local_NPC
11short T_Local_NoLore
12;mudvar is a variable for handling the state of Mudlap:
13;0=first time you meet (for dialogue)
14;1=any later encounter (for dialogue)
15;2=Mudlap to be disabled
16
17If ( GetDisabled == 1 )
18 Setdelete 1
19 Return
20Endif
21;delete him when we're done
22
23If ( mudvar == 2 )
24 If ( player->GetDistance "TR_m1_q_57_Mudlap" > 5000 )
25 Disable
26 return
27 Endif
28Endif
29;mudvar=2 is the toggle for mudlap to disable after you've left
30
31If ( OnDeath == 1 )
32 If ( GetJournalIndex "TR_m1_wil_MudlapMosslog" >= 90 )
33 Journal "TR_m1_wil_MudlapMosslog" 150
34 Elseif ( GetJournalIndex "TR_m1_wil_MudlapMosslog" >= 70 )
35 if ( GetDeadCount "TR_m1_q_57_AttackCrab" < 5 )
36 Journal "TR_m1_wil_MudlapMosslog" 90
37 Elseif ( GetDeadCount "TR_m1_q_57_AttackCrab" >= 5 )
38 Journal "TR_m1_wil_MudlapMosslog" 150
39 endif
40 Elseif ( GetJournalIndex "TR_m1_wil_MudlapMosslog" >= 10 )
41 Journal "TR_m1_wil_MudlapMosslog" 150
42 Endif
43Endif
44;End quest if player kills Mudlap, give journal entry if mudcrabs killed him
45
46
47If ( GetJournalIndex "TR_m1_wil_MudlapMosslog" == 130 ) ;removes mudlap if he is supposed to have made his attack
48 Disable
49 Return
50ElseIf ( GetJournalIndex "TR_m1_wil_MudlapMosslog" == 110 ) ;removes mudlap if you waited too long
51 Disable
52 Return
53ElseIf ( GetJournalIndex "TR_m1_wil_MudlapMosslog" >= 100 ) ;toggles mudlap to disappear when you leave
54 Set mudvar to 2
55ElseIf ( GetJournalIndex "TR_m1_wil_MudlapMosslog" >= 70 ) ;this bit handles the force greeting
56 If ( mudvar != 3 ) ;prevents repeated force greetings
57 If ( player->GetDistance "TR_m1_q_57_Mudlap" < 2000 ) ;if you're close enough to hear him
58 ForceGreeting ;shout!
59 Set mudvar to 3 ;prevents repeated force greetings
60 Endif
61 Endif
62Elseif ( GetJournalIndex "TR_m1_wil_MudlapMosslog" == 60 ) ;removes mudlap if you reported him
63 Disable
64 Return
65Endif
66;disables Mudlap when appropriate and handles the force greeting
67
68if ( TR_Map == 1 )
69 return
70endif
71
72set TR_Map to 1
73
74End