TR_m3_PilgrimsHall_Gorne
TR_Mainland.esm
Variables
9
Local Variables
TR_Map
control
rent
rentDay
rentMonth
setup
cleanup
T_Local_NPC
NoLore
Source
1begin TR_m3_PilgrimsHall_Gorne
2
3;Cell: Gorne, Pilgrim's Hall
4;Publican: TR_m3_Anana Deroth
5;Flag: TR_m3_Rent_Gorne
6
7
8;this script fires off when RENT is set true. Rent is set true through the BEDS topic in dialogue, which all Publicans have.
9;Each publican will also have a separate response to buying the bed, so they can give simple directions. There is also a default one.
10
11short TR_Map
12short control
13short rent ;if room is rented, set through dialogue on this NPC
14short rentDay ;the day of the rental
15short rentMonth ;the month of the rental
16short setup ;if setup has been done
17short cleanup ;true if you want to cleanup all the flags, rental is over and can be reset
18short T_Local_NPC
19short NoLore
20;this script also uses a global variable (TR_m3_Rent_Gorne). Make a new one for each rental. You can have as many
21;beds as you want use that variable, it is used through the ownership data on the object reference
22
23if ( control == 1 )
24 return
25endif
26
27if ( GetPCRank "Temple" >= 0 )
28 set TR_m3_Rent_Gorne to 1
29 set TR_Map to 3
30 set control to 1
31 set rent to 0
32 return
33endif
34
35if ( GetPCRank "T_Mw_HouseIndoril" >= 0 )
36 set TR_m3_Rent_Gorne to 1
37 set TR_Map to 3
38 set control to 1
39 set rent to 0
40 return
41endif
42
43if ( rent == 1 )
44
45 if ( setup == 0 )
46 set rentDay to Day
47 set rentMonth to Month
48 set setup to 1
49 set TR_m3_Rent_Gorne to 1 ;this is the flag for the ownership on the bed
50
51 else ;setup is done so check to see if the day is over
52
53 if ( Day != rentDay )
54 set cleanup to 1
55
56 elseif ( Month != rentMonth )
57 set cleanup to 1
58
59 endif
60
61 endif
62
63 if ( cleanup == 1 ) ;this gets called when the rental is over and everything can be cleaned up
64 set rent to 0
65 set TR_m3_Rent_Gorne to 0
66 set setup to 0
67 set rentDay to 0
68 set rentMonth to 0
69 set cleanup to 0
70 endif
71
72endif
73
74; This short script is there to allow dialogue to be filtered on the TR_Map local variable,
75; allowing for regional topics such as "Morrowind Lore" or "Geographic Regions" to be
76; appropriate to the location the NPC is.
77
78if ( TR_Map == 3 )
79 return
80endif
81
82set TR_Map to 3
83
84End