Scripts

Pub_RavenRock

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