TR_m4_OranSlave_Sc
TR_Mainland.esm
Variables
10
Local Variables
slaveStatus
doOnce
NoLore
TR_Map
control
controlQ
TR_m4_OranSlave
T_Local_NPC
T_Local_NoLore
T_Local_Khajiit
Source
1Begin TR_m4_OranSlave_Sc
2
3;this is for the Slaves in the Oran Plantation and its surrounding area
4;they have a unique short TR_m4_OranSlave, which will be used when freeing the slaves
5
6;Slave Status... each slave has a status as follows
7;0 = Owned ( default state... does not indicate who they are owned by )
8;1 = For Sale ( someone in the game can "sell" this slave via dialogue )
9;2 = Owned By the Player ( the player has purchased this slave and the slave follows the player )
10;3 = Freed ( the player has freed this slave, the slave eventually disables himself)
11;dead = not in slave status, but a state one should check for
12
13
14short slaveStatus
15short doOnce
16short NoLore
17short TR_Map
18short control
19short controlQ
20short TR_m4_OranSlave
21short T_Local_NPC
22short T_Local_NoLore
23short T_Local_Khajiit
24
25if ( slaveStatus == 2 )
26 if ( doOnce == 0 )
27 AIFollow Player 0 0 0 0 0
28 Set doOnce to 1
29 endif
30 return
31endif
32
33if ( slaveStatus == 3 )
34 if ( GetCurrentAIPackage == 3 )
35 AIWander 512 0 0 0 0 0 0 0 0 0 0 0
36 endif
37 if ( GetItemCount Slave_Bracer_Left > 0 )
38 Drop Slave_Bracer_Left 1
39 endif
40 if ( GetItemCount Slave_Bracer_Right > 0 )
41 Drop Slave_Bracer_Right 1
42 endif
43 if ( CellChanged == 1 )
44 Disable
45 endif
46endif
47
48if ( T_Local_Khajiit )
49 return
50endif
51
52set T_Local_Khajiit to -1
53
54if ( GetRace "T_Els_Cathay" )
55 set T_Local_Khajiit to 1
56elseif ( GetRace "T_Els_Cathay-raht" )
57 set T_Local_Khajiit to 1
58elseif ( GetRace "T_Els_Dagi-raht" )
59 set T_Local_Khajiit to 1
60elseif ( GetRace "T_Els_Ohmes" )
61 set T_Local_Khajiit to 1
62elseif ( GetRace "T_Els_Ohmes-raht" )
63 set T_Local_Khajiit to 1
64elseif ( GetRace "T_Els_Suthay" )
65 set T_Local_Khajiit to 1
66elseif ( GetRace "T_Els_Tojay" )
67 set T_Local_Khajiit to 1
68elseif ( GetRace "Khajiit" )
69 set T_Local_Khajiit to 1
70endif
71set TR_Map to 4
72
73end