outdoors 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. # outdoors
  2. weatherGrM[1] = -15
  3. weatherGrM[2] = -10
  4. weatherGrM[3] = -5
  5. weatherGrM[4] = 10
  6. weatherGrM[5] = 15
  7. weatherGrM[6] = 20
  8. weatherGrM[7] = 25
  9. weatherGrM[8] = 25
  10. weatherGrM[9] = 20
  11. weatherGrM[10]= 10
  12. weatherGrM[11]= -5
  13. weatherGrM[12]= -10
  14. weatherGrDelta = 5
  15. weatherFallM[1] = 60
  16. weatherFallM[2] = 20
  17. weatherFallM[3] = 20
  18. weatherFallM[4] = 30
  19. weatherFallM[5] = 30
  20. weatherFallM[6] = 20
  21. weatherFallM[7] = 15
  22. weatherFallM[8] = 15
  23. weatherFallM[9] = 30
  24. weatherFallM[10]= 50
  25. weatherFallM[11]= 60
  26. weatherFallM[12]= 30
  27. weatherFallDelta = 20
  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 : temper = 24 + temper
  40. temper -= 14
  41. if temper > 0 : temper = -temper
  42. temper += 6
  43. temper = weatherTemper + (weatherGrDelta*100/6*temper)/100
  44. if chWeather = 0:
  45. sunWeather = IIF( rand(0,100)<weatherFall, 0, 1)
  46. else
  47. killvar 'chWeather'
  48. end
  49. if temper < -5 :
  50. if weatherFall < 30 :
  51. if sunWeather = 1 :
  52. $osadki = 'Clear and cloudless.'
  53. else
  54. $osadki = 'Clear sky, but light snow falls.'
  55. end
  56. elseif weatherFall < 60 :
  57. if sunWeather = 1 :
  58. $osadki = 'Partly cloudy and light breeze.'
  59. else
  60. $osadki = 'Clouds and it is snowing.'
  61. end
  62. else
  63. if sunWeather = 1 :
  64. $osadki = 'Clouds all over the sky and a sharp cold wind.'
  65. else
  66. $osadki = 'Strong snow with wind.'
  67. end
  68. end
  69. elseif temper < 5 :
  70. if weatherFall < 30 :
  71. if sunWeather = 1 :
  72. $osadki = 'Clear and cloudless.'
  73. else
  74. $osadki = 'Slightly wet snow.'
  75. end
  76. elseif weatherFall < 60 :
  77. if sunWeather = 1 :
  78. $osadki = 'Partly cloudy and light breeze.'
  79. else
  80. $osadki = 'Clouds and wet snow.'
  81. end
  82. else
  83. if sunWeather = 1 :
  84. $osadki = 'Clouds all over the sky and a sharp wind.'
  85. else
  86. $osadki = 'Heavy snow, sticking wet snow.'
  87. end
  88. end
  89. else
  90. if weatherFall < 30 :
  91. if sunWeather = 1 :
  92. $osadki = 'Clear and cloudless.'
  93. else
  94. $osadki = 'Light mushroom rain.'
  95. end
  96. elseif weatherFall < 60 :
  97. if sunWeather = 1 :
  98. $osadki = 'Partly cloudy skies.'
  99. else
  100. $osadki = 'It is raining.'
  101. end
  102. else
  103. if sunWeather = 1 :
  104. $osadki = 'Clouds all over the sky and a sharp wind.'
  105. else
  106. $osadki = 'Heavy rain and wind.'
  107. end
  108. end
  109. end
  110. gs 'outdoors', 'temp_set'
  111. jump 'WTHR_<<month>>'
  112. :WTHR_1
  113. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>There is snow on the street.'
  114. jump 'WTHR_x'
  115. :WTHR_2
  116. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>There is snow on the street.'
  117. jump 'WTHR_x'
  118. :WTHR_3
  119. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>There is snow on the street.'
  120. jump 'WTHR_x'
  121. :WTHR_4
  122. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>The snow melts on the street.'
  123. jump 'WTHR_x'
  124. :WTHR_5
  125. $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.'
  126. jump 'WTHR_x'
  127. :WTHR_6
  128. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>Green grass lines the streets.'
  129. jump 'WTHR_x'
  130. :WTHR_7
  131. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>Green grass lines the streets.'
  132. jump 'WTHR_x'
  133. :WTHR_8
  134. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>The grass is green, the leaves in the trees are already turning yellow.'
  135. jump 'WTHR_x'
  136. :WTHR_9
  137. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>Streets lined with green grass, visible yellow leaves.'
  138. jump 'WTHR_x'
  139. :WTHR_10
  140. $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.'
  141. jump 'WTHR_x'
  142. :WTHR_11
  143. $weather = '<<$osadki>> Temperature is <<$temperature>>.<br>The street is dirty with a thin snow cover.'
  144. jump 'WTHR_x'
  145. :WTHR_12
  146. $weather = '<<$osadki>> The temperature is <<$temperature>>.<br>The street is covered in snow.'
  147. jump 'WTHR_x'
  148. :WTHR_x
  149. end
  150. end
  151. if $ARGS[0] = 'temp_set':
  152. if temper < 0:
  153. $temperature = '<font color=blue>'
  154. elseif temper < 10:
  155. $temperature = '<font color=green>'
  156. elseif temper < 20:
  157. $temperature = '<font color=orange>'
  158. else
  159. $temperature = '<font color=red>'
  160. end
  161. if TempUnit=0:$temperature +='<<temper>>°C</font>' else $temperature +='<<temper*9/5+32>>°F</font>'
  162. end
  163. if $ARGS[0] = 'main':
  164. DayInYear=0
  165. if month > 1:DayInYear += 31
  166. if month > 2:
  167. if ((year mod 4 = 0) and (year mod 100 ! 0)) or (year mod 400 = 0):
  168. DayInYear += 29
  169. else
  170. DayInYear += 28
  171. end
  172. end
  173. if month > 3:DayInYear += 31
  174. if month > 4:DayInYear += 30
  175. if month > 5:DayInYear += 31
  176. if month > 6:DayInYear += 30
  177. if month > 7:DayInYear += 31
  178. if month > 8:DayInYear += 31
  179. if month > 9:DayInYear += 30
  180. if month > 10:DayInYear += 31
  181. if month > 11:DayInYear += 30
  182. if month > 12:DayInYear += 31
  183. DayInYear += day
  184. if DayInYear >= 171 :
  185. DayInYear2 = DayInYear-171
  186. else
  187. DayInYear2 = 171-DayInYear
  188. end
  189. DayLength = DayLengthMax-((DayLengthMax-DayLengthMin)*100/182)*DayInYear2/100
  190. ! length/2 in minutes current day
  191. CurTimeSun = hour*60 + minut
  192. ! midday in 13:00
  193. ! CurTimeSun (minuts) <0 - before midday; >0 - after midday
  194. if CurTimeSun >= 780 :
  195. CurTimeSun = CurTimeSun-780
  196. else
  197. CurTimeSun = -(780-CurTimeSun)
  198. end
  199. DayStage=5
  200. BColorBase=0
  201. ! 1 - dawn
  202. ! 2 - midday
  203. ! 3 - sunset
  204. ! 4 - the beginning of the night
  205. ! 5 - night
  206. ! 6 - the end of the night
  207. if CurTimeSun >= -(DayLength-60) and CurTimeSun <= (DayLength-60) :
  208. DayStage=2
  209. BColorBase=255
  210. elseif CurTimeSun >= -DayLength and CurTimeSun <= -(DayLength-60) :
  211. DayStage=1
  212. BColorBase=128+(DayLength+CurTimeSun)*2 &! CurTimeSun - negative, result = 128+ [0-60]*2
  213. elseif CurTimeSun >= (DayLength-60) and CurTimeSun <= DayLength :
  214. DayStage=3
  215. BColorBase=256+((DayLength-60)-CurTimeSun)*2 &! CurTimeSun - positive, result =128+ [0-60]*2
  216. elseif CurTimeSun >= DayLength and CurTimeSun <= DayLength+60 :
  217. DayStage=4
  218. BColorBase=128-(CurTimeSun-DayLength)*2 &! CurTimeSun - positive, result =128- [0-60]*2
  219. elseif CurTimeSun >= -(DayLength+60) and CurTimeSun <= -DayLength :
  220. DayStage=6
  221. BColorBase=128+(CurTimeSun+DayLength)*2 &! CurTimeSun - negative, result = 128- [0-60]*2
  222. end
  223. ! *pl ' DayInYear=<<DayInYear>> DayLength=<<DayLength>> CurTimeSun=<<CurTimeSun>> DayStage=<<DayStage>>'
  224. $weatherImage = '<img src="images/system/weather/wthr'
  225. $weatherImage = $weatherImage + '<<DayStage>>'
  226. if temper < -10 :
  227. $weatherImage += '1'
  228. elseif temper <= 5 :
  229. $weatherImage += '2'
  230. elseif temper <= 19 :
  231. $weatherImage += '3'
  232. else
  233. $weatherImage += '4'
  234. end
  235. if weatherFall < 30 :
  236. $weatherImage += '1'
  237. elseif weatherFall < 60 :
  238. $weatherImage += '2'
  239. else
  240. $weatherImage += '3'
  241. end
  242. if sunWeather = 1 :
  243. $weatherImage += '1'
  244. else
  245. $weatherImage += '2'
  246. end
  247. $weatherImage += '.jpg">'
  248. ! clr
  249. ! pl $weatherImage
  250. ! pl
  251. ! pl $weather
  252. ! pl $osadki
  253. if night_mode = 1:
  254. fcolor = rgb(255, 255, 255)
  255. bcolor = rgb(0, 0, 0)
  256. else
  257. if (DayStage = 1) or (DayStage = 6) :
  258. bcolor = rgb(BColorBase-BColorBase/4, BColorBase-BColorBase/4, BColorBase)
  259. lcolor = rgb(206, 90, 205)
  260. elseif (DayStage = 3) or (DayStage = 4) :
  261. bcolor = rgb(BColorBase, BColorBase-BColorBase/4, BColorBase-BColorBase/4)
  262. lcolor = rgb(56, 90, 205)
  263. else
  264. bcolor = rgb(BColorBase, BColorBase, BColorBase)
  265. lcolor = rgb(106, 90, 205)
  266. end
  267. if BColorBase <= 160 :
  268. fcolor = rgb(255, 255, 255)
  269. else
  270. fcolor = rgb(0, 0, 0)
  271. end
  272. end
  273. !!Shoe variables - cleared here and then set if in outdoors location below
  274. PShoQuality = 0
  275. PShoHeels = 0
  276. PShoCut = 0
  277. PShoStyle = 0
  278. if $location_type = 'public_outdoors' or $location_type = 'secluded' or $location_type = 'event_outdoors':
  279. if sunWeather = 0 and umbrella = 0:
  280. *NL 'It is raining and you do not have an umbrella.'
  281. if pcs_makeup > 1:
  282. pcs_makeup = 0
  283. *p ' The rain has ruined your makeup.'
  284. end
  285. if pcs_hairbsh = 1:
  286. pcs_hairbsh = 0
  287. if curly > 0:curly -= 1
  288. *p ' Your hair is soaked.'
  289. end
  290. *nl
  291. end
  292. if shoeworntype ! 'none':
  293. gs 'shoe_attributes', $shoeworntype, shoewornnumber
  294. PShoQuality = ShoQuality
  295. PShoHeels = ShoHeels
  296. PShoCut = ShoCut
  297. PShoStyle = ShoStyle
  298. end
  299. if temper <= 0:
  300. if (totminut - Time15Minute) >= 15:
  301. !reset Time15Minute
  302. if frost = 0:Time15Minute = totminut
  303. ! begin Loop
  304. :Time15MinuteLoop
  305. if defaultcoat = 5:
  306. bonusZ = -3
  307. elseif defaultcoat = 0:
  308. bonusZ = 0
  309. else
  310. bonusZ = 3
  311. end
  312. if defaultcoat = 0:
  313. if temper < 0:frost += 1
  314. if temper < -20:frost += 2
  315. if temper < -30:frost += 5
  316. if pcs_energy < 20:frost += 1
  317. if $pantyworntype = 'none':frost += 1
  318. if pcs_sweat > 20:frost += 1
  319. elseif temper < -10 and defaultcoat_warmth = 1:
  320. if temper < -30:
  321. frost += 2
  322. else
  323. frost += 1
  324. end
  325. if pcs_energy < 20:frost += 1
  326. if $pantyworntype = 'none':frost += 1
  327. if pcs_sweat > 20:frost += 1
  328. elseif temper < -20 and defaultcoat_warmth = 2:
  329. frost += 1
  330. if pcs_energy < 20:frost += 1
  331. if pcs_sweat > 20:frost += 1
  332. elseif temper < -30 and defaultcoat_warmth = 3:
  333. frost += 1
  334. end
  335. if frost >= 12:sickstage = 1
  336. Time15Minute += 15
  337. if (totminut - Time15Minute) >= 15:jump 'Time15MinuteLoop'
  338. end
  339. end
  340. !!15 minute check to stop refreshes causing early gameover and cheating at exhibitionism
  341. if outdoors_checks + 15 < totminut:
  342. outdoors_checks = totminut
  343. if isprok = 0 and isprokp = 0 and mesec > 0 and preg = 0:
  344. '<b><font color="red">You have the blood flowing down your legs and staining your clothes.</font></b>'
  345. 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>'
  346. pcs_sweat += 10
  347. pcs_mood -= 3
  348. pcs_willpwr -= 10
  349. dynamic '<<$clothingworntype>>H[<<clothingwornnumber>>] -= 1'
  350. end
  351. !!Exhibitionism
  352. if CloExhibit >= pcs_exhibition - 10:
  353. exhibition_outdoors += 1
  354. if pcs_exhibition < 45 and PCloPanties = 1: exhibition_outdoors += 1
  355. end
  356. if $pantyworntype = 'none':
  357. if PCloSkirt = 3:
  358. exhibition_outdoors += 1
  359. elseif PCloSkirt = 4:
  360. exhibition_outdoors += 2
  361. elseif PCloSkirt = 5:
  362. exhibition_outdoors += 3
  363. elseif PCloSkirt = 6:
  364. exhibition_outdoors += 4
  365. end
  366. end
  367. end
  368. else
  369. if night_mode = 1:
  370. fcolor = rgb(255, 255, 255)
  371. bcolor = rgb(0, 0, 0)
  372. lcolor = rgb(106, 90, 205)
  373. else
  374. fcolor = rgb(0, 0, 0)
  375. bcolor = rgb(255, 255, 255)
  376. lcolor = rgb(106, 90, 205)
  377. end
  378. gs 'indoors'
  379. end
  380. end
  381. --- outdoors ---------------------------------