TR_m2_q_12_Bugdul
TR_Mainland.esm
Variables
11
Local Variables
controlQ
banditsdead
doonce
dooncetwo
dooncethree
dooncefour
forcegreet
factoryfound
TR_Map
T_Local_NPC
nolore
Source
1begin TR_m2_q_12_Bugdul
2;q2-12-Misc Ruin of Strife - Local Script, placed on Bugdul Gro-gulfis
3;Keeps track of dead bandits and starting combat if the player is on the Bandits' side
4short controlQ; 0 - Not Talked to, 1 - Fight bandits, 2 - Bandits killed, 3 - Quest Done
5short banditsdead
6short doonce
7short dooncetwo ; for the factory
8short dooncethree ;for the forcegreeting and attack
9short dooncefour ; for the making sure they (the bandits) attack
10short forcegreet
11short factoryfound
12short TR_Map
13short T_Local_NPC
14short nolore
15
16if ( MenuMode == 1 )
17 return
18endif
19
20if ( TR_Map != 2 )
21 set TR_Map to 2
22endif
23
24if ( TR_m2_o_Nedheleg.orders == 2 )
25 if ( dooncethree == 0 )
26 if ( GetDistance, player < 900 )
27 set forcegreet to 1
28 ForceGreeting
29 set dooncethree to 1
30 StartCombat, Player
31 TR_m2_O_Ushugoba->StartCombat, Player
32 TR_m2_BogamulgroGulfis->StartCombat, Player
33 endif
34 endif
35endif
36
37if ( banditsdead == 9 )
38 if ( doonce == 0 )
39 if ( controlQ == 1 )
40 Journal, TR_m2_Wil_RuinOfStrife, 35
41 set controlQ to 2
42 AIWander 0, 0, 0
43 TR_m2_BogamulgroGulfis->AIWander 0, 0, 0
44 TR_m2_O_Ushugoba->AIWander 0, 0, 0
45 set doonce to 1
46 endif
47 endif
48endif
49
50if ( TR_m2_q12_FactoryDoor.factoryfound == 1 )
51 if ( dooncetwo == 0 )
52 set factoryfound to 1
53 set dooncetwo to 1
54 endif
55endif
56
57if ( GetPCCell "Bthangthamuzand, Entrance Hall" == 1 )
58 if ( dooncefour == 0 )
59 set TR_m2_o_Jeras_Ticedo.attackplayer to 1
60 set dooncefour to 1
61 endif
62endif
63
64if ( CellChanged ) ; this is just to make sure everything works fine if you kill some bandits without Bugdul.
65 if ( getDeadCount TR_m2_o_Lugdulg >= 1 )
66 if ( getDeadCount TR_m2_o_Mos >= 1 )
67 if ( getDeadCount TR_m2_o_Creto_Deselus >= 1 )
68 if ( getDeadCount TR_m2_o_Jeras_Ticedo >= 1 )
69 if ( getDeadCount TR_m2_o_Fadanawe >= 1 )
70 if ( getDeadCount TR_m2_o_Fels_Llelan >= 1 )
71 if ( getDeadCount TR_m2_o_Haema >= 1 )
72 if ( getDeadCount "TR_m2_o_Jaiel Milien" >= 1 )
73 if ( getDeadCount TR_m2_o_Nedheleg >= 1 )
74 set banditsdead to 9
75 endif
76 endif
77 endif
78 endif
79 endif
80 endif
81 endif
82 endif
83 endif
84endif
85
86if ( TR_m2_o_Jeras_Ticedo->OnDeath == 1 )
87 set banditsdead to ( banditsdead + 1 )
88endif
89
90if ( TR_m2_o_Creto_Deselus->OnDeath == 1 )
91 set banditsdead to ( banditsdead + 1 )
92endif
93
94if ( TR_m2_o_Fadanawe->OnDeath == 1 )
95 set banditsdead to ( banditsdead + 1 )
96endif
97
98if ( TR_m2_o_Fels_Llelan->OnDeath == 1 )
99 set banditsdead to ( banditsdead + 1 )
100endif
101
102if ( TR_m2_o_Haema->OnDeath == 1 )
103 set banditsdead to ( banditsdead + 1 )
104endif
105
106if ( "TR_m2_o_Jaiel Milien"->OnDeath == 1 )
107 set banditsdead to ( banditsdead + 1 )
108endif
109
110if ( TR_m2_o_Lugdulg->OnDeath == 1 )
111 set banditsdead to ( banditsdead + 1 )
112endif
113
114if ( TR_m2_o_Mos->OnDeath == 1 )
115 set banditsdead to ( banditsdead + 1 )
116endif
117
118if ( TR_m2_o_Nedheleg->OnDeath == 1 )
119 set banditsdead to ( banditsdead + 1 )
120endif
121end