TR_m7_Pub_Narsis_Temple
TR_Mainland.esm
Variables
11
Local Variables
TR_Map
control
controlQ
rent
rentDay
rentMonth
setup
cleanup
T_Local_NPC
NoLore
T_Local_NoLore
Source
1begin TR_m7_Pub_Narsis_Temple
2
3short TR_Map
4short control
5short controlQ
6
7;Cell: Narsis, Eight-Bones Temple
8;Publican: TR_m7_Olvi Fedos
9;Flag: TR_m7_Rent_Narsis_Temple
10
11;all rooms get rented for one day
12;This guy must be in the map where the room is if you use the locked door cell loading cleanup
13;rename the script for the guy and make a specific door to unlock or flag to set
14;NO actual key is given to player, a global flag is set that removes the ownership on the beds.
15
16;this script fires off when RENT is set true. Rent is set true throuhg the BEDS topic in dialogue, which all Publicans have.
17;Each publican will also have a separate response to buying the bed, so they can give simple directions. There is also a default one.
18
19short rent ;if room is rented, set through dialogue on this NPC
20short rentDay ;the day of the rental
21short rentMonth ;the month of the rental
22short setup ;if setup has been done
23short cleanup ;true if you want to cleanup all the flags, rental is over and can be reset
24short T_Local_NPC
25short NoLore
26short T_Local_NoLore
27;this script also uses a global variable (Rent_Bed_Pelagiad). Make a new one for each rental. You can have as many
28;beds as you want use that variable, it is used through the ownership data on the object reference
29
30if ( rent == 1 )
31
32 if ( setup == 0 )
33 set rentDay to Day
34 set rentMonth to Month
35 set setup to 1
36 set TR_m7_Rent_Narsis_Temple to 1 ;this is the flag for the ownership on the bed
37
38 else ;setup is done so check to see if the day is over
39
40 if ( Day != rentDay )
41 set cleanup to 1
42
43 elseif ( Month != rentMonth )
44 set cleanup to 1
45
46 endif
47
48 endif
49
50 if ( cleanup == 1 ) ;this gets called when the rental is over and everything can be cleaned up
51 set rent to 0
52 set TR_m7_Rent_Narsis_Temple to 0
53 set setup to 0
54 set rentDay to 0
55 set rentMonth to 0
56 set cleanup to 0
57 endif
58
59endif
60
61if ( TR_Map == 7 )
62 return
63endif
64
65set TR_Map to 7
66
67end