TR_m3_Pub_Nanaav_PilgrimsHall
TR_Mainland.esm
Variables
10
Local Variables
TR_Map
control
controlQ
rent
rentDay
rentMonth
setup
cleanup
T_Local_NPC
NoLore
Source
1begin TR_m3_Pub_Nanaav_PilgrimsHall
2
3short TR_Map
4short control
5short controlQ
6
7;This version includes no door lock/unlock and allows free access to Temple/Indoril players
8
9;Cell: Nanaav, Pilgrim's Hall
10;Publican: Ondasa Therethi (TR_m3_Ondasa Therethi)
11;Flag: TR_m3_Rent_Nanaav_PilgrimsHall
12
13;all rooms get rented for one day
14;This guy must be in the map where the room is if you use the locked door cell loading cleanup
15;rename the script for the guy and make a specific door to unlock or flag to set
16;NO actual key is given to player, a global flag is set that removes the ownership on the beds.
17
18;this script fires off when RENT is set true. Rent is set true throuhg the BEDS topic in dialogue, which all Publicans have.
19;Each publican will also have a separate response to buying the bed, so they can give simple directions. There is also a default one.
20
21short rent ;if room is rented, set through dialogue on this NPC
22short rentDay ;the day of the rental
23short rentMonth ;the month of the rental
24short setup ;if setup has been done
25short cleanup ;true if you want to cleanup all the flags, rental is over and can be reset
26short T_Local_NPC
27short NoLore
28;this script also uses a global variable (Rent_Bed_Pelagiad). Make a new one for each rental. You can have as many
29;beds as you want use that variable, it is used through the ownership data on the object reference
30
31if ( control == 1 )
32 return
33endif
34
35if ( GetPCRank "Temple" >= 0 )
36 set TR_m3_Rent_Nanaav_PilgrimsHall to 1
37 set TR_Map to 3
38 set control to 1
39 set rent to 0
40 return
41endif
42
43if ( GetPCRank "T_Mw_HouseIndoril" >= 0 )
44 set TR_m3_Rent_Nanaav_PilgrimsHall to 1
45 set TR_Map to 3
46 set control to 1
47 set rent to 0
48 return
49endif
50
51if ( rent == 1 )
52
53 if ( setup == 0 )
54 set rentDay to Day
55 set rentMonth to Month
56 set setup to 1
57 set TR_m3_Rent_Nanaav_PilgrimsHall to 1 ;this is the flag for the ownership on the bed
58
59 else ;setup is done so check to see if the day is over
60
61 if ( Day != rentDay )
62 set cleanup to 1
63
64 elseif ( Month != rentMonth )
65 set cleanup to 1
66
67 endif
68
69 endif
70
71 if ( cleanup == 1 ) ;this gets called when the rental is over and everything can be cleaned up
72 set rent to 0
73 set TR_m3_Rent_Nanaav_PilgrimsHall to 0
74 set setup to 0
75 set rentDay to 0
76 set rentMonth to 0
77 set cleanup to 0
78 endif
79
80endif
81
82if ( TR_Map == 3 )
83 return
84endif
85
86set TR_Map to 3
87
88end