TR_m3_RD_q_EJP_TalenSC
TR_Mainland.esm
Variables
11
Local Variables
slaveStatus
doOnce
NoLore
TR_Map
control
controlQ
carriesStolen
confessed
returncomment
T_Local_NPC
T_Local_NoLore
Source
1Begin TR_m3_RD_q_EJP_TalenSC
2
3; Script on NPC "TR_m3_S_Talen-Ei" for quest "TR_m3_RD_ExtPunish".
4
5; copies T_ScNpc_Mw_Map3Slave and adds quest behavior
6
7short slaveStatus
8short doOnce
9short NoLore
10short TR_Map
11short control
12short controlQ
13short carriesStolen
14short confessed
15short returncomment
16short T_Local_NPC
17short T_Local_NoLore
18
19if ( TR_Map != 3 )
20 set TR_Map to 3
21endif
22
23if ( CellChanged )
24 if ( Random100 <= 25 )
25 set carriesStolen to 1
26 else
27 set carriesStolen to 0
28 endif
29 if ( GetDisabled )
30 if ( GetJournalIndex "TR_m3_RD_ExtPunish" >= 300 )
31 Enable
32 endif
33 endif
34endif
35
36if ( OnDeath )
37 if ( GetJournalIndex "TR_m3_RD_ExtPunish" >= 15 )
38 Journal "TR_m3_RD_ExtPunish" 210
39 endif
40endif
41
42if ( slaveStatus == 0 )
43 return
44endif
45
46if ( slaveStatus == 1 )
47 return
48endif
49
50if ( slaveStatus == 2 )
51 if ( doOnce == 0 )
52 AIFollow Player 0 0 0 0 0
53 Set doOnce to 1
54 endif
55 return
56endif
57
58if ( slaveStatus == 3 )
59 set "TR_m3_Eveshi Drilor".control to 1 ; to check if Talen-Ei was freed
60
61 if ( GetJournalIndex "TR_m3_RD_ExtPunish" > 0 )
62 if ( GetJournalIndex "TR_m3_RD_ExtPunish" < 100 )
63 if ( GetJournalIndex "TR_m3_RD_ExtPunish" != 45 )
64 Journal "TR_m3_RD_ExtPunish" 130
65 endif
66 endif
67 endif
68
69 if ( GetCurrentAIPackage == 3 )
70 AIWander 512 0 0 0 0 0 0 0 0 0 0 0
71 endif
72 if ( GetItemCount Slave_Bracer_Left > 0 )
73 Drop Slave_Bracer_Left 1
74 endif
75 if ( GetItemCount Slave_Bracer_Right > 0 )
76 Drop Slave_Bracer_Right 1
77 endif
78 if ( CellChanged == 1 )
79 Disable
80 endif
81endif
82
83End