Scripts

TR_m3_Pub_HuntedHound

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