nichUtil.qsrc 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011
  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. nichTanyaRelationship = 0
  43. nichTanyaRelationshipState = 0
  44. nichTanyaRelationshipBreakup = 0
  45. nichTanyaFuckCounter = 0
  46. gt 'fit','start'
  47. elseif $ARGS[2] = 'getHired':
  48. nichWork = 0
  49. nichTanyaRelationship = 1
  50. nichTanyaRelationshipState = 10
  51. nichTanyaRelationshipBreakup = 0
  52. nichJobRefused = 0
  53. nichTanyaFuckCounter = 6
  54. hour = 16
  55. gt 'city_center'
  56. elseif $ARGS[2] = 'tanyaDate100':
  57. nichWork = 2
  58. nichTanyaRelationship = 1
  59. nichTanyaRelationshipState = 10
  60. nichTanyaRelationshipBreakup = 0
  61. nichTanyaFuckCounter = 6
  62. nichTanyaDominance = 30
  63. nichTanyaStrapon = 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: nichTanyaRelationship = 0 & nichTanyaRelationshipState = 0 & gt ''nichUtil'', ''debug''">Not together (and never have been)</a>'
  131. '-<a href="exec: nichTanyaRelationship = 0 & nichTanyaRelationshipState = 1000 & gt ''nichUtil'', ''debug''">Not together (you broke up)</a>'
  132. '-<a href="exec: nichTanyaRelationship = 0 & nichTanyaRelationshipState = 1010 & gt ''nichUtil'', ''debug''">Not together (Tanya broke up)</a>'
  133. '-<a href="exec: nichTanyaRelationship = 1 & nichTanyaRelationshipState = 10 & gt ''nichUtil'', ''debug''">Casually dating</a>'
  134. '-<a href="exec: nichTanyaRelationship = 1 & nichTanyaRelationshipState = 20 & gt ''nichUtil'', ''debug''">In a relationship</a>'
  135. 'You fucked Tanya <<nichTanyaFuckCounter>> times'
  136. 'The last time you fucked Tanya was '+(daystart-nichTanyaFuckLast)+' days ago'
  137. 'Tanya has a dominance of <<nichTanyaDominance>> (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 nichTanyaRoom = 1 she will clean it herself
  208. if nichTanyaRoom = 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 nichTanyaUni
  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. home_owned[7] = 0
  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. home_owned[7] = 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. cleaning_exp += 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. cleaning_exp += 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. cleaning_exp += 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. gs 'nichUtil','updatePcHair'
  449. $nichTempFolder = 'images/characters/city/tanya/'
  450. if $ARGS[1] = 'idle':
  451. $RESULT = $nichTempFolder + 'idle/idle'+rand(0,5)+'.jpg'
  452. end
  453. if $ARGS[1] = 'cuddle':
  454. $RESULT = $nichTempFolder + 'sex/cuddle'+rand(0,4)+'.jpg'
  455. end
  456. if $ARGS[1] = 'sexL' or $ARGS[1] = 'sexH':
  457. !! Pictures which work for both lesbian and heterosexual sex
  458. if $ARGS[2] = 'after':
  459. !! pictures of Tanya relaxing after sex
  460. $RESULT = $nichTempFolder + 'sex/relax'+rand(0,5)+'.jpg'
  461. elseif $ARGS[2] = 'pose':
  462. $RESULT = $nichTempFolder + 'sex/pose'+rand(0,1)+'.jpg'
  463. elseif $ARGS[2] = 'undress':
  464. $RESULT = $nichTempFolder + 'sex/undress'+rand(0,3)+'.jpg'
  465. end
  466. end
  467. if $ARGS[1] = 'sexL':
  468. if $ARGS[2] = 'kiss':
  469. $RESULT = $nichTempFolder + 'sexL/kiss/kiss'+rand(0,5)+'.jpg'
  470. elseif $ARGS[2] = 'aeatout':
  471. $RESULT = $nichTempFolder + 'sexL/aeatout/aeatout'+rand(0,3)+'.jpg'
  472. elseif $ARGS[2] = 'peatout':
  473. $RESULT = $nichTempFolder + 'sexL/peatout/peatout'+rand(0,6)+'.jpg'
  474. elseif $ARGS[2] = 'arimjob':
  475. $RESULT = $nichTempFolder + 'sexL/arimjob/arimjob'+rand(0,3)+'.jpg'
  476. elseif $ARGS[2] = 'primjob':
  477. $RESULT = $nichTempFolder + 'sexL/primjob/primjob'+rand(0,2)+'.jpg'
  478. elseif $ARGS[2] = 'astrapon':
  479. $RESULT = $nichTempFolder + 'sexL/astrapon/astrapon'+rand(0,5)+'.jpg'
  480. elseif $ARGS[2] = 'pstrapon':
  481. $RESULT = $nichTempFolder + 'sexL/pstrapon/pstrapon'+rand(0,3)+'.jpg'
  482. elseif $ARGS[2] = 'psovaginal':
  483. $RESULT = $nichTempFolder + 'sexL/pstrapon/pstrapon'+rand(0,3)+'.jpg'
  484. end
  485. elseif $ARGS[1] = 'sexH':
  486. if $ARGS[2] = 'spy':
  487. if $ARGS[3] = '' or $ARGS[3] = 'nicholas':
  488. $RESULT = $nichTempFolder + 'sexNich/nich'+rand(0,5)+'.jpg'
  489. elseif $ARGS[3] = 'bf1':
  490. $RESULT = $nichTempFolder + 'sexBf/bf1/sex'+rand(0,4)+'.jpg'
  491. elseif $ARGS[3] = 'bf2':
  492. $RESULT = $nichTempFolder + 'sexBf/bf2/sex'+rand(0,2)+'.jpg'
  493. end
  494. end
  495. end
  496. killvar '$nichTempFolder'
  497. end
  498. !! sets nichPCHair to:
  499. !! 0 if PC has brown, dark red or black hair (any natural color which is not blonde)
  500. !! 1 if PC is blonde
  501. !! 2 if PC has any other hair color
  502. if $ARGS[0] = 'updatePcHair':
  503. if pcs_haircol = 3:
  504. nichPCHair = 1
  505. elseif pcs_haircol > 3:
  506. nichPCHair = 2
  507. else
  508. nichPCHair = 0
  509. end
  510. end
  511. if $ARGS[0] = 'npcActivityAdd':
  512. $nichNpcActArr[ARRSIZE('$nichNpcActArr')] = $ARGS[1]
  513. nichNpcActTime[ARRSIZE('nichNpcActTime')] = ARGS[2]*60 + ARGS[3]
  514. end
  515. !! The activity the NPC is currently doing at a given time.
  516. !! The times are read as up to but not including.
  517. !! If you add an activity:
  518. !! 1. Add it here and make sure activities stay in chronological order.
  519. !! 2. Add the activity to the function whereis
  520. !! 3. Add the activity to the description of the corresponding character (e.g. nichNicholas)
  521. !! 4. Add the activity to the corresponding location (if its inside the appartment)
  522. if $ARGS[0] = 'npcActivity':
  523. if $ARGS[1] = 'nicholas':
  524. !!Morning routine
  525. if week <= 5:
  526. gs 'nichUtil', 'npcActivityAdd', 'sleep', 6 , 45
  527. gs 'nichUtil', 'npcActivityAdd', 'bathMorning', 7 , 15
  528. gs 'nichUtil', 'npcActivityAdd', 'study', 7 , 45
  529. gs 'nichUtil', 'npcActivityAdd', 'breakfast', 8 , 30
  530. else
  531. gs 'nichUtil', 'npcActivityAdd', 'sleep', 7 , 45
  532. gs 'nichUtil', 'npcActivityAdd', 'bathMorning', 8 , 15
  533. gs 'nichUtil', 'npcActivityAdd', 'study', 8 , 45
  534. gs 'nichUtil', 'npcActivityAdd', 'breakfast', 9 , 30
  535. end
  536. !!day avtivity
  537. if week <= 4:
  538. gs 'nichUtil', 'npcActivityAdd', 'leaveWork', 8 , 35
  539. gs 'nichUtil', 'npcActivityAdd', 'work', 18 , 0
  540. gs 'nichUtil', 'npcActivityAdd', 'returnWork', 18 , 05
  541. elseif week = 5:
  542. gs 'nichUtil', 'npcActivityAdd', 'leaveWork', 8 , 35
  543. gs 'nichUtil', 'npcActivityAdd', 'work', 16 , 0
  544. gs 'nichUtil', 'npcActivityAdd', 'returnWork', 16 , 05
  545. elseif week = 6:
  546. gs 'nichUtil', 'npcActivityAdd', 'leaveShopping', 9 , 35
  547. gs 'nichUtil', 'npcActivityAdd', 'shopping', 16 , 0
  548. gs 'nichUtil', 'npcActivityAdd', 'returnShopping', 16 , 05
  549. else
  550. gs 'nichUtil', 'npcActivityAdd', 'living', 16 , 0
  551. end
  552. !!evening
  553. if nichGentleclubDayE1 = daystart:
  554. !!Nicholas has an important guest in his study and stays there all evening
  555. gs 'nichUtil', 'npcActivityAdd', 'study', 22 , 30
  556. gs 'nichUtil', 'npcActivityAdd', 'bathEvening', 22 , 45
  557. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  558. elseif week <= 4:
  559. gs 'nichUtil', 'npcActivityAdd', 'dinner', 18 , 30
  560. gs 'nichUtil', 'npcActivityAdd', 'study', 20 , 30
  561. if week = 1:
  562. gs 'nichUtil', 'npcActivityAdd', 'study', 22 , 0
  563. elseif week = 2 or week = 4:
  564. if nichNTRelation < 10:
  565. gs 'nichUtil', 'npcActivityAdd', 'tanya', 22 , 0
  566. else
  567. gs 'nichUtil', 'npcActivityAdd', 'study', 22 , 0
  568. end
  569. elseif week = 3:
  570. gs 'nichUtil', 'npcActivityAdd', 'living', 22 , 0
  571. end
  572. gs 'nichUtil', 'npcActivityAdd', 'bathEvening', 22 , 15
  573. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  574. elseif week = 5 or week = 6:
  575. gs 'nichUtil', 'npcActivityAdd', 'study', 18 , 0
  576. gs 'nichUtil', 'npcActivityAdd', 'bathClub', 18 , 30
  577. gs 'nichUtil', 'npcActivityAdd', 'leaveClub', 18 , 35
  578. gs 'nichUtil', 'npcActivityAdd', 'club', 23 , 45
  579. gs 'nichUtil', 'npcActivityAdd', 'returnClub', 23 , 50
  580. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  581. else
  582. gs 'nichUtil', 'npcActivityAdd', 'study', 18 , 0
  583. gs 'nichUtil', 'npcActivityAdd', 'dinner', 18 , 30
  584. gs 'nichUtil', 'npcActivityAdd', 'gala', 21 , 30
  585. gs 'nichUtil', 'npcActivityAdd', 'bathEvening', 21 , 45
  586. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  587. end
  588. elseif $ARGS[1] = 'gala':
  589. if nichGalaDisabled = 1:
  590. gs 'nichUtil', 'npcActivityAdd', 'vanished', 24 , 0
  591. else
  592. !!Morning routine
  593. if week <= 5:
  594. gs 'nichUtil', 'npcActivityAdd', 'sleep', 6 , 45
  595. !! 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
  596. gs 'nichUtil', 'npcActivityAdd', 'snooze', 7 , 15
  597. !! Gala is in bath while Nicholas is in his study
  598. gs 'nichUtil', 'npcActivityAdd', 'bathMorning', 7 , 45
  599. !! note: breakfast time should be the same for all three characters
  600. gs 'nichUtil', 'npcActivityAdd', 'breakfast', 8 , 30
  601. else
  602. gs 'nichUtil', 'npcActivityAdd', 'sleep', 7 , 45
  603. gs 'nichUtil', 'npcActivityAdd', 'snooze', 8 , 15
  604. gs 'nichUtil', 'npcActivityAdd', 'bathMorning', 8 , 45
  605. gs 'nichUtil', 'npcActivityAdd', 'breakfast', 9 , 30
  606. end
  607. !! daily activity
  608. if week = 1 or week = 3:
  609. gs 'nichUtil', 'npcActivityAdd', 'living', 18 , 05
  610. elseif week = 2:
  611. !! Gala goes to spa on Tuesdays
  612. gs 'nichUtil', 'npcActivityAdd', 'living', 9 , 0
  613. gs 'nichUtil', 'npcActivityAdd', 'leaveSpa', 9 , 5
  614. gs 'nichUtil', 'npcActivityAdd', 'spa', 15 , 30
  615. gs 'nichUtil', 'npcActivityAdd', 'returnSpa', 15 , 35
  616. gs 'nichUtil', 'npcActivityAdd', 'living', 18 , 05
  617. elseif week = 4:
  618. !! Gala visits a friend on Thursdays
  619. gs 'nichUtil', 'npcActivityAdd', 'living', 9 , 0
  620. gs 'nichUtil', 'npcActivityAdd', 'leaveFriend', 9 , 5
  621. gs 'nichUtil', 'npcActivityAdd', 'friend', 17 , 30
  622. gs 'nichUtil', 'npcActivityAdd', 'returnFriend', 17 , 35
  623. gs 'nichUtil', 'npcActivityAdd', 'living', 18 , 05
  624. elseif week = 5:
  625. !! TODO: Friday plans
  626. gs 'nichUtil', 'npcActivityAdd', 'living', 18 , 05
  627. elseif week = 6:
  628. !! TODO: Saturday plans
  629. gs 'nichUtil', 'npcActivityAdd', 'living', 18 , 05
  630. else
  631. !! TODO: Sunday plans
  632. gs 'nichUtil', 'npcActivityAdd', 'living', 18 , 0
  633. end
  634. !!evening
  635. if week <= 4:
  636. !! dinner has to be the same time for all three characters
  637. gs 'nichUtil', 'npcActivityAdd', 'dinner', 18 , 30
  638. gs 'nichUtil', 'npcActivityAdd', 'living', 20 , 30
  639. gs 'nichUtil', 'npcActivityAdd', 'bathEvening', 22 , 15
  640. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  641. elseif week = 5 or week = 6:
  642. !! Gala will prepare herself for the club in the bedroom
  643. !! she will accompany Nicholas there, so their times have to be the same
  644. gs 'nichUtil', 'npcActivityAdd', 'prepareClub', 18 , 30
  645. gs 'nichUtil', 'npcActivityAdd', 'leaveClub', 18 , 35
  646. gs 'nichUtil', 'npcActivityAdd', 'club', 23 , 45
  647. gs 'nichUtil', 'npcActivityAdd', 'returnClub', 23 , 50
  648. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  649. else
  650. gs 'nichUtil', 'npcActivityAdd', 'dinner', 18 , 30
  651. !! Nicholas will do her at this time, so she must have the corresponding entry
  652. gs 'nichUtil', 'npcActivityAdd', 'nicholas', 21 , 30
  653. gs 'nichUtil', 'npcActivityAdd', 'bathEvening', 21 , 45
  654. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  655. end
  656. end
  657. elseif $ARGS[1] = 'tanya':
  658. !!Morning routine
  659. if week <= 5:
  660. gs 'nichUtil', 'npcActivityAdd', 'sleep', 7 , 45
  661. !! note: breakfast time should be the same for all three characters
  662. gs 'nichUtil', 'npcActivityAdd', 'breakfast', 8 , 30
  663. gs 'nichUtil', 'npcActivityAdd', 'bathMorning', 9 , 15
  664. elseif week = 6:
  665. !! Tanya will go to a club on Friday evening and return on Saturday morning
  666. gs 'nichUtil', 'npcActivityAdd', 'club', 2 , 30
  667. gs 'nichUtil', 'npcActivityAdd', 'returnClub', 2 , 35
  668. gs 'nichUtil', 'npcActivityAdd', 'sleep', 8 , 45
  669. !! note: breakfast time should be the same for all three characters
  670. gs 'nichUtil', 'npcActivityAdd', 'breakfast', 9 , 30
  671. gs 'nichUtil', 'npcActivityAdd', 'bathMorning', 10 , 15
  672. else
  673. gs 'nichUtil', 'npcActivityAdd', 'sleep', 8 , 45
  674. !! note: breakfast time should be the same for all three characters
  675. gs 'nichUtil', 'npcActivityAdd', 'breakfast', 9 , 30
  676. gs 'nichUtil', 'npcActivityAdd', 'bathMorning', 10 , 15
  677. end
  678. !! TODO: daily activities
  679. !! Tanya will go to university from 10:15-14:00
  680. if nichTanyaUni >= 100 and nichTanyaUniStart ! daystart:
  681. if week <= 5:
  682. gs 'nichUtil', 'npcActivityAdd', 'leaveUni', 10 , 20
  683. gs 'nichUtil', 'npcActivityAdd', 'uni', 14 , 0
  684. if week = 2 or week = 5:
  685. gs 'nichUtil', 'npcActivityAdd', 'returnUni', 14 , 5
  686. end
  687. end
  688. else
  689. if week = 1:
  690. gs 'nichUtil', 'npcActivityAdd', 'tanya', 13 , 55
  691. gs 'nichUtil', 'npcActivityAdd', 'leaveBallet', 14 , 0
  692. elseif week = 3:
  693. gs 'nichUtil', 'npcActivityAdd', 'tanya', 12 , 0
  694. gs 'nichUtil', 'npcActivityAdd', 'leaveFriend', 12 , 5
  695. elseif week = 4:
  696. gs 'nichUtil', 'npcActivityAdd', 'tanya', 12 , 0
  697. gs 'nichUtil', 'npcActivityAdd', 'leaveShopping', 12 , 5
  698. end
  699. end
  700. if week = 1:
  701. gs 'nichUtil', 'npcActivityAdd', 'ballet', 16 , 30
  702. gs 'nichUtil', 'npcActivityAdd', 'returnBallet', 16 , 35
  703. elseif week = 3:
  704. gs 'nichUtil', 'npcActivityAdd', 'friend', 17 , 0
  705. gs 'nichUtil', 'npcActivityAdd', 'returnFriend', 17 , 5
  706. elseif week = 4:
  707. gs 'nichUtil', 'npcActivityAdd', 'shopping', 16 , 15
  708. gs 'nichUtil', 'npcActivityAdd', 'returnShopping', 16 , 20
  709. end
  710. gs 'nichUtil', 'npcActivityAdd', 'tanya', 18 , 05
  711. if week <= 4 or week = 7:
  712. gs 'nichUtil', 'npcActivityAdd', 'dinner', 18 , 30
  713. end
  714. !! TODO: evening activities
  715. gs 'nichUtil', 'npcActivityAdd', 'tanya', 20 , 30
  716. if week = 2 or week = 4:
  717. !! Tanya will have sex with Nicholas, her bf or wait for Sveta in her room
  718. !! Needs to have corresponding entries to Nicholas entries.
  719. if nichNTRelation < 10:
  720. gs 'nichUtil', 'npcActivityAdd', 'nicholas', 22 , 0
  721. elseif nichTanyaBF > 0:
  722. gs 'nichUtil', 'npcActivityAdd', 'boyfriend', 23 , 0
  723. else
  724. gs 'nichUtil', 'npcActivityAdd', 'tanya', 22 , 0
  725. end
  726. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  727. elseif week = 5:
  728. !! Tanya will go to a club on Friday evenings and stay there til Saturday morning
  729. gs 'nichUtil', 'npcActivityAdd', 'prepareClub', 21 , 30
  730. gs 'nichUtil', 'npcActivityAdd', 'leaveClub', 21 , 35
  731. gs 'nichUtil', 'npcActivityAdd', 'club', 24 , 0
  732. else
  733. gs 'nichUtil', 'npcActivityAdd', 'tanya', 22 , 0
  734. gs 'nichUtil', 'npcActivityAdd', 'sleep', 24 , 0
  735. end
  736. end
  737. $RESULT = $nichNpcActArr[0]
  738. nichNpcActC = 0
  739. :nichNpcActivityLoop
  740. if nichNpcActTime[nichNpcActC] <= hour * 60 + minut:
  741. nichNpcActC += 1
  742. if nichNpcActC < ARRSIZE('nichNpcActTime'): jump 'nichNpcActivityLoop'
  743. end
  744. $RESULT = $nichNpcActArr[nichNpcActC]
  745. killvar '$nichNpcActArr'
  746. killvar 'nichNpcActTime'
  747. killvar '$nichNpcActC'
  748. end
  749. if $ARGS[0] = 'whereIs':
  750. $RESULT = 'unknown'
  751. if $ARGS[1] = 'nicholas':
  752. $nichTemp = func('nichUtil','npcActivity','nicholas')
  753. if $nichTemp = 'sleep' or $nichTemp = 'gala':
  754. $RESULT = 'masterBedroom'
  755. elseif $nichTemp = 'bathMorning' or $nichTemp = 'bathClub' or $nichTemp = 'bathEvening':
  756. $RESULT = 'masterBathroom'
  757. elseif $nichTemp = 'breakfast' or $nichTemp = 'living' or $nichTemp = 'dinner':
  758. $RESULT = 'living'
  759. elseif $nichTemp = 'leaveWork' or $nichTemp = 'returnWork' or $nichTemp = 'leaveShopping' or $nichTemp = 'returnShopping' or $nichTemp = 'leaveClub' or $nichTemp = 'returnClub':
  760. $RESULT = 'hallway'
  761. elseif $nichTemp = 'work':
  762. $RESULT = 'work'
  763. elseif $nichTemp = 'study':
  764. $RESULT = 'study'
  765. elseif $nichTemp = 'tanya':
  766. $RESULT = 'bedroomTanya'
  767. elseif $nichTemp = 'club':
  768. $RESULT = 'club'
  769. elseif $nichTemp = 'shopping':
  770. $RESULT = 'shopping'
  771. end
  772. elseif $ARGS[1] = 'gala':
  773. $nichTemp = func('nichUtil','npcActivity','gala')
  774. if $nichTemp = 'sleep' or $nichTemp = 'snooze' or $nichTemp = 'nicholas' or $nichTemp = 'prepareClub':
  775. $RESULT = 'masterBedroom'
  776. elseif $nichTemp = 'bathMorning' or $nichTemp = 'bathEvening':
  777. $RESULT = 'masterBathroom'
  778. elseif $nichTemp = 'breakfast' or $nichTemp = 'living' or $nichTemp = 'dinner':
  779. $RESULT = 'living'
  780. elseif $nichTemp = 'leaveSpa' or $nichTemp = 'returnSpa' or $nichTemp = 'leaveFriend' or $nichTemp = 'returnFriend' or $nichTemp = 'leaveClub' or $nichTemp = 'returnClub':
  781. $RESULT = 'hallway'
  782. elseif $nichTemp = 'club':
  783. $RESULT = 'club'
  784. elseif $nichTemp = 'friend':
  785. $RESULT = 'friend'
  786. end
  787. elseif $ARGS[1] = 'tanya':
  788. $nichTemp = func('nichUtil','npcActivity','tanya')
  789. if $nichTemp = 'sleep' or $nichTemp = 'nicholas' or $nichTemp = 'tanya' or $nichTemp = 'boyfriend':
  790. $RESULT = 'bedroomTanya'
  791. elseif $nichTemp = 'bathMorning' or $nichTemp = 'bathEvening' or $nichTemp = 'prepareClub':
  792. $RESULT = 'masterBathroom'
  793. elseif $nichTemp = 'breakfast' or $nichTemp = 'living' or $nichTemp = 'dinner':
  794. $RESULT = 'living'
  795. 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':
  796. $RESULT = 'hallway'
  797. elseif $nichTemp = 'uni':
  798. $RESULT = 'uni'
  799. elseif $nichTemp = 'ballet':
  800. $RESULT = 'ballet'
  801. elseif $nichTemp = 'friend':
  802. $RESULT = 'friend'
  803. elseif $nichTemp = 'shopping':
  804. $RESULT = 'shopping'
  805. elseif $nichTemp = 'club':
  806. $RESULT = 'club'
  807. end
  808. elseif $ARGS[1] = 'cook':
  809. if hour >= 10 and hour < 20:
  810. $RESULT = 'kitchen'
  811. end
  812. end
  813. end
  814. if $ARGS[0] = 'isHome':
  815. $nichTemp = func('nichUtil','whereIs',$ARGS[1])
  816. RESULT = 0
  817. 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':
  818. RESULT = 1
  819. end
  820. end
  821. !! Returns 1 if the character $ARGS[1] is in the room $ARGS[2] and no other characters are there
  822. !! Returns 0 if the character is not present and/or other characters are present
  823. if $ARGS[0] = 'isAlone':
  824. $nichTempC1 = $ARGS[1]
  825. if $nichTempC1 = 'nicholas':
  826. $nichTempC2 = 'gala'
  827. $nichTempC3 = 'tanya'
  828. else
  829. $nichTempC2 = 'nicholas'
  830. if $nichTempC1 = 'gala':
  831. $nichTempC3 = 'tanya'
  832. else
  833. $nichTempC3 = 'gala'
  834. end
  835. end
  836. if FUNC('nichUtil','isPresent',$nichTempC1,$ARGS[2]) = 0:
  837. RESULT = 0
  838. else
  839. if FUNC('nichUtil','isPresent',$nichTempC2,$ARGS[2]) = 1 or FUNC('nichUtil','isPresent',$nichTempC3,$ARGS[2]) = 1:
  840. RESULT = 0
  841. else
  842. RESULT = 1
  843. end
  844. end
  845. killvar '$nichTempC1'
  846. killvar '$nichTempC2'
  847. killvar '$nichTempC3'
  848. end
  849. if $ARGS[0] = 'isPresent':
  850. $npcLocation = FUNC('nichUtil','whereIs',$ARGS[1])
  851. if $npcLocation = $ARGS[2]:
  852. RESULT = 1
  853. else
  854. RESULT = 0
  855. end
  856. end
  857. !! Returns 1 if $loc is currently set to a location inside Nicholas apartment
  858. !! USAGE: x = FUNC('nichUtil','isNicholasHome')
  859. if $ARGS[0] = 'isNicholasHome':
  860. if $loc = 'nichBathMaster' or $loc = 'nichBedroomServant':
  861. RESULT = 1
  862. else
  863. RESULT = 0
  864. end
  865. end
  866. !! Called by arousal.qsrc
  867. !! Usage: gs 'nichUtil','onArouse',TYPE
  868. !! Type: $ARGS[0] of arousal
  869. if $ARGS[0] = 'onArouse':
  870. if nichGalaImplant > 0:
  871. nichTempNaughtyLoc = 1
  872. if FUNC('nichUtil','isNicholasHome') = 1:
  873. nichTempNaughtyLoc = 0
  874. elseif nichGalaImplant > 1 and $loc = 'city_saunawhore':
  875. nichTempNaughtyLoc = 0
  876. end
  877. if nichTempNaughtyLoc = 1:
  878. 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':
  879. nichGalaImplantCount += 1
  880. end
  881. end
  882. killvar 'nichTempNaughtyLoc'
  883. end
  884. end
  885. !! Sveta gets ARGS[1] (default: 1) free days
  886. !! Usage: gs 'nichUtil','freeDay'
  887. if $ARGS[0] = 'freeDay':
  888. nichTempFree = iif(ARGS[1]>0,ARGS[1],1)
  889. if nichVactionTil < daystart + nichTempFree - 1:
  890. nichVacationFrom = daystart
  891. nichVactionTil = daystart + nichTempFree - 1
  892. nichEvaluationLastReq = nichVactionTil + 1
  893. end
  894. end
  895. if $ARGS[0] = 'disableNPC':
  896. if $ARGS[1] = 'Gala':
  897. nichGalaDisabled = 1
  898. killvar 'nichGalaContractTaras'
  899. killvar 'nichGalaContractTarasCount'
  900. killvar 'nichGalaContractTarasLast'
  901. killvar 'nichGalaContractActive'
  902. killvar 'nichGalaContractLast'
  903. killvar 'nichGalaDoc'
  904. killvar 'nichGalaKnowsPT'
  905. killvar 'nichGalaOpponent'
  906. killvar 'nichGalaOpponentDay'
  907. killvar 'nichGalaImplant'
  908. killvar 'nichGalaTattoo'
  909. killvar 'nichGalaImplantCount'
  910. killvar 'nichGalaContractLast'
  911. killvar 'nichGalaTraining'
  912. killvar 'nichGalaTrainCounter'
  913. killvar 'nichGalaTrainLast'
  914. end
  915. end
  916. --- nichUtil ---------------------------------