1
0

music_onlinemusic.qsrc 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. # music_onlinemusic
  2. if $ARGS[0] = 'setupAccount':
  3. ml_online['account'] = 1
  4. minut += 30
  5. ml_online_minute += 30
  6. gs 'music_onlinemusic', 'internetcount'
  7. gs 'stat'
  8. 'You log into Youtube to set up a channel for your music. You can upload videos or live stream, but you will need to open a bank account if you want to receive any tips from viewers of your stream.'
  9. !! TODO: Ask for a screen name?
  10. if $loc = 'sitr':
  11. act 'Leave': gt $loc
  12. else
  13. act 'Leave': gt $loc, 'start'
  14. end
  15. end
  16. if $ARGS[0] = 'liveStream':
  17. if komp = 0 or webcamera = 0:
  18. !! TODO: Much, much better scene needed.
  19. ml_streaming['times_streamed'] += 1
  20. minut += ml_streamtime
  21. ml_online_minute += ml_streamtime
  22. gs 'music_onlinemusic', 'internetcount'
  23. gs 'stat'
  24. ml_maxsuperchats = ( pav_music + (city_music * 2) + oldtown_music + village_music + (global_performer * 2) + pcs_apprnc )
  25. ml_superchats = (rand( 0, ml_maxsuperchats) * ml_streamtime) / 60
  26. if ml_guitar['hasguitar'] = 1:
  27. ml_famebase = ( pcs_instrmusic + pcs_vokal + pcs_perform + ( (hotcat-5) * 20 ) ) / 20
  28. instrmusic_exp += rand(1,3)
  29. else
  30. ml_famebase = ( (pcs_vokal * 2) + pcs_perform + ( (hotcat-5) * 20 ) ) / 20
  31. end
  32. pav_music += rand(0, ml_famebase)
  33. city_music += rand(0, ml_famebase)
  34. vokal_exp += rand(1,3)
  35. if perform_lvl < 35: perform_exp += rand(1,3)
  36. ml_streaming['livestreamcount'] += 1
  37. ml_streaming['lastday'] = daystart
  38. ml_performance['performed_minutes'] += ml_streamtime
  39. ml_performance['total_time_performed'] += ml_streamtime
  40. ml_streaming['total_earnings'] += ml_superchats
  41. ml_streaming['unclaimed_earnings'] += ml_superchats
  42. '<center><img <<$set_imgh>> src="images/pc/activities/music/gomixer_hero.jpg"/></center>'
  43. 'You set up your phone on a little tri-pod and log into your account. After settling down comfortably, you start to stream.'
  44. 'Your fans tipped you <<ml_superchats>> rubels for your performance.'
  45. if bankAccount = 0:
  46. *nl
  47. 'You have earned <b><<ml_streaming[''unclaimed_earnings'']>></b> rubels so far, but you need to open a bank account before you can receive the money.'
  48. if $loc = 'sitr':
  49. act 'Stop the stream': gt $loc
  50. else
  51. act 'Stop the stream': gt $loc, 'start'
  52. end
  53. else
  54. *nl
  55. 'You have <b><<ml_streaming[''unclaimed_earnings'']>></b> rubels on your account.'
  56. act 'Stop the stream and transfer the money to your bank account':
  57. karta += ml_streaming['unclaimed_earnings']
  58. ml_streaming['unclaimed_earnings'] = 0
  59. if $loc = 'sitr':
  60. gt $loc
  61. else
  62. gt $loc, 'start'
  63. end
  64. end
  65. act 'Stop the stream':
  66. if $loc = 'sitr':
  67. gt $loc
  68. else
  69. gt $loc, 'start'
  70. end
  71. end
  72. end
  73. end
  74. end
  75. if $ARGS[0] = 'recordSong':
  76. !! TODO: Write a scene. It should describe that a song is recorded and then edited properly before uploading it to the net.
  77. '<center><img <<$set_imgh>> src="images/pc/activities/music/phonerecording.jpg"/></center>'
  78. 'You set up your phone and settle down comfortably to record a song. After several tries you finally end up with a version you are content with and upload it to your account.'
  79. 'As you don''t have a computer you can''t really do much with the songs quality. But then you have seen quite a few people work with only with their phones. Like Ling Ling.'
  80. minut += 30
  81. vokal_exp += rand(1,4)
  82. if perform_lvl < 35: perform_exp += rand(1,3)
  83. ml_performance['performed_minutes'] += 15
  84. ml_performance['total_time_performed'] += 15
  85. ml_onlinesong_hotcat[ml_onlinesongcount] = hotcat
  86. if ml_guitar['hasguitar'] = 1:
  87. ml_onlinesong_skilllevel[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform
  88. ml_onlinesong_freshness[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform + ((hotcat-4)*10)
  89. instrmusic_exp += rand(1,3)
  90. else
  91. ml_onlinesong_skilllevel[ml_onlinesongcount] = (pcs_vokal * 2) + pcs_perform
  92. ml_onlinesong_freshness[ml_onlinesongcount] = (pcs_vokal * 2) + pcs_perform + ((hotcat-4)*10)
  93. end
  94. ml_onlinesong_lastcalcday[ml_onlinesongcount] = daystart
  95. ml_onlinesong_uploaded[ml_onlinesongcount] = 0
  96. ml_uploadablemusic += 1
  97. ml_onlinesongcount += 1
  98. if ml_online['account'] = 1 and internet > 0:
  99. if pcs_inhib < 30:
  100. if pcs_inhib < 10:
  101. $diff = 'hard'
  102. elseif pcs_inhib < 20:
  103. $diff = 'medium'
  104. else
  105. $diff = 'easy'
  106. end
  107. gs 'willpower', 'skill', 'self', $diff
  108. will_cost = (will_cost * 2) - (pcs_perform)
  109. if will_cost <= pcs_willpwr:
  110. act 'Upload music (<<will_cost>> Willpower)': gt 'music_onlinemusic', 'uploadmusic'
  111. else
  112. act 'Upload music (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
  113. end
  114. else
  115. act 'Upload music': gt 'music_onlinemusic', 'uploadmusic'
  116. end
  117. else
  118. if $loc = 'sitr':
  119. act 'Leave': gt $loc
  120. else
  121. act 'Leave': gt $loc, 'start'
  122. end
  123. end
  124. end
  125. if $ARGS[0] = 'recordAndEditSong':
  126. !! TODO: Write a scene. It should describe that a song is recorded and then edited properly before uploading it to the net.
  127. !! '<center><img <<$set_imgh>> src="images/pc/activities/music/editmusic.jpg"/></center>'
  128. '<center><video autoplay loop src="images/pc/activities/music/editmusic.mp4"></video></center>'
  129. 'You open plug in your home studio kit and start up the recording software. After several tries you finally end up with a version you are content with.'
  130. 'The next hour just flies by as you edit the video and the audio, trying to increate the quality of the recording as much as you can'
  131. minut += 90
  132. vokal_exp += rand(1,3)
  133. if perform_lvl < 35: perform_exp += rand(1,3)
  134. if musicprod_lvl < 35: musicprod_exp += rand(1,3)
  135. ml_performance['performed_minutes'] += 15
  136. ml_performance['total_time_performed'] += 15
  137. ml_onlinesong_hotcat[ml_onlinesongcount] = hotcat
  138. if ml_guitar['hasguitar'] = 1:
  139. ml_onlinesong_skilllevel[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform
  140. ml_onlinesong_freshness[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform + ((hotcat-4)*10)
  141. instrmusic_exp += rand(1,3)
  142. else
  143. ml_onlinesong_skilllevel[ml_onlinesongcount] = (pcs_vokal * 2) + pcs_perform
  144. ml_onlinesong_freshness[ml_onlinesongcount] = (pcs_vokal * 2) + pcs_perform + ((hotcat-4)*10)
  145. end
  146. ml_onlinesong_lastcalcday[ml_onlinesongcount] = daystart
  147. ml_onlinesong_uploaded[ml_onlinesongcount] = 0
  148. ml_uploadablemusic += 1
  149. ml_onlinesongcount += 1
  150. if ml_online['account'] = 1 and internet > 0:
  151. if pcs_inhib < 30:
  152. if pcs_inhib < 10:
  153. $diff = 'hard'
  154. elseif pcs_inhib < 20:
  155. $diff = 'medium'
  156. else
  157. $diff = 'easy'
  158. end
  159. gs 'willpower', 'skill', 'self', $diff
  160. will_cost = (will_cost * 2) - (pcs_perform)
  161. if will_cost <= pcs_willpwr:
  162. act 'Upload music (<<will_cost>> Willpower)': gt 'music_onlinemusic', 'uploadmusic'
  163. else
  164. act 'Upload music (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
  165. end
  166. else
  167. act 'Upload music': gt 'music_onlinemusic', 'uploadmusic'
  168. end
  169. else
  170. if $loc = 'sitr':
  171. act 'Leave': gt $loc
  172. else
  173. act 'Leave': gt $loc, 'start'
  174. end
  175. end
  176. end
  177. if $ARGS[0] = 'uploadmusic':
  178. if pcs_inhib < 30:
  179. 'You hesitate for a long moment, but finally take a deep breath and click on the "Upload" button and your newly recorded song moves over to the internet for all to see.'
  180. 'You bite in your lip, then close the screen before you change your mind and delete it.'
  181. else
  182. 'You smile brightly and click on the "Upload" button. Now the whole world can see you play. And if they don''t like it, well... "Haters gonna hate" you shrug mentally and close the screen. They will like it."'
  183. end
  184. ml_online_minute += 10
  185. gs 'music_onlinemusic', 'internetcount'
  186. gs 'stat'
  187. ml_uploadablemusic -= 1
  188. ml_onlinesong_uploaded[ml_onlinesongcount-1] = 1
  189. killvar 'will_cost'
  190. if $loc = 'sitr':
  191. act 'Leave': gt $loc
  192. else
  193. act 'Leave': gt $loc, 'start'
  194. end
  195. end
  196. if $ARGS[0] = 'uploadallmusic':
  197. '<center><img src="images/pc/activities/music/uploadmusic.jpg"/></center>'
  198. if will_cost > 0:
  199. 'You go through the songs you recorded, and clear out the old ones that you really ,really don''t like anymore then after a moment of hesitation you take a deep breath and click on the "Upload" button.
  200. The screen changes and one by one, your songs move over to the internet for all to see.'
  201. 'You bite in your lip, then close the screen before you change your mind and delete them.'
  202. else
  203. 'You smile brightly as you browse through your recordings, deleting some old ones, then finally click the "Upload" button. Now the whole world can see you play. And if they don''t like it, well... "Haters gonna hate" you shrug mentally and close the screen, this is how art grows."'
  204. end
  205. gs 'music_onlinemusic', 'deleting'
  206. i = 0
  207. :uploadallmusic
  208. if ml_onlinesong_uploaded[i] = 0 and internet > 0:
  209. ml_online_minute += 10
  210. gs 'music_onlinemusic', 'internetcount'
  211. gs 'stat'
  212. ml_onlinesong_uploaded[i] = 1
  213. ml_uploadablemusic -= 1
  214. end
  215. i += 1
  216. if i < ml_onlinesongcount:jump 'uploadallmusic'
  217. killvar 'will_cost'
  218. if $loc = 'sitr':
  219. act 'Leave': gt $loc
  220. else
  221. act 'Leave': gt $loc, 'start'
  222. end
  223. end
  224. if $ARGS[0] = 'deleteoldmusic':
  225. 'You go through your recorded musics and delete all the old ones where your playing doesn''t really reflect what you can do these days'
  226. gs 'music_onlinemusic', 'deleting'
  227. if $loc = 'sitr':
  228. act 'Leave': gt $loc
  229. else
  230. act 'Leave': gt $loc, 'start'
  231. end
  232. end
  233. !!----------------------------------------------------------------------------------------------------------------------------
  234. !!----------------------------------------- GoSub functions all go here --------------------------------------------------
  235. !!----------------------------------------------------------------------------------------------------------------------------
  236. if $ARGS[0] = 'deleting':
  237. ml_threshold_skilllevel = ((pcs_instrmusic + pcs_vokal + pcs_perform)*80)/100
  238. i = 0
  239. j = -1
  240. :deletemusic
  241. if (ml_onlinesong_uploaded = 1) or (ml_onlinesong_uploaded = 0 and ml_onlinesong_skilllevel > ml_threshold_skilllevel):
  242. j += 1
  243. ml_tempsong_freshness[j] = ml_onlinesong_sfreshness[i]
  244. ml_tempsong_lastcalcday[j] = ml_onlinesong_lastcalcday[i]
  245. ml_tempsong_hotcat[j] = ml_onlinesong_hotcat[i]
  246. ml_tempsong_skilllevel[j] = ml_onlinesong_skilllevel[i]
  247. ml_tempsong_uploaded[j] = ml_onlinesong_uploaded[i]
  248. else
  249. ml_uploadablemusic -= 1
  250. end
  251. i += 1
  252. if i < ml_onlinesongcount:jump 'deletemusic'
  253. killvar 'ml_onlinesong_freshness'
  254. killvar 'ml_onlinesong_lastcalcday'
  255. killvar 'ml_onlinesong_hotcat'
  256. killvar 'ml_onlinesong_skilllevel'
  257. killvar 'ml_onlinesong_uploaded'
  258. killvar 'i'
  259. ml_onlinesongcount = 0
  260. if j >= 0:
  261. :looprebuildsongs
  262. ml_onlinesong_freshness[ml_onlinesongcount] = ml_tempsong_freshness[ml_onlinesongcount]
  263. ml_onlinesong_hotcat[ml_onlinesongcount] = ml_tempsong_hotcat[ml_onlinesongcount]
  264. ml_onlinesong_lastcalcday[ml_onlinesongcount] = ml_tempsong_lastcalcday[ml_onlinesongcount]
  265. ml_onlinesong_skilllevel[ml_onlinesongcount] = ml_tempsong_skilllevel[ml_onlinesongcount]
  266. ml_onlinesong_uploaded[ml_onlinesongcount] = ml_tempsong_uploaded[ml_onlinesongcount]
  267. ml_onlinesongcount += 1
  268. if ml_onlinesongcount <= j: jump 'looprebuildsongs'
  269. end
  270. killvar 'ml_tempsong_freshness'
  271. killvar 'ml_tempsong_lastcalcday'
  272. killvar 'ml_tempsong_hotcat'
  273. killvar 'ml_tempsong_skilllevel'
  274. killvar 'ml_tempsong_uploaded'
  275. killvar 'ml_threshold_skilllevel'
  276. end
  277. if $ARGS[0] = 'internetcount':
  278. if ml_online_minute >= 60:
  279. internet -= 1
  280. ml_online_minute -= 60
  281. end
  282. end
  283. --- music_onlinemusic ---------------------------------