TR_m3_NPC_Balathren_SlaveSc
TR_Mainland.esm
Variables
10
Local Variables
slaveStatus
doOnce
NoLore
TR_Map
control
controlQ
T_Local_NPC
T_Local_NoLore
T_Local_Khajiit
TR_m3_Balathren_Slave
Source
1Begin TR_m3_NPC_Balathren_SlaveSc
2
3;Slave Status... each slave has a status as follows
4;0 = Owned ( default state... does not indicate who they are owned by )
5;1 = For Sale ( someone in the game can "sell" this slave via dialogue )
6;2 = Owned By the Player ( the player has purchased this slave and the slave follows the player )
7;3 = Freed ( the player has freed this slave, the slave eventually disables himself)
8;dead = not in slave status, but a state one should check for
9
10short slaveStatus
11short doOnce
12short NoLore
13short TR_Map
14short control
15short controlQ
16short T_Local_NPC
17short T_Local_NoLore
18short T_Local_Khajiit
19short TR_m3_Balathren_Slave; used in TR_m3_wil_BrothChain (topic "Ja'Sahrad")
20
21if ( slaveStatus == 2 )
22 if ( doOnce == 0 )
23 AIFollow Player 0 0 0 0 0
24 Set doOnce to 1
25 endif
26 return
27endif
28
29if ( slaveStatus == 3 )
30 if ( doOnce == 0 )
31 if ( GetDeadCount "TR_m3_Athron Brilyn" == 0 )
32 if ( "TR_m3_Athron Brilyn"->GetDistance Player < 1500 )
33 if ( "TR_m3_Athron Brilyn"->GetDetected Player == 1 )
34 "TR_m3_Athron Brilyn"->SetFight 90
35 "TR_m3_Athron Brilyn"->StartCombat Player
36 endif
37 endif
38 endif
39 if ( GetDeadCount "TR_m3_Barvenu Indaalo" == 0 )
40 if ( "TR_m3_Barvenu Indaalo"->GetDistance Player < 1500 )
41 if ( "TR_m3_Barvenu Indaalo"->GetDetected Player == 1 )
42 "TR_m3_Barvenu Indaalo"->SetFight 90
43 "TR_m3_Barvenu Indaalo"->StartCombat Player
44 endif
45 endif
46 endif
47 set doOnce to 1
48 endif
49 if ( GetCurrentAIPackage == 3 )
50 AIWander 512 0 0 0 0 0 0 0 0 0 0 0
51 endif
52 if ( GetItemCount Slave_Bracer_Left > 0 )
53 Drop Slave_Bracer_Left 1
54 endif
55 if ( GetItemCount Slave_Bracer_Right > 0 )
56 Drop Slave_Bracer_Right 1
57 endif
58 if ( CellChanged == 1 )
59 Disable
60 endif
61endif
62
63if ( T_Local_Khajiit )
64 return
65endif
66
67set T_Local_Khajiit to -1
68
69if ( GetRace "T_Els_Cathay" )
70 set T_Local_Khajiit to 1
71elseif ( GetRace "T_Els_Cathay-raht" )
72 set T_Local_Khajiit to 1
73elseif ( GetRace "T_Els_Dagi-raht" )
74 set T_Local_Khajiit to 1
75elseif ( GetRace "T_Els_Ohmes" )
76 set T_Local_Khajiit to 1
77elseif ( GetRace "T_Els_Ohmes-raht" )
78 set T_Local_Khajiit to 1
79elseif ( GetRace "T_Els_Suthay" )
80 set T_Local_Khajiit to 1
81elseif ( GetRace "T_Els_Tojay" )
82 set T_Local_Khajiit to 1
83elseif ( GetRace "Khajiit" )
84 set T_Local_Khajiit to 1
85endif
86set TR_Map to 3
87AddTopic "go free"
88
89end