TR_m4_NPC_Tattara
TR_Mainland.esm
Variables
23
Local Variables
TR_Map
control
controlQ
NoLore
controlEnd
T_Local_NPC
T_Local_NoLore
controlA
controlB
controlC
OnPCHitMe
TR_dicegambler
TR_36bet
TR_36losstrack
TR_36playscore
TR_36opposcore
TR_36playroll1
TR_36playroll2
TR_36opporoll1
TR_36opporoll2
TR_36playstand
TR_36oppostand
TR_36playluck
Source
1Begin TR_m4_NPC_Tattara
2; This short script is there to allow dialogue to be filtered on the TR_Map local variable,
3; allowing for regional topics such as "Morrowind Lore" or "Geographic Regions" to be
4; appropriate to the location the NPC is. This version is for "NoLore" NPCs.
5
6short TR_Map
7short control
8short controlQ
9short NoLore
10short controlEnd
11short T_Local_NPC
12short T_Local_NoLore
13short controlA ;for the "good offer" topic
14short controlB ;for the "Dervara Diron" topic
15short controlC ;for the "bear traps"
16short OnPCHitMe
17
18;variables for the "game of thirty-six"
19
20short TR_dicegambler ;this variable gives the NPC access to the game
21short TR_36bet ;this marks the bet size - 1 for 10 gold, 2 for 50 gold, 3 for 100 gold
22short TR_36losstrack ;this tracks how many times the opponent has lost
23short TR_36playscore ;this tracks the player's total score
24short TR_36opposcore ;this tracks the opponent's total score
25short TR_36playroll1 ;this tracks the player's first die's roll
26short TR_36playroll2 ;this tracks the player's second die's roll
27short TR_36opporoll1 ;this tracks the opponent's first die's roll
28short TR_36opporoll2 ;this tracks the opponent's second die's roll
29short TR_36playstand ;the player has stood
30short TR_36oppostand ;the opponent has stood
31short TR_36playluck ;the player's luck
32
33;end of gambling shorts
34
35if ( controlB == 3 )
36 if ( CellChanged == 1 )
37 set controlB to 4
38 set "TR_m4_Dervara_Diron".controlB to 3
39 endif
40endif
41
42;-----Tattara's dice game (disables the dice minigame until appropriate; enabling done in dialogue)
43
44if ( GetJournalIndex "TR_m4_TG_Shei3C" < 100 )
45 if ( TR_dicegambler == 0 )
46 set TR_dicegambler to 10
47 endif
48endif
49
50if ( GetJournalIndex "TR_m4_TG_Shei3C" >= 100 )
51 if ( TR_dicegambler == 10 )
52 set TR_dicegambler to 1
53 endif
54endif
55
56;---------end of Tattara's dice game
57
58if ( GetItemCount "T_Com_Iron_Rapier_01" == 0 )
59 additem "T_Com_Iron_Rapier_01" 1
60endif
61
62if ( TR_Map == 4 )
63 return
64endif
65
66set TR_Map to 4
67; The one in town should have dialogue
68if ( GetInterior == 0 )
69 set T_Local_NoLore to 1
70endif
71
72End