nichUtil.qsrc 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981
  1. # nichUtil
  2. !! Used variables-
  3. !! Prefix- nich
  4. !! nichWork- 0= does not work for nicholas and never has, 1=has agreed to work for Nicholas but has not introduced herself yet, 2= currently works for nicholas, 3= quit job in good faith and could get hired again, 4= quit job in bad faith or got thrown out and nicholas is blocked
  5. !! nichWorkState- 0= sample days, 1= fully employed
  6. !! nichPerformance- ranging from 0 (fired) to 100 (best)
  7. !! nichHired- the day Sveta was hired
  8. !! nichVacationFrom- the first free day if Sveta gets some time off
  9. !! nichVactionTil- the last free day if Sveta gets some time off (=nichVacationFrom if she has one free day)
  10. !! nichLastWorkDay- the last day Sveta was in the appartment... needed because otherwise the player could avoid work performance checks by just not showing up here
  11. !! nichOutfitState- 0=not wearing an appropriate outfit, 1=wearing an appropriate outfit
  12. !! nichSalaryBase
  13. !! nichSalaryNext
  14. !! nichSalaryOutstanding
  15. !! nichPregnancy: 0: Nicholas has not noticed that you are pregnant
  16. !! 1: Nicholas has noticed you being pregnant
  17. if $ARGS[0] = '' or $ARGS[0] = 'start':
  18. 'This page should never appear. Please report this bug including a description of how you got here.'
  19. elseif $ARGS[0] = 'debug':
  20. if $ARGS[1] = 'debugToggle':
  21. nichDebug = 1 - nichDebug
  22. elseif $ARGS[1] = 'galaTrainingToggle':
  23. nichGalaTraining = 1 - nichGalaTraining
  24. elseif $ARGS[1] = 'chore':
  25. if $ARGS[3] = 'min':
  26. nichChoreState[ARGS[2]] = 0
  27. elseif $ARGS[3] = '1':
  28. nichChoreState[ARGS[2]] += 1
  29. elseif $ARGS[3] = '5':
  30. nichChoreState[ARGS[2]] += 5
  31. end
  32. elseif $ARGS[1] = 'evaluation':
  33. if $ARGS[2] = 'silent':
  34. gs 'nichNicholas','evaluation', 'silent'
  35. end
  36. elseif $ARGS[1] = 'shortcut':
  37. if $ARGS[2] = 'meetTanya':
  38. !! abonement is a var from fit
  39. gs 'nichUtil','clearVars'
  40. abonement = 30
  41. nichWork = 0
  42. nichTanya['Relationship'] = 0
  43. nichTanya['RelationshipState'] = 0
  44. nichTanya['RelationshipBreakup'] = 0
  45. nichTanya['FuckCounter'] = 0
  46. gt 'fit','start'
  47. elseif $ARGS[2] = 'getHired':
  48. nichWork = 0
  49. nichTanya['Relationship'] = 1
  50. nichTanya['RelationshipState'] = 10
  51. nichTanya['RelationshipBreakup'] = 0
  52. nichJobRefused = 0
  53. nichTanya['FuckCounter'] = 6
  54. hour = 16
  55. gt 'city_center'
  56. elseif $ARGS[2] = 'tanyaDate100':
  57. nichWork = 2
  58. nichTanya['Relationship'] = 1
  59. nichTanya['RelationshipState'] = 10
  60. nichTanya['RelationshipBreakup'] = 0
  61. nichTanya['FuckCounter'] = 6
  62. nichTanya['Dominance'] = 30
  63. nichTanya['Strapon'] = 0
  64. nichGalaKnowsPT = 0
  65. hour = 16
  66. $loc = 'nichBedroomTanja'
  67. gt 'nichTanya','bedroomTanya'
  68. elseif $ARGS[2] = 'nichGentleclubE1':
  69. nichWork = 2
  70. minut = 0
  71. hour = 18
  72. nichGentleclubDayE1 = daystart
  73. nichGentleclubE1 = 1
  74. gt 'nichApartment'
  75. elseif $ARGS[2] = 'galaContract':
  76. nichGalaTraining = 1
  77. nichGalaTrainCounter = 5
  78. nichWork = 2
  79. nichGalaContractActive = 0
  80. nichGalaContract = 0
  81. minut = 0
  82. hour = 18
  83. gt 'nichApartment'
  84. end
  85. end
  86. '<center><b>Nicholas'' Apartment Storyline Debug</b></center>'
  87. '<i><b>Debug mode</b>: display debug messages and force random events to fire as often as possible</i>'
  88. if nichDebug = 1:
  89. 'Debug mode: <a href="exec: gt ''nichUtil'', ''debug'', ''debugToggle''">Enabled</a>'
  90. else
  91. 'Debug mode: <a href="exec: gt ''nichUtil'', ''debug'', ''debugToggle''">Disabled</a>'
  92. end
  93. *nl
  94. '<i><b>Shortcuts</b></i>'
  95. '<i>The following options will set and change a whole bunch of variables and might transport you to another place. Important: every shortcut has been created with a debug scenario in mind and won''t set/reset every storyline-variable. Expect weird behavior.</i>'
  96. '<a href="exec: gt ''nichUtil'', ''debug'',''shortcut'',''meetTanya''">Meet Tanya</a>: Sets you up to meet Tanya. Go to the dressing room. She is the ''cute girl''. Meeting her has a random chance unless you have activated debug mode.'
  97. '<a href="exec: gt ''nichUtil'', ''debug'',''shortcut'',''getHired''">Get hired</a>: You visited Tanya often enough for her to offer you the job as the live-in maid.'
  98. '<a href="exec: gt ''nichUtil'', ''debug'',''shortcut'',''tanyaDate100''">Tanya Special Date 1</a>: Tanya became somewhat dominant. Ask her for a date and let her decide where to go.'
  99. '<a href="exec: gt ''nichUtil'', ''debug'',''shortcut'',''nichGentleclubE1''">Nicholas Club Event 1</a>: Nicholas has a special guest over. Meet him at his study.'
  100. '<a href="exec: gt ''nichUtil'', ''debug'',''shortcut'',''galaContract''">Gala Contract</a>: Gala offers a special contract. Meet her in the living room.'
  101. *nl
  102. '<i><b>Job performance</b></i>'
  103. 'Overall performance (higher=better): <<nichPerformance>>'
  104. '<a href="exec: gt ''nichUtil'', ''debug'', ''evaluation'', ''silent''">Get silent performance evaluation</a>'
  105. '<a href="exec: gt ''nichNicholas'', ''evaluation''">Get detailed performance evaluation</a>'
  106. *nl
  107. '<i><b>Chore state</b>: higher numbers are worse</i>'
  108. 'Hallway: <<nichChoreState[0]>> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 0, ''min''">min</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 0, ''1''">+1</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 0, ''5''">+5</a>'
  109. 'Guest cloakroom: <<nichChoreState[1]>> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 1, ''min''">min</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 1, ''1''">+1</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 1, ''5''">+5</a>'
  110. 'Maid bedroom: <<nichChoreState[2]>> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 2, ''min''">min</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 2, ''1''">+1</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 2, ''5''">+5</a>'
  111. 'Maid bathroom: <<nichChoreState[3]>> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 3, ''min''">min</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 3, ''1''">+1</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 3, ''5''">+5</a>'
  112. 'Laundry: <<nichChoreState[4]>> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 4, ''min''">min</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 4, ''1''">+1</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 4, ''5''">+5</a>'
  113. 'Tanya bedroom: <<nichChoreState[5]>> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 5, ''min''">min</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 5, ''1''">+1</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 5, ''5''">+5</a>'
  114. 'Master bathroom: <<nichChoreState[6]>> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 6, ''min''">min</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 6, ''1''">+1</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 6, ''5''">+5</a>'
  115. 'Master bedroom: <<nichChoreState[7]>> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 7, ''min''">min</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 7, ''1''">+1</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 7, ''5''">+5</a>'
  116. 'Living room: <<nichChoreState[8]>> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 8, ''min''">min</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 8, ''1''">+1</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 8, ''5''">+5</a>'
  117. 'Kitchen: <<nichChoreState[9]>> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 9, ''min''">min</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 9, ''1''">+1</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 9, ''5''">+5</a>'
  118. 'Study: <<nichChoreState[10]>> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 10, ''min''">min</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 10, ''1''">+1</a> <a href="exec: gt ''nichUtil'', ''debug'', ''chore'', 10, ''5''">+5</a>'
  119. *nl
  120. '<i><b>NPCs</b></i>'
  121. 'The following settings are meant for debugging only. Touching them will influence the intended progression in the story.'
  122. '<b>Gala</b>'
  123. if nichGalaTraining = 1:
  124. 'Gala Training: <a href="exec: gt ''nichUtil'', ''debug'', ''galaTrainingToggle''">Enabled</a>'
  125. else
  126. 'Gala Training: <a href="exec: gt ''nichUtil'', ''debug'', ''galaTrainingToggle''">Disabled</a>'
  127. end
  128. '<b>Tanya</b>'
  129. 'Set relationship to:'
  130. '-<a href="exec: nichTanya[''Relationship''] = 0 & nichTanya[''RelationshipState''] = 0 & gt ''nichUtil'', ''debug''">Not together (and never have been)</a>'
  131. '-<a href="exec: nichTanya[''Relationship''] = 0 & nichTanya[''RelationshipState''] = 1000 & gt ''nichUtil'', ''debug''">Not together (you broke up)</a>'
  132. '-<a href="exec: nichTanya[''Relationship''] = 0 & nichTanya[''RelationshipState''] = 1010 & gt ''nichUtil'', ''debug''">Not together (Tanya broke up)</a>'
  133. '-<a href="exec: nichTanya[''Relationship''] = 1 & nichTanya[''RelationshipState''] = 10 & gt ''nichUtil'', ''debug''">Casually dating</a>'
  134. '-<a href="exec: nichTanya[''Relationship''] = 1 & nichTanya[''RelationshipState''] = 20 & gt ''nichUtil'', ''debug''">In a relationship</a>'
  135. 'You fucked Tanya <<nichTanya[''FuckCounter'']>> times'
  136. 'The last time you fucked Tanya was '+(daystart-nichTanya['FuckLast'])+' days ago'
  137. 'Tanya has a dominance of <<nichTanya[''Dominance'']>> (range: -100 - 100)'
  138. act 'DEBUG: New Workday': gs 'nichUtil', 'startWorkday'
  139. act 'Back': gt $menu_loc, $menu_arg
  140. elseif $ARGS[0] = 'startWorkday':
  141. !! Sveta has free Wednesdays.
  142. if nichWorkState > 0 and week = 3 and nichVactionTil < daystart:
  143. nichVactionTil = daystart
  144. end
  145. nichMissedWorkdays = daystart - nichLastWorkDay - 1
  146. if nickHired + 1 = daystart:
  147. !! this is the first workday ever
  148. nichMissedWorkdays = 0
  149. elseif nichVactionTil + 1 = daystart:
  150. !! this is the first day Sveta has to work after a vacation... maybe work piled up?
  151. nichMissedWorkdays = nichMissedWorkdays - nichVactionTil + nichVacationFrom -1
  152. elseif nichVactionTil >= daystart and nichVacationFrom <= daystart:
  153. !! Sveta does not have to work today
  154. nichMissedWorkdays = nichVacationFrom - nichLastWorkDay - 1
  155. end
  156. if nichMissedWorkdays > 0:
  157. !!Sveta has missed a workday... very bad
  158. nichPerformance -= 40 * nichMissedWorkdays
  159. if nichPerformance <= 0:
  160. nichNote = 1
  161. !!'You see a note hanging at the door to your room.'
  162. !!'"<<$pcs_nichname>>, you missed work. This is unacceptable. Take your stuff and leave. You are fired. -Nicholas"'
  163. !!'You see all your belongings standing in front of the door prepared for your departure.'
  164. !!gt 'nichUtil', 'fired'
  165. else
  166. nichNote = 2
  167. !!'You see a note hanging at the door to your room.'
  168. !!'"<<$pcs_nichname>>, you missed work. This is unacceptable. I expect this not to happen again. -Nicholas"'
  169. end
  170. elseif daystart > nichEvaluationLastReq and nichEvaluationLast < nichEvaluationLastReq:
  171. !! Sveta has missed her last evaluation
  172. !! Perform silent evaluation right now
  173. gs 'nichNicholas','evaluation', 'silent'
  174. !! Dont forget that this evaluation was for yesterday
  175. nichEvaluationLast = daystart - 1
  176. nichPerformance -= 20
  177. if nichPerformance <= 0:
  178. nichNote = 11
  179. !!'You see a note hanging at the door to your room.'
  180. !!'"<<$pcs_nichname>>, you missed your last evaluation. This is unacceptable. Take your stuff and leave. You are fired. -Nicholas"'
  181. !!'You see all your belongings standing in front of the door prepared for your departure.'
  182. !!gt 'nichUtil', 'fired'
  183. else
  184. nichNote = 12
  185. !!'You see a note hanging at the door to your room.'
  186. !!'"<<$pcs_nichname>>, you missed your last evaluation. This is unacceptable. I expect this not to happen again. -Nicholas"'
  187. end
  188. end
  189. nichLastWorkDay = daystart
  190. if nichWorkState > 0:
  191. nichEvaluationLastReq = 0
  192. elseif nichVactionTil >= daystart and nichVacationFrom <= daystart:
  193. nichEvaluationLastReq = daystart + 1
  194. else
  195. nichEvaluationLastReq = daystart
  196. end
  197. !! 0: hallway
  198. nichChoreState[0] += 5
  199. !! 1: guest bathroom
  200. nichChoreState[1] += 5
  201. !! 2: servant bedroom
  202. nichChoreState[2] += 5
  203. !! 3: servant bathroom
  204. nichChoreState[3] += 5
  205. !! 4: laundry
  206. nichChoreState[4] += 5
  207. !! 5: tanya bedroom, if nichTanya['Room'] = 1 she will clean it herself
  208. if nichTanya['Room'] = 0:
  209. nichChoreState[5] += 5
  210. end
  211. !! 6: master bathroom
  212. nichChoreState[6] += 5
  213. !! 7: master bedroom
  214. nichChoreState[7] += 5
  215. !! 8: living room
  216. nichChoreState[8] += 5
  217. !! 9: kitchen
  218. nichChoreState[9] += 5
  219. !!10: study
  220. nichChoreState[10] += 5
  221. !! Salary
  222. !! Sveta can collect it from a letter in her room
  223. if day = 1:
  224. nichSalaryOutstanding += nichSalaryNext
  225. nichSalaryNext = nichSalaryBase
  226. end
  227. !! NPC behaviour
  228. !! Gala will give up talking smack about Sveta after 5 days
  229. if nichGalaOpponent >= 10 and nichGalaOpponent < 20 and daystart > nichGalaOpponentDay + 5:
  230. nichGalaOpponent = 20
  231. elseif nichGalaOpponent = 30:
  232. nichGalaOpponent = 31
  233. end
  234. !! get rid of all variables concerning Nicholas except for nichWork
  235. elseif $ARGS[0] = 'clearVars':
  236. !!System vars
  237. !!Do not kill nichDebug
  238. killvar 'nichRand'
  239. killvar '$nichTempPic'
  240. killvar '$nichTemp'
  241. !!Work vars
  242. !!Do not kill nichWork
  243. killvar 'nichWorkState'
  244. killvar 'nichNote'
  245. killvar 'nichLastWorkDay'
  246. killvar 'nichMissedWorkdays'
  247. killvar 'nichAfterBFEvent'
  248. killvar 'nichEvaluationLast'
  249. killvar 'nichEvaluationLastReq'
  250. killvar 'nichHotelReferral'
  251. killvar 'nickHired'
  252. killvar 'nichHireMode'
  253. killvar 'nichJobRefused'
  254. killvar 'nichJobRefusedTReact'
  255. killvar 'nichPerformance'
  256. killvar 'nichSalaryNext'
  257. killvar 'nichCleanAppropriate'
  258. killvar 'nichOutfitState'
  259. !!NPC vars
  260. killvar 'nichKnowsCook'
  261. killvar 'nichCookPresent'
  262. killvar '$nichGalaAct'
  263. killvar '$nichNichAct'
  264. killvar '$nichTanyAct'
  265. killvar 'nichGalaPresent'
  266. killvar 'nichNichPresent'
  267. killvar 'nichTanyPresent'
  268. killvar 'nichGalaKnowsPT'
  269. killvar 'nichGalaOpinion'
  270. killvar 'nichGalaOpponent'
  271. killvar 'nichGalaOpponentDay'
  272. killvar 'nichGalaTraining'
  273. killvar 'nichGalaTrainCounter'
  274. killvar 'nichGalaTrainLast'
  275. killvar 'nichFlirtCounter'
  276. killvar 'nichFlirtLast'
  277. killvar 'nichNTRelation'
  278. killvar 'nichSex'
  279. !!Do not kill nichTanya['Uni']
  280. !!Do not kill Tanyas fuck vars since Sveta might meet her after leaving her job
  281. killvar 'nichTanyaSpyLast'
  282. killvar 'nichTanyaSpyCounter'
  283. elseif $ARGS[0] = 'fired':
  284. 'It takes you a few moments to process what just happened:'
  285. 'You have just been fired. And kind of lost your home, too.'
  286. gs 'homes_properties', 'block_access', 'maid_bedroom'
  287. nichWork = 4
  288. work = 0
  289. gs 'nichUtil', 'clearVars'
  290. act 'Take your belongings and leave the apartment':gt 'city_center'
  291. end
  292. !! initializes variables when hired, might mess everything up if called at any other time
  293. if $ARGS[0] = 'hired':
  294. gs 'homes_properties', 'give_access', 'maid_bedroom', 1
  295. nichWork = 2
  296. nichWorkState = 0
  297. nichPerformance = 45
  298. nickHired = daystart
  299. !!Todo: check the following
  300. nichVacationFrom = daystart
  301. nichVactionTil = daystart
  302. nichLastWorkDay = daystart
  303. nichEvaluationLast = daystart
  304. nichEvaluationLastReq = daystart
  305. nichMaidBathG = 0
  306. nichMaidLaundry = 0
  307. nichMaidDishes = 0
  308. nichMaidGroceries = 0
  309. nichMaidHallway = 0
  310. nichMaidLivingDust = 0
  311. nichMaidLivingFloor = 0
  312. nichMaidLivingItems = 0
  313. nichMaidLivingWindows = 0
  314. nichLastInspepection = -1
  315. nichChoreState[0] = 0
  316. nichSalaryBase = 10000
  317. $npc_nickname['A52'] = 'Master '+$npc_firstname['A52']
  318. end
  319. if $ARGS[0] = 'checkOutfit':
  320. if $clothingworntype = 'gm_maid':
  321. nichOutfitState = 1
  322. else
  323. nichOutfitState = 0
  324. end
  325. end
  326. !! Creates the actions for cleaning rooms
  327. !! DEPRECATED
  328. if $ARGS[0] = 'cleanOptions':
  329. $nichTempPic = func('nichUtil','cleanPic',$nichChoreType,$nichChoreLoc)
  330. if nichOutfitState = 0:
  331. '<b><font color = red>You have to change into an appropriate outfit before cleaning up.</font></b>'
  332. elseif nichChoreState[nichChoreID] > 0:
  333. act '(<<nichtTimeQuick>> minutes) Clean quickly':
  334. *clr & cla
  335. '<center><img <<$set_imgh>> src="<<$nichTempPic>>"></center>'
  336. minut += nichtTimeQuick
  337. nichChoreState[nichChoreID] = 0
  338. gs 'exp_gain', 'cleaning', rand (0,1)
  339. gs'stat'
  340. act 'Finish':
  341. gt $loc, 'return'
  342. end
  343. end
  344. act '(<<nichTimeNormal>> minutes) Clean normally':
  345. *clr & cla
  346. '<center><img <<$set_imgh>> src="<<$nichTempPic>>"></center>'
  347. minut += nichTimeNormal
  348. nichChoreState[nichChoreID] = 0
  349. gs 'exp_gain', 'cleaning', rand (1,3)
  350. act 'Finish':
  351. gt $loc, 'return'
  352. end
  353. end
  354. act '(<<nichTimeDiligently>> minutes) Clean diligently':
  355. *clr & cla
  356. '<center><img <<$set_imgh>> src="<<$nichTempPic>>"></center>'
  357. minut += nichTimeDiligently
  358. nichChoreState[nichChoreID] = 0
  359. gs 'exp_gain', 'cleaning', rand (1,5)
  360. act 'Finish':
  361. gt $loc, 'return'
  362. end
  363. end
  364. end
  365. act 'Don''t clean':
  366. gt $loc, 'return'
  367. end
  368. end
  369. !! Returns the path to a picture of a maid cleaning something. If there are more than one pictures matching the citeria one of them is chosen at random.
  370. !! Arguments:
  371. !! 1 (required): What to clean/do (bed, floor, furniture,bath,kitchen)
  372. !! 2 (optional): Where (servant (=bedroom servant), living, kitchen, hallway, masterbath, study, bathGuest)
  373. !! 3 (optional): How to clean (quickly, normally, diligently)
  374. if $ARGS[0] = 'cleanPic':
  375. killvar '$nichTempPic'
  376. if $ARGS[1] = 'bed':
  377. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid7.jpg'
  378. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid21.jpg'
  379. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid31.jpg'
  380. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid79.jpg'
  381. if $ARGS[2] = 'servant' or $ARGS[2] = 'tanya':
  382. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid27.jpg'
  383. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid34.jpg'
  384. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid71.jpg'
  385. elseif $ARGS[2] = 'master':
  386. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid56.jpg'
  387. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid79.jpg'
  388. end
  389. elseif $ARGS[1] = 'floor':
  390. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid5.jpg'
  391. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid9.jpg'
  392. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid15.jpg'
  393. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid16.jpg'
  394. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid58.jpg'
  395. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid60.jpg'
  396. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid61.jpg'
  397. elseif $ARGS[1] = 'bath':
  398. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid26.jpg'
  399. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid35.jpg'
  400. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid80.jpg'
  401. elseif $ARGS[1] = 'kitchen':
  402. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid19.jpg'
  403. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid23.jpg'
  404. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid24.jpg'
  405. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid38.jpg'
  406. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid52.jpg'
  407. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid66.jpg'
  408. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid67.jpg'
  409. elseif $ARGS[1] = 'furniture':
  410. if $ARGS[2] = 'living':
  411. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid0.jpg'
  412. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid4.jpg'
  413. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid41.jpg'
  414. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid59.jpg'
  415. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid70.jpg'
  416. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid73.jpg'
  417. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid74.jpg'
  418. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid76.jpg'
  419. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid78.jpg'
  420. elseif $ARGS[2] = 'study':
  421. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid30.jpg'
  422. end
  423. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid8.jpg'
  424. elseif $ARGS[1] = 'laundry':
  425. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid12.jpg'
  426. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid13.jpg'
  427. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid25.jpg'
  428. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid49.jpg'
  429. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid54.jpg'
  430. $nichTempPic[ARRSIZE('$nichTempPic')] = 'maid69.jpg'
  431. end
  432. if ARRSIZE('$nichTempPic') = 0:
  433. !!generic fallback in case no matching picture was found
  434. $RESULT = 'images/pc/activities/maidCleaning/maid0.jpg'
  435. else
  436. $RESULT = 'images/pc/activities/maidCleaning/'+$nichTempPic[rand(0,ARRSIZE('$nichTempPic')-1)]
  437. end
  438. if nichDebug = 1: 'Debug: Picture '+$RESULT
  439. !!killvar 'nichTemp'
  440. killvar '$nichTempPic'
  441. end
  442. !! Returns the path to a picture of Tanya.
  443. !! Arguments:
  444. !! 1 (required): General activity ("idle" for something not sex-related, "sexL" for lesbian sex, "sexH" for sex with a man)
  445. !! 2 (required for sex): Specific activity (prefix a: Tanya acts, prefix p: Tanya gets acted upon; "")
  446. !! 3 (optional): Partner for sex-options (0 or unset: PC, 1: PC and ignore PC appearance)
  447. if $ARGS[0] = 'tanyaPic':
  448. $nichTempFolder = 'images/characters/city/tanya/'
  449. if $ARGS[1] = 'idle':
  450. $RESULT = $nichTempFolder + 'idle/idle'+rand(0,5)+'.jpg'
  451. end
  452. if $ARGS[1] = 'cuddle':
  453. $RESULT = $nichTempFolder + 'sex/cuddle'+rand(0,4)+'.jpg'
  454. end
  455. if $ARGS[1] = 'sexH':
  456. if $ARGS[2] = 'spy':
  457. if $ARGS[3] = '' or $ARGS[3] = 'nicholas':
  458. $RESULT = $nichTempFolder + 'sexNich/nich'+rand(0,5)+'.jpg'
  459. elseif $ARGS[3] = 'bf1':
  460. $RESULT = $nichTempFolder + 'sexBf/bf1/sex'+rand(0,4)+'.jpg'
  461. elseif $ARGS[3] = 'bf2':
  462. $RESULT = $nichTempFolder + 'sexBf/bf2/sex'+rand(0,2)+'.jpg'
  463. end
  464. end
  465. end
  466. killvar '$nichTempFolder'
  467. end
  468. !! sets nichPCHair to:
  469. !! 0 if PC has brown, dark red or black hair (any natural color which is not blonde)
  470. !! 1 if PC is blonde
  471. !! 2 if PC has any other hair color
  472. if $ARGS[0] = 'updatePcHair':
  473. if pcs_haircol = 3:
  474. nichPCHair = 1
  475. elseif pcs_haircol > 3:
  476. nichPCHair = 2
  477. else
  478. nichPCHair = 0
  479. end
  480. end
  481. if $ARGS[0] = 'npcActivityAdd':
  482. $nichNpcActArr[ARRSIZE('$nichNpcActArr')] = $ARGS[1]
  483. nichNpcActTime[ARRSIZE('nichNpcActTime')] = ARGS[2]*60 + ARGS[3]
  484. end
  485. !! The activity the NPC is currently doing at a given time.
  486. !! The times are read as up to but not including.
  487. !! If you add an activity:
  488. !! 1. Add it here and make sure activities stay in chronological order.
  489. !! 2. Add the activity to the function whereis
  490. !! 3. Add the activity to the description of the corresponding character (e.g. nichNicholas)
  491. !! 4. Add the activity to the corresponding location (if its inside the appartment)
  492. if $ARGS[0] = 'npcActivity':
  493. if $ARGS[1] = 'nicholas':
  494. !!Morning routine
  495. if week <= 5:
  496. gs 'nichUtil', 'npcActivityAdd', 'sleep', 6 , 45
  497. gs 'nichUtil', 'npcActivityAdd', 'bathMorning', 7 , 15
  498. gs 'nichUtil', 'npcActivityAdd', 'study', 7 , 45
  499. gs 'nichUtil', 'npcActivityAdd', 'breakfast', 8 , 30
  500. else
  501. gs 'nichUtil', 'npcActivityAdd', 'sleep', 7 , 45
  502. gs 'nichUtil', 'npcActivityAdd', 'bathMorning', 8 , 15
  503. gs 'nichUtil', 'npcActivityAdd', 'study', 8 , 45
  504. gs 'nichUtil', 'npcActivityAdd', 'breakfast', 9 , 30
  505. end
  506. !!day avtivity
  507. if week <= 4:
  508. gs 'nichUtil', 'npcActivityAdd', 'leaveWork', 8 , 35
  509. gs 'nichUtil', 'npcActivityAdd', 'work', 18 , 0
  510. gs 'nichUtil', 'npcActivityAdd', 'returnWork', 18 , 05
  511. elseif week = 5:
  512. gs 'nichUtil', 'npcActivityAdd', 'leaveWork', 8 , 35
  513. gs 'nichUtil', 'npcActivityAdd', 'work', 16 , 0
  514. gs 'nichUtil', 'npcActivityAdd', 'returnWork', 16 , 05
  515. elseif week = 6:
  516. gs 'nichUtil', 'npcActivityAdd', 'leaveShopping', 9 , 35
  517. gs 'nichUtil', 'npcActivityAdd', 'shopping', 16 , 0
  518. gs 'nichUtil', 'npcActivityAdd', 'returnShopping', 16 , 05
  519. else
  520. gs 'nichUtil', 'npcActivityAdd', 'living', 16 , 0
  521. end
  522. !!evening
  523. if nichGentleclubDayE1 = daystart:
  524. !!Nicholas has an important guest in his study and stays there all evening
  525. gs 'nichUtil', 'npcActivityAdd', 'study', 22 , 30
  526. gs 'nichUtil', 'npcActivityAdd', 'bathEvening', 22 , 45
  527. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  528. elseif week <= 4:
  529. gs 'nichUtil', 'npcActivityAdd', 'dinner', 18 , 30
  530. gs 'nichUtil', 'npcActivityAdd', 'study', 20 , 30
  531. if week = 1:
  532. gs 'nichUtil', 'npcActivityAdd', 'study', 22 , 0
  533. elseif week = 2 or week = 4:
  534. if nichNTRelation < 10:
  535. gs 'nichUtil', 'npcActivityAdd', 'tanya', 22 , 0
  536. else
  537. gs 'nichUtil', 'npcActivityAdd', 'study', 22 , 0
  538. end
  539. elseif week = 3:
  540. gs 'nichUtil', 'npcActivityAdd', 'living', 22 , 0
  541. end
  542. gs 'nichUtil', 'npcActivityAdd', 'bathEvening', 22 , 15
  543. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  544. elseif week = 5 or week = 6:
  545. gs 'nichUtil', 'npcActivityAdd', 'study', 18 , 0
  546. gs 'nichUtil', 'npcActivityAdd', 'bathClub', 18 , 30
  547. gs 'nichUtil', 'npcActivityAdd', 'leaveClub', 18 , 35
  548. gs 'nichUtil', 'npcActivityAdd', 'club', 23 , 45
  549. gs 'nichUtil', 'npcActivityAdd', 'returnClub', 23 , 50
  550. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  551. else
  552. gs 'nichUtil', 'npcActivityAdd', 'study', 18 , 0
  553. gs 'nichUtil', 'npcActivityAdd', 'dinner', 18 , 30
  554. gs 'nichUtil', 'npcActivityAdd', 'gala', 21 , 30
  555. gs 'nichUtil', 'npcActivityAdd', 'bathEvening', 21 , 45
  556. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  557. end
  558. elseif $ARGS[1] = 'gala':
  559. if nichGalaDisabled = 1:
  560. gs 'nichUtil', 'npcActivityAdd', 'vanished', 24 , 0
  561. else
  562. !!Morning routine
  563. if week <= 5:
  564. gs 'nichUtil', 'npcActivityAdd', 'sleep', 6 , 45
  565. !! gala will wake up the same time Nicholas does (->alarm clock) but she will wait for him to be finished in bath before she goes there
  566. gs 'nichUtil', 'npcActivityAdd', 'snooze', 7 , 15
  567. !! Gala is in bath while Nicholas is in his study
  568. gs 'nichUtil', 'npcActivityAdd', 'bathMorning', 7 , 45
  569. !! note: breakfast time should be the same for all three characters
  570. gs 'nichUtil', 'npcActivityAdd', 'breakfast', 8 , 30
  571. else
  572. gs 'nichUtil', 'npcActivityAdd', 'sleep', 7 , 45
  573. gs 'nichUtil', 'npcActivityAdd', 'snooze', 8 , 15
  574. gs 'nichUtil', 'npcActivityAdd', 'bathMorning', 8 , 45
  575. gs 'nichUtil', 'npcActivityAdd', 'breakfast', 9 , 30
  576. end
  577. !! daily activity
  578. if week = 1 or week = 3:
  579. gs 'nichUtil', 'npcActivityAdd', 'living', 18 , 05
  580. elseif week = 2:
  581. !! Gala goes to spa on Tuesdays
  582. gs 'nichUtil', 'npcActivityAdd', 'living', 9 , 0
  583. gs 'nichUtil', 'npcActivityAdd', 'leaveSpa', 9 , 5
  584. gs 'nichUtil', 'npcActivityAdd', 'spa', 15 , 30
  585. gs 'nichUtil', 'npcActivityAdd', 'returnSpa', 15 , 35
  586. gs 'nichUtil', 'npcActivityAdd', 'living', 18 , 05
  587. elseif week = 4:
  588. !! Gala visits a friend on Thursdays
  589. gs 'nichUtil', 'npcActivityAdd', 'living', 9 , 0
  590. gs 'nichUtil', 'npcActivityAdd', 'leaveFriend', 9 , 5
  591. gs 'nichUtil', 'npcActivityAdd', 'friend', 17 , 30
  592. gs 'nichUtil', 'npcActivityAdd', 'returnFriend', 17 , 35
  593. gs 'nichUtil', 'npcActivityAdd', 'living', 18 , 05
  594. elseif week = 5:
  595. !! TODO: Friday plans
  596. gs 'nichUtil', 'npcActivityAdd', 'living', 18 , 05
  597. elseif week = 6:
  598. !! TODO: Saturday plans
  599. gs 'nichUtil', 'npcActivityAdd', 'living', 18 , 05
  600. else
  601. !! TODO: Sunday plans
  602. gs 'nichUtil', 'npcActivityAdd', 'living', 18 , 0
  603. end
  604. !!evening
  605. if week <= 4:
  606. !! dinner has to be the same time for all three characters
  607. gs 'nichUtil', 'npcActivityAdd', 'dinner', 18 , 30
  608. gs 'nichUtil', 'npcActivityAdd', 'living', 20 , 30
  609. gs 'nichUtil', 'npcActivityAdd', 'bathEvening', 22 , 15
  610. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  611. elseif week = 5 or week = 6:
  612. !! Gala will prepare herself for the club in the bedroom
  613. !! she will accompany Nicholas there, so their times have to be the same
  614. gs 'nichUtil', 'npcActivityAdd', 'prepareClub', 18 , 30
  615. gs 'nichUtil', 'npcActivityAdd', 'leaveClub', 18 , 35
  616. gs 'nichUtil', 'npcActivityAdd', 'club', 23 , 45
  617. gs 'nichUtil', 'npcActivityAdd', 'returnClub', 23 , 50
  618. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  619. else
  620. gs 'nichUtil', 'npcActivityAdd', 'dinner', 18 , 30
  621. !! Nicholas will do her at this time, so she must have the corresponding entry
  622. gs 'nichUtil', 'npcActivityAdd', 'nicholas', 21 , 30
  623. gs 'nichUtil', 'npcActivityAdd', 'bathEvening', 21 , 45
  624. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  625. end
  626. end
  627. elseif $ARGS[1] = 'tanya':
  628. !!Morning routine
  629. if week <= 5:
  630. gs 'nichUtil', 'npcActivityAdd', 'sleep', 7 , 45
  631. !! note: breakfast time should be the same for all three characters
  632. gs 'nichUtil', 'npcActivityAdd', 'breakfast', 8 , 30
  633. gs 'nichUtil', 'npcActivityAdd', 'bathMorning', 9 , 15
  634. elseif week = 6:
  635. !! Tanya will go to a club on Friday evening and return on Saturday morning
  636. gs 'nichUtil', 'npcActivityAdd', 'club', 2 , 30
  637. gs 'nichUtil', 'npcActivityAdd', 'returnClub', 2 , 35
  638. gs 'nichUtil', 'npcActivityAdd', 'sleep', 8 , 45
  639. !! note: breakfast time should be the same for all three characters
  640. gs 'nichUtil', 'npcActivityAdd', 'breakfast', 9 , 30
  641. gs 'nichUtil', 'npcActivityAdd', 'bathMorning', 10 , 15
  642. else
  643. gs 'nichUtil', 'npcActivityAdd', 'sleep', 8 , 45
  644. !! note: breakfast time should be the same for all three characters
  645. gs 'nichUtil', 'npcActivityAdd', 'breakfast', 9 , 30
  646. gs 'nichUtil', 'npcActivityAdd', 'bathMorning', 10 , 15
  647. end
  648. !! TODO: daily activities
  649. !! Tanya will go to university from 10:15-14:00
  650. if nichTanya['Uni'] >= 100 and nichTanya['UniStart'] ! daystart:
  651. if week <= 5:
  652. gs 'nichUtil', 'npcActivityAdd', 'leaveUni', 10 , 20
  653. gs 'nichUtil', 'npcActivityAdd', 'uni', 14 , 0
  654. if week = 2 or week = 5:
  655. gs 'nichUtil', 'npcActivityAdd', 'returnUni', 14 , 5
  656. end
  657. end
  658. else
  659. if week = 1:
  660. gs 'nichUtil', 'npcActivityAdd', 'tanya', 13 , 55
  661. gs 'nichUtil', 'npcActivityAdd', 'leaveBallet', 14 , 0
  662. elseif week = 3:
  663. gs 'nichUtil', 'npcActivityAdd', 'tanya', 12 , 0
  664. gs 'nichUtil', 'npcActivityAdd', 'leaveFriend', 12 , 5
  665. elseif week = 4:
  666. gs 'nichUtil', 'npcActivityAdd', 'tanya', 12 , 0
  667. gs 'nichUtil', 'npcActivityAdd', 'leaveShopping', 12 , 5
  668. end
  669. end
  670. if week = 1:
  671. gs 'nichUtil', 'npcActivityAdd', 'ballet', 16 , 30
  672. gs 'nichUtil', 'npcActivityAdd', 'returnBallet', 16 , 35
  673. elseif week = 3:
  674. gs 'nichUtil', 'npcActivityAdd', 'friend', 17 , 0
  675. gs 'nichUtil', 'npcActivityAdd', 'returnFriend', 17 , 5
  676. elseif week = 4:
  677. gs 'nichUtil', 'npcActivityAdd', 'shopping', 16 , 15
  678. gs 'nichUtil', 'npcActivityAdd', 'returnShopping', 16 , 20
  679. end
  680. gs 'nichUtil', 'npcActivityAdd', 'tanya', 18 , 05
  681. if week <= 4 or week = 7:
  682. gs 'nichUtil', 'npcActivityAdd', 'dinner', 18 , 30
  683. end
  684. !! TODO: evening activities
  685. gs 'nichUtil', 'npcActivityAdd', 'tanya', 20 , 30
  686. if week = 2 or week = 4:
  687. !! Tanya will have sex with Nicholas, her bf or wait for Sveta in her room
  688. !! Needs to have corresponding entries to Nicholas entries.
  689. if nichNTRelation < 10:
  690. gs 'nichUtil', 'npcActivityAdd', 'nicholas', 22 , 0
  691. elseif nichTanya['BF'] > 0:
  692. gs 'nichUtil', 'npcActivityAdd', 'boyfriend', 23 , 0
  693. else
  694. gs 'nichUtil', 'npcActivityAdd', 'tanya', 22 , 0
  695. end
  696. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  697. elseif week = 5:
  698. !! Tanya will go to a club on Friday evenings and stay there til Saturday morning
  699. gs 'nichUtil', 'npcActivityAdd', 'prepareClub', 21 , 30
  700. gs 'nichUtil', 'npcActivityAdd', 'leaveClub', 21 , 35
  701. gs 'nichUtil', 'npcActivityAdd', 'club', 24 , 0
  702. else
  703. gs 'nichUtil', 'npcActivityAdd', 'tanya', 22 , 0
  704. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  705. end
  706. end
  707. $RESULT = $nichNpcActArr[0]
  708. nichNpcActC = 0
  709. :nichNpcActivityLoop
  710. if nichNpcActTime[nichNpcActC] <= hour * 60 + minut:
  711. nichNpcActC += 1
  712. if nichNpcActC < ARRSIZE('nichNpcActTime'): jump 'nichNpcActivityLoop'
  713. end
  714. $RESULT = $nichNpcActArr[nichNpcActC]
  715. killvar '$nichNpcActArr'
  716. killvar 'nichNpcActTime'
  717. killvar '$nichNpcActC'
  718. end
  719. if $ARGS[0] = 'whereIs':
  720. $RESULT = 'unknown'
  721. if $ARGS[1] = 'nicholas':
  722. $nichTemp = func('nichUtil','npcActivity','nicholas')
  723. if $nichTemp = 'sleep' or $nichTemp = 'gala':
  724. $RESULT = 'masterBedroom'
  725. elseif $nichTemp = 'bathMorning' or $nichTemp = 'bathClub' or $nichTemp = 'bathEvening':
  726. $RESULT = 'masterBathroom'
  727. elseif $nichTemp = 'breakfast' or $nichTemp = 'living' or $nichTemp = 'dinner':
  728. $RESULT = 'living'
  729. elseif $nichTemp = 'leaveWork' or $nichTemp = 'returnWork' or $nichTemp = 'leaveShopping' or $nichTemp = 'returnShopping' or $nichTemp = 'leaveClub' or $nichTemp = 'returnClub':
  730. $RESULT = 'hallway'
  731. elseif $nichTemp = 'work':
  732. $RESULT = 'work'
  733. elseif $nichTemp = 'study':
  734. $RESULT = 'study'
  735. elseif $nichTemp = 'tanya':
  736. $RESULT = 'bedroomTanya'
  737. elseif $nichTemp = 'club':
  738. $RESULT = 'club'
  739. elseif $nichTemp = 'shopping':
  740. $RESULT = 'shopping'
  741. end
  742. elseif $ARGS[1] = 'gala':
  743. $nichTemp = func('nichUtil','npcActivity','gala')
  744. if $nichTemp = 'sleep' or $nichTemp = 'snooze' or $nichTemp = 'nicholas' or $nichTemp = 'prepareClub':
  745. $RESULT = 'masterBedroom'
  746. elseif $nichTemp = 'bathMorning' or $nichTemp = 'bathEvening':
  747. $RESULT = 'masterBathroom'
  748. elseif $nichTemp = 'breakfast' or $nichTemp = 'living' or $nichTemp = 'dinner':
  749. $RESULT = 'living'
  750. elseif $nichTemp = 'leaveSpa' or $nichTemp = 'returnSpa' or $nichTemp = 'leaveFriend' or $nichTemp = 'returnFriend' or $nichTemp = 'leaveClub' or $nichTemp = 'returnClub':
  751. $RESULT = 'hallway'
  752. elseif $nichTemp = 'club':
  753. $RESULT = 'club'
  754. elseif $nichTemp = 'friend':
  755. $RESULT = 'friend'
  756. end
  757. elseif $ARGS[1] = 'tanya':
  758. $nichTemp = func('nichUtil','npcActivity','tanya')
  759. if $nichTemp = 'sleep' or $nichTemp = 'nicholas' or $nichTemp = 'tanya' or $nichTemp = 'boyfriend':
  760. $RESULT = 'bedroomTanya'
  761. elseif $nichTemp = 'bathMorning' or $nichTemp = 'bathEvening' or $nichTemp = 'prepareClub':
  762. $RESULT = 'masterBathroom'
  763. elseif $nichTemp = 'breakfast' or $nichTemp = 'living' or $nichTemp = 'dinner':
  764. $RESULT = 'living'
  765. elseif $nichTemp = 'leaveUni' or $nichTemp = 'returnUni' or $nichTemp = 'leaveBallet' or $nichTemp = 'returnBallet' or $nichTemp = 'leaveFriend' or $nichTemp = 'returnFriend' or $nichTemp = 'leaveShopping' or $nichTemp = 'returnShopping' or $nichTemp = 'leaveClub' or $nichTemp = 'returnClub':
  766. $RESULT = 'hallway'
  767. elseif $nichTemp = 'uni':
  768. $RESULT = 'uni'
  769. elseif $nichTemp = 'ballet':
  770. $RESULT = 'ballet'
  771. elseif $nichTemp = 'friend':
  772. $RESULT = 'friend'
  773. elseif $nichTemp = 'shopping':
  774. $RESULT = 'shopping'
  775. elseif $nichTemp = 'club':
  776. $RESULT = 'club'
  777. end
  778. elseif $ARGS[1] = 'cook':
  779. if hour >= 10 and hour < 20:
  780. $RESULT = 'kitchen'
  781. end
  782. end
  783. end
  784. if $ARGS[0] = 'isHome':
  785. $nichTemp = func('nichUtil','whereIs',$ARGS[1])
  786. RESULT = 0
  787. if $nichTemp = 'masterBedroom' or $nichTemp = 'masterBathroom' or $nichTemp = 'bedroomTanya' or $nichTemp = 'bedroomServant' or $nichTemp = 'bathroomServant' or $nichTemp = 'bedroomGuest' or $nichTemp = 'study' or $nichTemp = 'living' or $nichTemp = 'kitchen':
  788. RESULT = 1
  789. end
  790. end
  791. !! Returns 1 if the character $ARGS[1] is in the room $ARGS[2] and no other characters are there
  792. !! Returns 0 if the character is not present and/or other characters are present
  793. if $ARGS[0] = 'isAlone':
  794. $nichTempC1 = $ARGS[1]
  795. if $nichTempC1 = 'nicholas':
  796. $nichTempC2 = 'gala'
  797. $nichTempC3 = 'tanya'
  798. else
  799. $nichTempC2 = 'nicholas'
  800. if $nichTempC1 = 'gala':
  801. $nichTempC3 = 'tanya'
  802. else
  803. $nichTempC3 = 'gala'
  804. end
  805. end
  806. if FUNC('nichUtil','isPresent',$nichTempC1,$ARGS[2]) = 0:
  807. RESULT = 0
  808. else
  809. if FUNC('nichUtil','isPresent',$nichTempC2,$ARGS[2]) = 1 or FUNC('nichUtil','isPresent',$nichTempC3,$ARGS[2]) = 1:
  810. RESULT = 0
  811. else
  812. RESULT = 1
  813. end
  814. end
  815. killvar '$nichTempC1'
  816. killvar '$nichTempC2'
  817. killvar '$nichTempC3'
  818. end
  819. if $ARGS[0] = 'isPresent':
  820. $npcLocation = FUNC('nichUtil','whereIs',$ARGS[1])
  821. if $npcLocation = $ARGS[2]:
  822. RESULT = 1
  823. else
  824. RESULT = 0
  825. end
  826. end
  827. !! Returns 1 if $loc is currently set to a location inside Nicholas apartment
  828. !! USAGE: x = FUNC('nichUtil','isNicholasHome')
  829. if $ARGS[0] = 'isNicholasHome':
  830. if $loc = 'nichBathMaster' or $loc = 'nichBedroomServant':
  831. RESULT = 1
  832. else
  833. RESULT = 0
  834. end
  835. end
  836. !! Called by arousal.qsrc
  837. !! Usage: gs 'nichUtil','onArouse',TYPE
  838. !! Type: $ARGS[0] of arousal
  839. if $ARGS[0] = 'onArouse':
  840. if nichGalaImplant > 0:
  841. nichTempNaughtyLoc = 1
  842. if FUNC('nichUtil','isNicholasHome') = 1:
  843. nichTempNaughtyLoc = 0
  844. elseif nichGalaImplant > 1 and $loc = 'city_saunawhore':
  845. nichTempNaughtyLoc = 0
  846. end
  847. if nichTempNaughtyLoc = 1:
  848. if $ARGS[1] = 'vaginal' or $ARGS[1] = 'vaginal_finger' or $ARGS[1] = 'vaginal_fist' or $ARGS[1] = 'vaginal_dildo' or $ARGS[1] = 'vaginal_strap' or $ARGS[1] = 'vaginal_vibe':
  849. nichGalaImplantCount += 1
  850. end
  851. end
  852. killvar 'nichTempNaughtyLoc'
  853. end
  854. end
  855. !! Sveta gets ARGS[1] (default: 1) free days
  856. !! Usage: gs 'nichUtil','freeDay'
  857. if $ARGS[0] = 'freeDay':
  858. nichTempFree = iif(ARGS[1]>0,ARGS[1],1)
  859. if nichVactionTil < daystart + nichTempFree - 1:
  860. nichVacationFrom = daystart
  861. nichVactionTil = daystart + nichTempFree - 1
  862. nichEvaluationLastReq = nichVactionTil + 1
  863. end
  864. end
  865. if $ARGS[0] = 'disableNPC':
  866. if $ARGS[1] = 'Gala':
  867. nichGalaDisabled = 1
  868. killvar 'nichGalaContractTaras'
  869. killvar 'nichGalaContractTarasCount'
  870. killvar 'nichGalaContractTarasLast'
  871. killvar 'nichGalaContractActive'
  872. killvar 'nichGalaContractLast'
  873. killvar 'nichGalaDoc'
  874. killvar 'nichGalaKnowsPT'
  875. killvar 'nichGalaOpponent'
  876. killvar 'nichGalaOpponentDay'
  877. killvar 'nichGalaImplant'
  878. killvar 'nichGalaTattoo'
  879. killvar 'nichGalaImplantCount'
  880. killvar 'nichGalaContractLast'
  881. killvar 'nichGalaTraining'
  882. killvar 'nichGalaTrainCounter'
  883. killvar 'nichGalaTrainLast'
  884. end
  885. end
  886. --- nichUtil ---------------------------------