outdoors.qsrc 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. # outdoors
  2. weatherGrM[1] = -10
  3. weatherGrM[2] = -5
  4. weatherGrM[3] = 0
  5. weatherGrM[4] = 10
  6. weatherGrM[5] = 10
  7. weatherGrM[6] = 15
  8. weatherGrM[7] = 25
  9. weatherGrM[8] = 20
  10. weatherGrM[9] = 15
  11. weatherGrM[10]= 10
  12. weatherGrM[11]= 0
  13. weatherGrM[12]= -5
  14. weatherGrDelta = 5
  15. weatherFallM[1] = 50
  16. weatherFallM[2] = 40
  17. weatherFallM[3] = 30
  18. weatherFallM[4] = 20
  19. weatherFallM[5] = 20
  20. weatherFallM[6] = 10
  21. weatherFallM[7] = 10
  22. weatherFallM[8] = 10
  23. weatherFallM[9] = 20
  24. weatherFallM[10]= 20
  25. weatherFallM[11]= 30
  26. weatherFallM[12]= 40
  27. weatherFallDelta = 10
  28. DayLengthMin = 177 &! Minutes from dawn to noon
  29. DayLengthMax = 563
  30. if $ARGS[0] = 'weather':
  31. if weatherDay ! DayInYear:
  32. weatherTemper = rand(weatherGrM[month]-weatherGrDelta, weatherGrM[month]+weatherGrDelta)
  33. weatherFall = rand(weatherFallM[month]-weatherFallDelta, weatherFallM[month]+weatherFallDelta)
  34. end
  35. if (weatherHour ! hour) or (weatherDay ! daystart):
  36. weatherDay = DayInYear
  37. weatherHour = hour
  38. temper = hour
  39. if temper <= 2:
  40. temper = temper + (6 - (temper * 2))
  41. elseif temper >= 3 and temper <= 15:
  42. temper = temper
  43. elseif temper >= 16:
  44. temper = (temper - 30) * -1
  45. end
  46. temper = weatherTemper + (weatherGrDelta*100/6*temper)/100
  47. if chWeather = 0:
  48. sunWeather = IIF( rand(0,100)<weatherFall, 0, 1)
  49. else
  50. killvar 'chWeather'
  51. end
  52. if temper < -5 :
  53. if weatherFall < 30 :
  54. if sunWeather = 1 :
  55. $osadki = 'Clear and cloudless.'
  56. else
  57. $osadki = 'Clear sky, but light snow falls.'
  58. end
  59. elseif weatherFall < 60 :
  60. if sunWeather = 1 :
  61. $osadki = 'Partly cloudy and light breeze.'
  62. else
  63. $osadki = 'Clouds and it is snowing.'
  64. end
  65. else
  66. if sunWeather = 1 :
  67. $osadki = 'Clouds all over the sky and a sharp cold wind.'
  68. else
  69. $osadki = 'Strong snow with wind.'
  70. end
  71. end
  72. elseif temper < 5 :
  73. if weatherFall < 30 :
  74. if sunWeather = 1 :
  75. $osadki = 'Clear and cloudless.'
  76. else
  77. $osadki = 'Slightly wet snow.'
  78. end
  79. elseif weatherFall < 60 :
  80. if sunWeather = 1 :
  81. $osadki = 'Partly cloudy and light breeze.'
  82. else
  83. $osadki = 'Clouds and wet snow.'
  84. end
  85. else
  86. if sunWeather = 1 :
  87. $osadki = 'Clouds all over the sky and a sharp wind.'
  88. else
  89. $osadki = 'Heavy snow, sticking wet snow.'
  90. end
  91. end
  92. else
  93. if weatherFall < 30 :
  94. if sunWeather = 1 :
  95. $osadki = 'Clear and cloudless.'
  96. else
  97. $osadki = 'Light mushroom rain.'
  98. end
  99. elseif weatherFall < 60 :
  100. if sunWeather = 1 :
  101. $osadki = 'Partly cloudy skies.'
  102. else
  103. $osadki = 'It is raining.'
  104. end
  105. else
  106. if sunWeather = 1 :
  107. $osadki = 'Clouds all over the sky and a sharp wind.'
  108. else
  109. $osadki = 'Heavy rain and wind.'
  110. end
  111. end
  112. end
  113. gs 'outdoors', 'temp_set'
  114. if month = 1:
  115. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>There is snow on the street.'
  116. elseif month = 2:
  117. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>There is snow on the street.'
  118. elseif month = 3:
  119. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>There is snow on the street.'
  120. elseif month = 4:
  121. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>The snow melts on the street.'
  122. elseif month = 5:
  123. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>Puddles in the street left by snow, winter has covered everything in dirt and debris, some places where new grass grows are pleasantly green.'
  124. elseif month = 6:
  125. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>Green grass lines the streets.'
  126. elseif month = 7:
  127. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>Green grass lines the streets.'
  128. elseif month = 8:
  129. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>The grass is green, the leaves in the trees are already turning yellow.'
  130. elseif month = 9:
  131. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>Streets lined with green grass, visible yellow leaves.'
  132. elseif month = 10:
  133. $weather = '<<$osadki>> Temperature is <<$temperature>>.<br>The grass is fading and patchy, yellow and brown leaves fall from the trees, mud and puddles dot the street.'
  134. elseif month = 11:
  135. $weather = '<<$osadki>> Temperature is <<$temperature>>.<br>The street is dirty with a thin snow cover.'
  136. elseif month = 12:
  137. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>The street is covered in snow.'
  138. end
  139. end
  140. end
  141. if $ARGS[0] = 'temp_set':
  142. if temper < 0:
  143. $temperature = '<font color=blue>'
  144. elseif temper < 10:
  145. $temperature = '<font color=green>'
  146. elseif temper < 20:
  147. $temperature = '<font color=orange>'
  148. else
  149. $temperature = '<font color=red>'
  150. end
  151. if TempUnit=0:$temperature +='<<temper>>°C</font>' else $temperature +='<<temper*9/5+32>>°F</font>'
  152. end
  153. if $ARGS[0] = 'main':
  154. DayInYear = func('shortgs', 'doy', year, month, day)
  155. !! distance from summer solstice (longest day of the year)
  156. if DayInYear < 172:
  157. DayInYear2 = 172 - DayInYear
  158. elseif DayinYear < 355:
  159. DayInYear2 = DayInYear - 172
  160. else
  161. DayInYear2 = 536 - DayInYear
  162. end
  163. DayLength = DayLengthMax - ((DayLengthMax - DayLengthMin) * 100 / 182) * DayInYear2 / 100
  164. ! half of daylight duration
  165. ! used as an offset for solar noon
  166. ! to get time when day starts and ends
  167. ! solar noon coincides with CurTimeSun of 0 which happens at 13:00
  168. !! Solar Noon (13:00) minus DayLength - time when day starts
  169. !! Solar Noon (13:00) plus DayLength - time when day ends
  170. CurTimeSun = hour * 60 + minut
  171. !! distance from 13:00 (Solar Noon) in minutes
  172. ! at midnight its -780
  173. ! 0 is 13:00
  174. ! 1 minute before midnight (23:59) is 659
  175. if CurTimeSun >= 780:
  176. CurTimeSun = CurTimeSun - 780
  177. else
  178. CurTimeSun = -(780 - CurTimeSun)
  179. end
  180. DayStage = 5
  181. BColorBase = 0
  182. ! 1 - dawn
  183. ! 2 - midday
  184. ! 3 - sunset
  185. ! 4 - the beginning of the night
  186. ! 5 - night
  187. ! 6 - the end of the night
  188. !! phases 1, 3, 4 and 6 last for 60 minutes
  189. if CurTimeSun >= -(DayLength - 60) and CurTimeSun <= (DayLength - 60):
  190. DayStage = 2
  191. BColorBase = 255
  192. elseif CurTimeSun >= -DayLength and CurTimeSun <= -(DayLength - 60):
  193. ! CurTimeSun - negative
  194. DayStage = 1
  195. ! result = 128 + [0-60] * 2
  196. BColorBase = 128 + (DayLength + CurTimeSun) * 2
  197. elseif CurTimeSun >= (DayLength - 60) and CurTimeSun <= DayLength:
  198. ! CurTimeSun - positive
  199. DayStage = 3
  200. ! result = 128 + [0-60] * 2
  201. BColorBase = 256 + ((DayLength - 60) - CurTimeSun) * 2
  202. elseif CurTimeSun >= DayLength and CurTimeSun <= DayLength + 60:
  203. ! CurTimeSun - positive
  204. DayStage = 4
  205. ! result = 128 - [0-60] * 2
  206. BColorBase = 128 - (CurTimeSun - DayLength) * 2
  207. elseif CurTimeSun >= -(DayLength + 60) and CurTimeSun <= -DayLength:
  208. ! CurTimeSun - negative
  209. DayStage = 6
  210. ! result = 128 - [0-60] * 2
  211. BColorBase = 128 + (CurTimeSun + DayLength) * 2
  212. end
  213. ! *pl ' DayInYear=<<DayInYear>> DayLength=<<DayLength>> CurTimeSun=<<CurTimeSun>> DayStage=<<DayStage>>'
  214. $weatherImage = '<img height = <<set_weatherht>> src="images/system/weather/wthr'
  215. $weatherImage = $weatherImage + '<<DayStage>>'
  216. if temper < -10 :
  217. $weatherImage += '1'
  218. elseif temper <= 5 :
  219. $weatherImage += '2'
  220. elseif temper <= 19 :
  221. $weatherImage += '3'
  222. else
  223. $weatherImage += '4'
  224. end
  225. if weatherFall < 30 :
  226. $weatherImage += '1'
  227. elseif weatherFall < 60 :
  228. $weatherImage += '2'
  229. else
  230. $weatherImage += '3'
  231. end
  232. if sunWeather = 1 :
  233. $weatherImage += '1'
  234. else
  235. $weatherImage += '2'
  236. end
  237. $weatherImage += '.jpg">'
  238. ! clr
  239. ! pl $weatherImage
  240. ! pl
  241. ! pl $weather
  242. ! pl $osadki
  243. gs 'themes', 'outdoors'
  244. if $location_type = 'public_outdoors' or $location_type = 'secluded' or $location_type = 'event_outdoors':
  245. if sunWeather = 0 and mc_inventory['umbrella'] = 0:
  246. *NL 'It is raining and you do not have an umbrella.'
  247. if pcs_makeup > 1 and cosmetic_tattoo = 0:
  248. pcs_makeup = 0
  249. *p ' The rain has ruined your makeup.'
  250. end
  251. if pcs_hairbsh = 1:
  252. pcs_hairbsh = 0
  253. if curly > 0:curly -= 1
  254. *p ' Your hair is soaked.'
  255. end
  256. *nl
  257. end
  258. if temper <= 0:
  259. !! fix for time cheat
  260. if Time15Minute > totminut: Time15Minute = totminut
  261. if (totminut - Time15Minute) >= 15:
  262. !reset Time15Minute
  263. if frost = 0:Time15Minute = totminut
  264. ! begin Loop
  265. :Time15MinuteLoop
  266. if $coatworntype = 'none':
  267. bonusZ = 0
  268. else
  269. bonusZ = PCoatQuality - 2
  270. end
  271. if $coatworntype = 'none':
  272. if temper < 0:frost += 1
  273. if temper < -20:frost += 2
  274. if temper < -30:frost += 5
  275. if pcs_energy < 20:frost += 1
  276. if pcs_hydra < 20:frost += 1
  277. if $pantyworntype = 'none':frost += 1
  278. if pcs_sweat > 20:frost += 1
  279. elseif temper < -10 and PCoatWarm = 1:
  280. if temper < -30:
  281. frost += 2
  282. else
  283. frost += 1
  284. end
  285. if pcs_energy < 20:frost += 1
  286. if pcs_hydra < 20:frost += 1
  287. if $pantyworntype = 'none':frost += 1
  288. if pcs_sweat > 20:frost += 1
  289. elseif temper < -20 and PCoatWarm = 2:
  290. frost += 1
  291. if pcs_energy < 20:frost += 1
  292. if pcs_hydra < 20:frost += 1
  293. if pcs_sweat > 20:frost += 1
  294. elseif temper < -30 and PCoatWarm = 3:
  295. frost += 1
  296. end
  297. if frost >= 12:sickstage = 1
  298. Time15Minute += 15
  299. if (totminut - Time15Minute) >= 15:jump 'Time15MinuteLoop'
  300. end
  301. end
  302. !!15 minute check to stop refreshes causing early gameover and cheating at exhibitionism
  303. if outdoors_checks + 15 < totminut:
  304. outdoors_checks = totminut
  305. if isprok = 0 and isprokp = 0 and mesec > 0 and preg = 0 and $loc ! 'gad_gpyard' and (isprok_lastday = 0 or (hour > 4 and isprok_lastday = 1)):
  306. '<b><font color="red">You have blood flowing down your legs and staining your clothes.</font></b>'
  307. if $pantyworntype ! 'none':gs 'panties', 'dispose' & '<b><font color="red">Your panties have been ruined and you discreetly remove and dispose of them.</font></b>'
  308. gs 'sweat', 'add', 10
  309. if pcs_mood > 20: pcs_mood -= 20
  310. dynamic '<<$clothingworntype>>_h[<<clothingwornnumber>>] -= 1'
  311. end
  312. !!Exhibitionism
  313. if PCloInhibit >= pcs_inhib - 10 and $loc ! 'gad_gpyard':
  314. exhibition_outdoors += 1
  315. if pcs_inhib < 45 and PCloPanties = 1: exhibition_outdoors += 1
  316. end
  317. if $pantyworntype = 'none' and $loc ! 'gad_gpyard':
  318. if PCloSkirt = 3:
  319. exhibition_outdoors += 1
  320. elseif PCloSkirt = 4:
  321. exhibition_outdoors += 2
  322. elseif PCloSkirt = 5:
  323. exhibition_outdoors += 3
  324. elseif PCloSkirt = 6:
  325. exhibition_outdoors += 4
  326. end
  327. end
  328. end
  329. else
  330. gs 'themes', 'indoors'
  331. end
  332. end
  333. --- outdoors ---------------------------------