outdoors 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  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''s 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''s 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 = '<b>On the street there is snow, the temperature is <<$temperature>> degrees Celsius.<br> <<$osadki>></b>'
  114. jump 'WTHR_x'
  115. :WTHR_2
  116. $weather = '<b>On the street there is snow, the temperature is <<$temperature>> degrees Celsius.<br> <<$osadki>></b>'
  117. jump 'WTHR_x'
  118. :WTHR_3
  119. $weather = '<b>On the street there is snow, the temperature is <<$temperature>> degrees Celsius.<br> <<$osadki>></b>'
  120. jump 'WTHR_x'
  121. :WTHR_4
  122. $weather = '<b>On the street the snow melts, the temperature is <<$temperature>> degrees Celsius.<br> <<$osadki>></b>'
  123. jump 'WTHR_x'
  124. :WTHR_5
  125. $weather = '<b>Puddles in the street left by snow, winter has covered everything in dirt and debris, some places where new grass grows are pleasantly green, the temperature is <<$temperature>> degrees Celsius.<br> <<$osadki>></b>'
  126. jump 'WTHR_x'
  127. :WTHR_6
  128. $weather = '<b>Green grass lines the streets, the temperature is <<$temperature>> degrees Celsius.<br> <<$osadki>></b>'
  129. jump 'WTHR_x'
  130. :WTHR_7
  131. $weather = '<b>Green grass lines the streets, the temperature is <<$temperature>> degrees Celsius.<br> <<$osadki>></b>'
  132. jump 'WTHR_x'
  133. :WTHR_8
  134. $weather = '<b>The grass is green, in the trees the leaves are already turning yellow, the temperature is <<$temperature>> degrees Celsius.<br> <<$osadki>></b>'
  135. jump 'WTHR_x'
  136. :WTHR_9
  137. $weather = '<b>Streets lined with green grass, visible yellow leaves, the temperature is <<$temperature>> degrees Celsius.<br> <<$osadki>></b>'
  138. jump 'WTHR_x'
  139. :WTHR_10
  140. $weather = '<b>The grass is fading and patchy, yellow and brown leaves fall from the trees, mud and puddles dot the street, temperature is <<$temperature>> degrees Celsius.<br> <<$osadki>></b>'
  141. jump 'WTHR_x'
  142. :WTHR_11
  143. $weather = '<b>The street is dirty with a thin snow cover, temperature is <<$temperature>> degrees Celsius.<br> <<$osadki>></b>'
  144. jump 'WTHR_x'
  145. :WTHR_12
  146. $weather = '<b>The street is covered in snow, the temperature is <<$temperature>> degrees Celsius.<br> <<$osadki>></b>'
  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><<temper>></font>'
  154. elseif temper < 10:
  155. $temperature = '<font color=green><<temper>></font>'
  156. elseif temper < 20:
  157. $temperature = '<font color=orange><<temper>></font>'
  158. else
  159. $temperature = '<font color=red><<temper>></font>'
  160. end
  161. end
  162. if $ARGS[0] = 'main':
  163. DayInYear=0
  164. if month > 1:DayInYear += 31
  165. if month > 2:
  166. if ((year mod 4 = 0) and (year mod 100 ! 0)) or (year mod 400 = 0):
  167. DayInYear += 29
  168. else
  169. DayInYear += 28
  170. end
  171. end
  172. if month > 3:DayInYear += 31
  173. if month > 4:DayInYear += 30
  174. if month > 5:DayInYear += 31
  175. if month > 6:DayInYear += 30
  176. if month > 7:DayInYear += 31
  177. if month > 8:DayInYear += 31
  178. if month > 9:DayInYear += 30
  179. if month > 10:DayInYear += 31
  180. if month > 11:DayInYear += 30
  181. if month > 12:DayInYear += 31
  182. DayInYear += day
  183. if DayInYear >= 171 :
  184. DayInYear2 = DayInYear-171
  185. else
  186. DayInYear2 = 171-DayInYear
  187. end
  188. DayLength = DayLengthMax-((DayLengthMax-DayLengthMin)*100/182)*DayInYear2/100
  189. ! length/2 in minutes current day
  190. CurTimeSun = hour*60 + minut
  191. ! midday in 13:00
  192. ! CurTimeSun (minuts) <0 - before midday; >0 - after midday
  193. if CurTimeSun >= 780 :
  194. CurTimeSun = CurTimeSun-780
  195. else
  196. CurTimeSun = -(780-CurTimeSun)
  197. end
  198. DayStage=5
  199. BColorBase=0
  200. ! 1 - dawn
  201. ! 2 - midday
  202. ! 3 - sunset
  203. ! 4 - the beginning of the night
  204. ! 5 - night
  205. ! 6 - the end of the night
  206. if CurTimeSun >= -(DayLength-60) and CurTimeSun <= (DayLength-60) :
  207. DayStage=2
  208. BColorBase=255
  209. elseif CurTimeSun >= -DayLength and CurTimeSun <= -(DayLength-60) :
  210. DayStage=1
  211. BColorBase=128+(DayLength+CurTimeSun)*2 &! CurTimeSun - negative, result = 128+ [0-60]*2
  212. elseif CurTimeSun >= (DayLength-60) and CurTimeSun <= DayLength :
  213. DayStage=3
  214. BColorBase=256+((DayLength-60)-CurTimeSun)*2 &! CurTimeSun - positive, result =128+ [0-60]*2
  215. elseif CurTimeSun >= DayLength and CurTimeSun <= DayLength+60 :
  216. DayStage=4
  217. BColorBase=128-(CurTimeSun-DayLength)*2 &! CurTimeSun - positive, result =128- [0-60]*2
  218. elseif CurTimeSun >= -(DayLength+60) and CurTimeSun <= -DayLength :
  219. DayStage=6
  220. BColorBase=128+(CurTimeSun+DayLength)*2 &! CurTimeSun - negative, result = 128- [0-60]*2
  221. end
  222. ! *pl ' DayInYear=<<DayInYear>> DayLength=<<DayLength>> CurTimeSun=<<CurTimeSun>> DayStage=<<DayStage>>'
  223. $weatherImage = '<img src="images/system/weather/WTHR'
  224. $weatherImage = $weatherImage + '<<DayStage>>'
  225. if temper < -10 :
  226. $weatherImage += '1'
  227. elseif temper <= 5 :
  228. $weatherImage += '2'
  229. elseif temper <= 19 :
  230. $weatherImage += '3'
  231. else
  232. $weatherImage += '4'
  233. end
  234. if weatherFall < 30 :
  235. $weatherImage += '1'
  236. elseif weatherFall < 60 :
  237. $weatherImage += '2'
  238. else
  239. $weatherImage += '3'
  240. end
  241. if sunWeather = 1 :
  242. $weatherImage += '1'
  243. else
  244. $weatherImage += '2'
  245. end
  246. $weatherImage += '.jpg">'
  247. ! clr
  248. ! pl $weatherImage
  249. ! pl
  250. ! pl $weather
  251. ! pl $osadki
  252. if night_mode = 1:
  253. fcolor = rgb(255, 255, 255)
  254. bcolor = rgb(0, 0, 0)
  255. else
  256. if (DayStage = 1) or (DayStage = 6) :
  257. bcolor = rgb(BColorBase/2+BColorBase/4, BColorBase/2+BColorBase/4, BColorBase)
  258. elseif (DayStage = 3) or (DayStage = 4) :
  259. bcolor = rgb(BColorBase, BColorBase/2+BColorBase/4, BColorBase/2+BColorBase/4)
  260. else
  261. bcolor = rgb(BColorBase, BColorBase, BColorBase)
  262. end
  263. if BColorBase <= 160 :
  264. fcolor = rgb(255, 255, 255)
  265. else
  266. fcolor = rgb(0, 0, 0)
  267. end
  268. lcolor = rgb(106, 90, 205)
  269. end
  270. if $location_type = 'public_outdoors' or $location_type = 'secluded' or $location_type = 'event_outdoors':
  271. if sunWeather = 0 and umbrella = 0:
  272. *NL 'It is raining and you do not have an umbrella.'
  273. if pcs_makeup > 1:
  274. pcs_makeup = 0
  275. *p ' The rain has ruined your makeup.'
  276. end
  277. if pcs_hairbsh = 1:
  278. pcs_hairbsh = 0
  279. if curly > 0:curly -= 1
  280. *p ' Your hair is soaked.'
  281. end
  282. *nl
  283. end
  284. if temper <= 0:
  285. if (totminut - Time15Minute) >= 15:
  286. !reset Time15Minute
  287. if frost = 0:Time15Minute = totminut
  288. ! begin Loop
  289. :Time15MinuteLoop
  290. if defaultcoat = 5:bonusZ = -3
  291. if defaultcoat = 0:bonusZ = 0
  292. if defaultcoat = 3 or defaultcoat = 9 or defaultcoat = 11 or defaultcoat = 12 or defaultcoat = 15 or defaultcoat = 18:bonusZ = 3
  293. if temper < -10 and defaultcoat < 4 and defaultcoat ! 0:
  294. if temper < -30:
  295. frost += 2
  296. else
  297. frost += 1
  298. end
  299. if pcs_energy < 20:frost += 1
  300. if tanga = 0:frost += 1
  301. if pcs_sweat > 20:frost += 1
  302. elseif temper < -20 and (defaultcoat = 4 or defaultcoat = 5 or defaultcoat = 8 or defaultcoat = 10 or defaultcoat = 12 or defaultcoat = 13 or defaultcoat = 14 or defaultcoat = 16 or defaultcoat = 17 or defaultcoat = 18 or defaultcoat = 19):
  303. frost += 1
  304. if pcs_energy < 20:frost += 1
  305. if pcs_sweat > 20:frost += 1
  306. elseif temper < -30 and (defaultcoat = 6 or defaultcoat = 7 or defaultcoat = 9 or defaultcoat = 11 or defaultcoat = 15):
  307. frost += 1
  308. end
  309. if defaultcoat = 0:
  310. if temper < -10:frost += 1
  311. if temper < -20:frost += 2
  312. if temper < -30:frost += 5
  313. end
  314. if frost >= 12:sick += 1
  315. if sick > 0 and sickstage = 0:sickstage = 1
  316. Time15Minute += 15
  317. if (totminut - Time15Minute) >= 15:jump 'Time15MinuteLoop'
  318. end
  319. end
  320. !!15 minute check to stop refreshes causing early gameover and cheating at exhibitionism
  321. if outdoors_checks + 15 < totminut:
  322. outdoors_checks = totminut
  323. if isprok = 0 and isprokp = 0 and mesec > 0 and preg = 0:
  324. '<b><font color="red">You have the blood flowing down your legs and staining your clothes.</font></b>'
  325. if clrbelo > 0 and tanga = 1:clrbelo -= 1 & tanga = 0 & '<b><font color="red">Your panties have been ruined and you discreetly remove and dispose of them.</font></b>'
  326. pcs_sweat += 10
  327. pcs_mood -= 3
  328. pcs_willpwr -= 10
  329. dynamic '<<$clothingworntype>>H[<<clothingwornnumber>>] -= 1'
  330. end
  331. !!Exhibitionism
  332. if CloExhibit >= pcs_exhibition - 10:
  333. exhibition_outdoors += 1
  334. if pcs_exhibition < 45 and PCloPanties = 1: exhibition_outdoors += 1
  335. end
  336. if tanga = 0:
  337. if PCloSkirt = 3:
  338. exhibition_outdoors += 1
  339. elseif PCloSkirt = 4:
  340. exhibition_outdoors += 2
  341. elseif PCloSkirt = 5:
  342. exhibition_outdoors += 3
  343. elseif PCloSkirt = 6:
  344. exhibition_outdoors += 4
  345. end
  346. end
  347. end
  348. else
  349. if night_mode = 1:
  350. fcolor = rgb(255, 255, 255)
  351. bcolor = rgb(0, 0, 0)
  352. lcolor = rgb(106, 90, 205)
  353. else
  354. fcolor = rgb(0, 0, 0)
  355. bcolor = rgb(255, 255, 255)
  356. lcolor = rgb(106, 90, 205)
  357. end
  358. gs 'indoors'
  359. end
  360. end
  361. --- outdoors ---------------------------------