karrodfightstopScript
Tribunal.esm
Variables
4
Local Variables
OnPCHitMe
nolore
doOnce
combatOnce
Source
1Begin karrodfightstopScript
2
3short OnPCHitMe
4short nolore
5short doOnce
6short combatOnce
7
8if ( kingHit == 1 )
9 if ( combatOnce == 0 )
10 ;if king is hit, force combat
11 SetAlarm 0
12 SetFight 100
13 StartCombat Player
14 karrod->StartCombat Player
15 Set combatOnce to 1
16 endif
17 return
18endif
19
20if ( GetJournalIndex TR_Champion >= 80 )
21 if ( OnPCHitMe == 1 )
22 StopCombat Player
23 StartCombat Player
24 set OnPCHitMe to 0
25 endif
26elseif ( GetJournalIndex TR_Champion < 70 )
27 if ( OnPCHitMe == 1 )
28 StopCombat Player
29 StartCombat Player
30 set OnPCHitMe to 0
31 endif
32endif
33
34if ( GetJournalIndex TR_Champion < 70 )
35 return
36endif
37
38if ( KarrodBeaten > 0 )
39 if ( doOnce == 1 )
40 ;if duel is over, make guards normal again
41 SetFight 40
42 SetAlarm 100
43 AiWander 0 0 0 0 0 0 0
44 set doOnce to -1
45 endif
46 return
47endif
48
49if ( GetJournalIndex TR_Champion == 70 )
50 if ( karrodfightstart == 3 )
51 ;pacify guards during duel
52 if ( doOnce == 0 )
53 setalarm 0
54 setfight 0
55 set doOnce to 1
56 endif
57 endif
58endif
59
60if ( GetJournalIndex TR_Champion >= 70 )
61 if ( GetJournalIndex TR_Champion < 80 )
62 if ( karrodFightStart == 3 )
63 if ( OnPCHitMe == 1 )
64 ;when a guard is hit during duel, increment duel counter
65 Set DuelMiss to ( DuelMiss + 1 )
66 Set OnPCHitMe to 0
67 if ( DuelMiss <= 5 )
68 ;if duel counter 5 or less, stop combat
69 StopCombat Player
70 SetFight 0
71 SetFlee 0
72 endif
73 endif
74 if ( DuelMiss > 5 )
75 if ( doOnce == 1 )
76 ;if duel counter > 5, force combat
77 StartCombat Player
78 SetFight 100
79 SetAlarm 0
80 SetFlee 0
81 set doOnce to -2
82 endif
83 endif
84 endif
85 endif
86endif
87
88
89End karrodfightstopScript