Advertisement
Guest User

Untitled

a guest
Nov 13th, 2016
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.42 KB | None | 0 0
  1. // -------------------------------------------------------
  2. // Radio - MIDI City Ragnarok Online
  3. // -------------------------------------------------------
  4. // Radio NPC duh
  5. // -------------------------------------------------------
  6. // Author: Cyan Hijirikawa
  7. // -------------------------------------------------------
  8. // Version
  9. // 1.0 - Initial Release
  10. // -------------------------------------------------------
  11. - script Radio DJ -1,{
  12. OnRadio:
  13. deletearray @title$;
  14. deletearray @number;
  15. deletearray @genre_count;
  16. if(.delay > gettimetick(2) ){
  17. mes "[ ^9d3ad3 Radio DJ ^000000 ]";
  18. mes "I'm sorry, but I can only play a song every 3 minutes.";
  19. mes "Please talk to me after a few more minutes.";
  20. close;
  21. end;
  22. }
  23. mes "[ ^9d3ad3 Radio DJ ^000000 ]";
  24. mes "Which Playlist would you like to browse?";
  25. switch(select(.playlist$)){
  26. case 1: callsub OnPlaylistSelect,1; break;
  27. case 2: callsub OnPlaylistSelect,2; break;
  28. case 3: callsub OnPlaylistSelect,3; break;
  29. }
  30. next;
  31. mes "[ ^9d3ad3 Radio DJ ^000000 ]";
  32. mes "I can play you a number of songs.";
  33. mes "What would you like to do?";
  34. switch(select("Play a song:View the list")){
  35. case 1:
  36. OnBackToMenu:
  37. next;
  38. mes "[ ^9d3ad3 Radio DJ ^000000 ]";
  39. mes "What number did you want to play?";
  40. input .@bgm;
  41. if(.@bgm > @genre_count+100 || .@bgm < @genre_count){
  42. next;
  43. mes "[ Radio DJ ]";
  44. mes "That is not possible to play right now.";
  45. close;
  46. end;
  47. }
  48. for(set .@i,@genre_count;.@i < getarraysize(@title$);.@i++){
  49. if(.@bgm == @number[.@i])
  50. .@bgm_check += 1;
  51. }
  52. if( .@bgm_check < 1 ) {
  53. next;
  54. mes "[ ^9d3ad3 Radio DJ ^000000 ]";
  55. mes "I'm sorry, but what you selected is not available.";
  56. mes "Please try again.";
  57. close;
  58. end;
  59. }
  60. next;
  61. switch(select("For myself:For everyone")){
  62. case 1:
  63. mes "[ ^9d3ad3 Radio DJ ^000000 ]";
  64. mes "Splendid choice!";
  65. mes "I will play it shortly.";
  66. close2;
  67. announce "Now playing [ "+@title$[.@bgm]+" ]",bc_self;
  68. sleep2 1000;
  69. playBGM @number$[.@bgm];
  70. end;
  71. case 2:
  72. mes "[ ^9d3ad3 Radio DJ ^000000 ]";
  73. mes "To play it for everyone, I'll need ^FF00001000 CASH POINTS^000000";
  74. mes "Do you still want to proceed?";
  75. menu "Yes",-;
  76. if(#CASHPOINTS < 1000){
  77. next;
  78. mes "[ ^9d3ad3 Radio DJ ^000000 ]";
  79. mes "You don't have enough CASH POINTS to pay for this service.";
  80. close;
  81. end;
  82. }
  83. mes "[ ^9d3ad3 Radio DJ ^000000 ]";
  84. mes "Splendid choice!";
  85. mes "I will play it shortly.";
  86. #CASHPOINTS -= 1000;
  87. message strcharinfo(0),"You paid 1000 Cash Points";
  88. close2;
  89. announce strcharinfo(0)+" has chosen to play [ "+@title$[.@bgm]+" ] for everyone!",1;
  90. sleep2 2000;
  91. playBGMall @number$[.@bgm];
  92. set .delay, gettimetick(2) + 180;
  93. end;
  94. }
  95. case 2:
  96. next;
  97. mes "[ ^9d3ad3 Radio DJ ^000000 ]";
  98. mes "I can play the following: ";
  99. mes "^FF0000---------^000000^00FF00---------^000000^0000FF---------^000000";
  100. mes "[^FF0000Number^000000] - [^0000FFTitle^000000]";
  101. for(set .@i,@genre_count; .@i < getarraysize(@title$); .@i++){
  102. mes "^FF0000"+@number$[.@i]+"^000000 - ^0000FF"+@title$[.@i]+"^000000";
  103. }
  104. switch(select("Play a song:Back to Playlists")){
  105. case 1: goto OnBackToMenu;
  106. case 2: next; goto OnRadio;
  107. }
  108. end;
  109. }
  110. end;
  111. OnPlaylistSelect:
  112. switch(getarg(0)){
  113. case 1:
  114. setarray @title$[700],"Ifuudoudou"
  115. ,"Kishi Ou no Hokori"
  116. ,"Hello, How are you"
  117. ,"PON PON PON"
  118. ,"CANDY CANDY"
  119. ,"Howl be Quiet"
  120. ,"Seven Deadly Sins"
  121. ,"Higher"
  122. ,"Breathless"
  123. ,"No Differences"
  124. ,"Karakuri Pierrot"
  125. ,"Staple Stable"
  126. ,"Renai Circulation"
  127. ,"Brave Shine"
  128. ,"Kimi no Shiranai Monogatari"; //Title of the Song
  129. setarray @number$[700],"700","701","702","703","704","705","706","707","708","709","710","711","712","713","714"; //Number of the song [ BGM Folder ]
  130. setarray @number[700],700,701,702,703,704,705,706,707,708,709,710,711,712,713,714; //Same as above, need for checks
  131. set @genre_count,700; //Do not touch
  132. return;
  133. case 2:
  134. setarray @title$[800],"Cecilia and the Satellite"
  135. ,"Don't let me down"
  136. ,"Impossible"
  137. ,"7 Years"
  138. ,"Never forget you"
  139. ,"Sad Song"
  140. ,"Wolven Storm"
  141. ,"Emperor's New Clothes"
  142. ,"Secret Love Song"
  143. ,"Latch"
  144. ,"Sleeping with Sirens"; //Title of the Song
  145. setarray @number$[800],"800","801","802","803","804","805","806","807","808","809","810"; //Number of the song [ BGM Folder ]
  146. setarray @number[800],800,801,802,803,804,805,806,807,808,809,810; //Same as above, need for checks
  147. set @genre_count,800; //Do not touch
  148. return;
  149. case 3:
  150. setarray @title$[600],"Buko"
  151. ,"Hanggang Tingin"
  152. ,"Magkabilang Mundo"; //Title of the Song
  153. setarray @number$[600],"600","601","602"; //Number of the song [ BGM Folder ]
  154. setarray @number[600],600,601,602; //Same as above, need for checks
  155. set @genre_count,600; //Do not touch
  156. return;
  157. default:
  158. dispbottom getarg(0);
  159. dispbottom "Something went wrong.";
  160. end;
  161. }
  162. end;
  163. OnInit:
  164. bindatcmd "radio",strnpcinfo(3)+"::OnRadio";
  165. setarray .playlist$,"Japanese:English:Filipino";
  166. end;
  167. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement