Scripts

TR_m3_A8_Sedaves_Adrendil_S

TR_Mainland.esm
Variables 10
Local Variables
rent
rentDay
rentMonth
setup
cleanup
TR_Map
control
controlQ
T_Local_NPC
NoLore
Source
1begin TR_m3_A8_Sedaves_Adrendil_S 2;this script fires off when RENT is set true. Rent is set true throuhg the BEDS topic in dialogue, which all Publicans have. 3;Each publican will also have a separate response to buying the bed, so they can give simple directions. There is also a default one. 4 5short rent ;if room is rented, set through dialogue on this NPC 6short rentDay ;the day of the rental 7short rentMonth ;the month of the rental 8short setup ;if setup has been done 9short cleanup ;true if you want to cleanup all the flags, rental is over and can be reset 10short TR_Map 11short control 12short controlQ 13short T_Local_NPC 14short NoLore 15 16if ( TR_Map == 0 ) 17 set TR_Map to 3 18endif 19 20if ( rent == 1) 21 if ( setup == 0 ) 22 set rentDay to Day 23 set rentMonth to Month 24 set setup to 1 25 set TR_m3_Rent_ED_Velk to 1 ;this is the flag for the ownership on the bed 26 TR_m3_A8_Rentable->unlock ;also needed if you have locked the room, use a specific objectRef 27 else ;setup is done so check to see if the day is over 28 if ( Day != rentDay ) 29 set cleanup to 1 30 elseif ( Month != rentMonth ) 31 set cleanup to 1 32 endif 33 endif 34 if ( CellChanged == 1 ) ;this is only needed if you've done a locked door. If so, you only want to do this on cell change so you don't lock them in the room 35 if ( cleanup == 1 ) ;this gets called when the rental is over and everything can be cleaned up 36 set rent to 0 37 set TR_m3_Rent_ED_Velk to 0 38 set setup to 0 39 set rentDay to 0 40 set rentMonth to 0 41 set cleanup to 0 42 TR_m3_A8_Rentable->lock 50 43 endif 44 endif 45endif 46end TR_m3_A8_Sedaves_Adrendil_S