music_onlinemusic.qsrc 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  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. !! TODO: Much, much better scene needed.
  18. ml_streaming['times_streamed'] += 1
  19. minut += ml_streamtime
  20. ml_online_minute += ml_streamtime
  21. gs 'music_onlinemusic', 'internetcount'
  22. gs 'stat'
  23. ml_maxsuperchats = ( pav_music + (city_music * 2) + oldtown_music + village_music + (global_performer * 2) + pcs_apprnc )
  24. ml_superchats = (rand( 0, ml_maxsuperchats) * ml_streamtime) / 60
  25. if ml_guitar['hasguitar'] = 1:
  26. ml_famebase = ( pcs_instrmusic + pcs_vokal + pcs_perform + ( (hotcat-5) * 20 ) ) / 20
  27. instrmusic_exp += rand(1,3)
  28. else
  29. ml_famebase = ( (pcs_vokal * 2) + pcs_perform + ( (hotcat-5) * 20 ) ) / 20
  30. end
  31. pav_music += rand(0, ml_famebase)
  32. city_music += rand(0, ml_famebase)
  33. vokal_exp += rand(1,3)
  34. if perform_lvl < 35: perform_exp += rand(1,3)
  35. ml_streaming['livestreamcount'] += 1
  36. ml_streaming['lastday'] = daystart
  37. ml_performance['performed_minutes'] += ml_streamtime
  38. ml_performance['total_time_performed'] += ml_streamtime
  39. ml_streaming['total_earnings'] += ml_superchats
  40. ml_streaming['unclaimed_earnings'] += ml_superchats
  41. !! TODO: The old if komp = 0 or webcamera = 0 should come down here with different text based on whether a computer and webcamera is used or just the phone.
  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. if $ARGS[0] = 'recordSong':
  75. !! TODO: Write a scene. It should describe that a song is recorded and then edited properly before uploading it to the net.
  76. '<center><img <<$set_imgh>> src="images/pc/activities/music/phonerecording.jpg"/></center>'
  77. '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.'
  78. '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.'
  79. minut += 30
  80. vokal_exp += rand(1,4)
  81. if perform_lvl < 35: perform_exp += rand(1,3)
  82. ml_performance['performed_minutes'] += 15
  83. ml_performance['total_time_performed'] += 15
  84. ml_onlinesong_hotcat[ml_onlinesongcount] = hotcat
  85. if ml_guitar['hasguitar'] = 1:
  86. ml_onlinesong_skilllevel[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform
  87. ml_onlinesong_freshness[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform + ((hotcat-4)*10)
  88. instrmusic_exp += rand(1,3)
  89. else
  90. ml_onlinesong_skilllevel[ml_onlinesongcount] = (pcs_vokal * 2) + pcs_perform
  91. ml_onlinesong_freshness[ml_onlinesongcount] = (pcs_vokal * 2) + pcs_perform + ((hotcat-4)*10)
  92. end
  93. ml_onlinesong_lastcalcday[ml_onlinesongcount] = daystart
  94. ml_onlinesong_uploaded[ml_onlinesongcount] = 0
  95. ml_uploadablemusic += 1
  96. ml_onlinesongcount += 1
  97. if ml_online['account'] = 1 and internet > 0:
  98. if pcs_inhib < 30:
  99. if pcs_inhib < 10:
  100. $diff = 'hard'
  101. elseif pcs_inhib < 20:
  102. $diff = 'medium'
  103. else
  104. $diff = 'easy'
  105. end
  106. gs 'willpower', 'skill', 'self', $diff
  107. will_cost = (will_cost * 2) - (pcs_perform)
  108. if will_cost <= pcs_willpwr:
  109. act 'Upload music (<<will_cost>> Willpower)': gt 'music_onlinemusic', 'uploadmusic'
  110. else
  111. 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>'
  112. end
  113. else
  114. act 'Upload music': gt 'music_onlinemusic', 'uploadmusic'
  115. end
  116. else
  117. if $loc = 'sitr':
  118. act 'Leave': gt $loc
  119. else
  120. act 'Leave': gt $loc, 'start'
  121. end
  122. end
  123. end
  124. if $ARGS[0] = 'recordAndEditSong':
  125. !! TODO: Write a scene. It should describe that a song is recorded and then edited properly before uploading it to the net.
  126. !! '<center><img <<$set_imgh>> src="images/pc/activities/music/editmusic.jpg"/></center>'
  127. '<center><video autoplay loop src="images/pc/activities/music/editmusic.mp4"></video></center>'
  128. '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.'
  129. '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'
  130. minut += 90
  131. vokal_exp += rand(1,3)
  132. if perform_lvl < 35: perform_exp += rand(1,3)
  133. if musicprod_lvl < 35: musicprod_exp += rand(1,3)
  134. ml_performance['performed_minutes'] += 15
  135. ml_performance['total_time_performed'] += 15
  136. ml_onlinesong_hotcat[ml_onlinesongcount] = hotcat
  137. if ml_guitar['hasguitar'] = 1:
  138. ml_onlinesong_skilllevel[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform
  139. ml_onlinesong_freshness[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform + ((hotcat-4)*10)
  140. instrmusic_exp += rand(1,3)
  141. else
  142. ml_onlinesong_skilllevel[ml_onlinesongcount] = (pcs_vokal * 2) + pcs_perform
  143. ml_onlinesong_freshness[ml_onlinesongcount] = (pcs_vokal * 2) + pcs_perform + ((hotcat-4)*10)
  144. end
  145. ml_onlinesong_lastcalcday[ml_onlinesongcount] = daystart
  146. ml_onlinesong_uploaded[ml_onlinesongcount] = 0
  147. ml_uploadablemusic += 1
  148. ml_onlinesongcount += 1
  149. if ml_online['account'] = 1 and internet > 0:
  150. if pcs_inhib < 30:
  151. if pcs_inhib < 10:
  152. $diff = 'hard'
  153. elseif pcs_inhib < 20:
  154. $diff = 'medium'
  155. else
  156. $diff = 'easy'
  157. end
  158. gs 'willpower', 'skill', 'self', $diff
  159. will_cost = (will_cost * 2) - (pcs_perform)
  160. if will_cost <= pcs_willpwr:
  161. act 'Upload music (<<will_cost>> Willpower)': gt 'music_onlinemusic', 'uploadmusic'
  162. else
  163. 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>'
  164. end
  165. else
  166. act 'Upload music': gt 'music_onlinemusic', 'uploadmusic'
  167. end
  168. else
  169. if $loc = 'sitr':
  170. act 'Leave': gt $loc
  171. else
  172. act 'Leave': gt $loc, 'start'
  173. end
  174. end
  175. end
  176. if $ARGS[0] = 'uploadmusic':
  177. if pcs_inhib < 30:
  178. '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.'
  179. 'You bite in your lip, then close the screen before you change your mind and delete it.'
  180. else
  181. '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."'
  182. end
  183. ml_online_minute += 10
  184. gs 'music_onlinemusic', 'internetcount'
  185. gs 'stat'
  186. ml_uploadablemusic -= 1
  187. ml_onlinesong_uploaded[ml_onlinesongcount-1] = 1
  188. killvar 'will_cost'
  189. if $loc = 'sitr':
  190. act 'Leave': gt $loc
  191. else
  192. act 'Leave': gt $loc, 'start'
  193. end
  194. end
  195. if $ARGS[0] = 'uploadallmusic':
  196. '<center><img src="images/pc/activities/music/uploadmusic.jpg"/></center>'
  197. if will_cost > 0:
  198. '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.
  199. The screen changes and one by one, your songs move over to the internet for all to see.'
  200. 'You bite in your lip, then close the screen before you change your mind and delete them.'
  201. else
  202. '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."'
  203. end
  204. gs 'music_onlinemusic', 'deleting'
  205. i = 0
  206. :uploadallmusic
  207. if ml_onlinesong_uploaded[i] = 0 and internet > 0:
  208. ml_online_minute += 10
  209. gs 'music_onlinemusic', 'internetcount'
  210. gs 'stat'
  211. ml_onlinesong_uploaded[i] = 1
  212. ml_uploadablemusic -= 1
  213. end
  214. i += 1
  215. if i < ml_onlinesongcount:jump 'uploadallmusic'
  216. killvar 'will_cost'
  217. if $loc = 'sitr':
  218. act 'Leave': gt $loc
  219. else
  220. act 'Leave': gt $loc, 'start'
  221. end
  222. end
  223. if $ARGS[0] = 'deleteoldmusic':
  224. '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'
  225. gs 'music_onlinemusic', 'deleting'
  226. if $loc = 'sitr':
  227. act 'Leave': gt $loc
  228. else
  229. act 'Leave': gt $loc, 'start'
  230. end
  231. end
  232. !!----------------------------------------------------------------------------------------------------------------------------
  233. !!----------------------------------------- GoSub functions all go here --------------------------------------------------
  234. !!----------------------------------------------------------------------------------------------------------------------------
  235. if $ARGS[0] = 'deleting':
  236. ml_threshold_skilllevel = ((pcs_instrmusic + pcs_vokal + pcs_perform)*80)/100
  237. i = 0
  238. j = -1
  239. :deletemusic
  240. if (ml_onlinesong_uploaded = 1) or (ml_onlinesong_uploaded = 0 and ml_onlinesong_skilllevel > ml_threshold_skilllevel):
  241. j += 1
  242. ml_tempsong_freshness[j] = ml_onlinesong_sfreshness[i]
  243. ml_tempsong_lastcalcday[j] = ml_onlinesong_lastcalcday[i]
  244. ml_tempsong_hotcat[j] = ml_onlinesong_hotcat[i]
  245. ml_tempsong_skilllevel[j] = ml_onlinesong_skilllevel[i]
  246. ml_tempsong_uploaded[j] = ml_onlinesong_uploaded[i]
  247. else
  248. ml_uploadablemusic -= 1
  249. end
  250. i += 1
  251. if i < ml_onlinesongcount:jump 'deletemusic'
  252. killvar 'ml_onlinesong_freshness'
  253. killvar 'ml_onlinesong_lastcalcday'
  254. killvar 'ml_onlinesong_hotcat'
  255. killvar 'ml_onlinesong_skilllevel'
  256. killvar 'ml_onlinesong_uploaded'
  257. killvar 'i'
  258. ml_onlinesongcount = 0
  259. if j >= 0:
  260. :looprebuildsongs
  261. ml_onlinesong_freshness[ml_onlinesongcount] = ml_tempsong_freshness[ml_onlinesongcount]
  262. ml_onlinesong_hotcat[ml_onlinesongcount] = ml_tempsong_hotcat[ml_onlinesongcount]
  263. ml_onlinesong_lastcalcday[ml_onlinesongcount] = ml_tempsong_lastcalcday[ml_onlinesongcount]
  264. ml_onlinesong_skilllevel[ml_onlinesongcount] = ml_tempsong_skilllevel[ml_onlinesongcount]
  265. ml_onlinesong_uploaded[ml_onlinesongcount] = ml_tempsong_uploaded[ml_onlinesongcount]
  266. ml_onlinesongcount += 1
  267. if ml_onlinesongcount <= j: jump 'looprebuildsongs'
  268. end
  269. killvar 'ml_tempsong_freshness'
  270. killvar 'ml_tempsong_lastcalcday'
  271. killvar 'ml_tempsong_hotcat'
  272. killvar 'ml_tempsong_skilllevel'
  273. killvar 'ml_tempsong_uploaded'
  274. killvar 'ml_threshold_skilllevel'
  275. end
  276. if $ARGS[0] = 'internetcount':
  277. if ml_online_minute >= 60:
  278. internet -= 1
  279. ml_online_minute -= 60
  280. end
  281. end
  282. --- music_onlinemusic ---------------------------------