[GC] 🎸 Missing Instruments

Lists all the instruments you need to play with your pet.

  1. // ==UserScript==
  2. // @name [GC] 🎸 Missing Instruments
  3. // @namespace https://www.grundos.cafe/
  4. // @version 2.1
  5. // @description Lists all the instruments you need to play with your pet.
  6. // @match https://www.grundos.cafe/instruments/?pet_name=*
  7. // @license MIT
  8. // @author AshyAsh
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. // List of instruments with images and links
  16. const instrumentData = {
  17. "Accordion": ["https://grundoscafe.b-cdn.net/items/mus_accordian.gif", "/search/items/?item_name=Accordion"],
  18. "Afoxé": ["https://grundoscafe.b-cdn.net/items/mus_afoxe.gif", "/search/items/?item_name=Afoxé"],
  19. "Agogô": ["https://grundoscafe.b-cdn.net/items/mus_agogo.gif", "/search/items/?item_name=Agogô"],
  20. "Air Faerie Guitar": ["https://grundoscafe.b-cdn.net/items/inst_guitar_faerie.gif", "/search/items/?item_name=Air Faerie Guitar"],
  21. "A Smatter of Mayo": ["https://grundoscafe.b-cdn.net/items/foo_smattering_mayo.gif", "/search/items/?item_name=A Smatter of Mayo"],
  22. "Baby Drum": ["https://grundoscafe.b-cdn.net/items/inst_baby_drum.gif", "/search/items/?item_name=Baby Drum"],
  23. "Baby Whistle": ["https://grundoscafe.b-cdn.net/items/inst_baby_whistle.gif", "/search/items/?item_name=Baby Whistle"],
  24. "Bagpipes": ["https://grundoscafe.b-cdn.net/items/inst_bagpipes.gif", "/search/items/?item_name=Bagpipes"],
  25. "Bass Guitar": ["https://grundoscafe.b-cdn.net/items/mus_bass.gif", "/search/items/?item_name=Bass Guitar"],
  26. "Berimbau": ["https://grundoscafe.b-cdn.net/items/mus_berimbau.gif", "/search/items/?item_name=Berimbau"],
  27. "Berrante": ["https://grundoscafe.b-cdn.net/items/mus_berro.gif", "/search/items/?item_name=Berrante"],
  28. "Blueberry Jelly Bass": ["https://grundoscafe.b-cdn.net/items/inst_jelly_bass.gif", "/search/items/?item_name=Blueberry Jelly Bass"],
  29. "Blue Kazoo": ["https://grundoscafe.b-cdn.net/items/inst_kazoo_blue.gif", "/search/items/?item_name=Blue Kazoo"],
  30. "Blue Moehawk Guitar": ["https://grundoscafe.b-cdn.net/items/moehawk_guitar2.gif", "/search/items/?item_name=Blue Moehawk Guitar"],
  31. "Bongo Drums": ["https://grundoscafe.b-cdn.net/items/toy_bongo.gif", "/search/items/?item_name=Bongo Drums"],
  32. "Bruce Maracas": ["https://grundoscafe.b-cdn.net/items/inst_bruce_maracas.gif", "/search/items/?item_name=Bruce Maracas"],
  33. "Castanets": ["https://grundoscafe.b-cdn.net/items/imus_castanets.gif", "/search/items/?item_name=Castanets"],
  34. "Cavaquinho": ["https://grundoscafe.b-cdn.net/items/mus_cavaco.gif", "/search/items/?item_name=Cavaquinho"],
  35. "Cello": ["https://grundoscafe.b-cdn.net/items/mus_cello.gif", "/search/items/?item_name=Cello"],
  36. "Clarinet": ["https://grundoscafe.b-cdn.net/items/toy_clarinet.gif", "/search/items/?item_name=Clarinet"],
  37. "Colourful Xylophone": ["https://grundoscafe.b-cdn.net/items/toy_xylophone.gif", "/search/items/?item_name=Colourful Xylophone"],
  38. "Double Neck Guitar": ["https://grundoscafe.b-cdn.net/items/inst_doubleneck_guitar.gif", "/search/items/?item_name=Double Neck Guitar"],
  39. "Earth Faerie Recorder": ["https://grundoscafe.b-cdn.net/items/inst_recorder_faerie.gif", "/search/items/?item_name=Earth Faerie Recorder"],
  40. "Faerie Saxophone": ["https://grundoscafe.b-cdn.net/items/inst_saxaphone_faerie.gif", "/search/items/?item_name=Faerie Saxophone"],
  41. "Fire Bass": ["https://grundoscafe.b-cdn.net/items/mus_fire_bass.gif", "/search/items/?item_name=Fire Bass"],
  42. "Fire Violin": ["https://grundoscafe.b-cdn.net/items/fire_violin.gif", "/search/items/?item_name=Fire Violin"],
  43. "Flower Bass": ["https://grundoscafe.b-cdn.net/items/inst_flowerbass.gif", "/search/items/?item_name=Flower Bass"],
  44. "Flower Cello": ["https://grundoscafe.b-cdn.net/items/inst_flower_cello.gif", "/search/items/?item_name=Flower Cello"],
  45. "Flower Trumpet": ["https://grundoscafe.b-cdn.net/items/inst_flowertrumpet.gif", "/search/items/?item_name=Flower Trumpet"],
  46. "Flute": ["https://grundoscafe.b-cdn.net/items/toy_flute.gif", "/search/items/?item_name=Flute"],
  47. "French Horn": ["https://grundoscafe.b-cdn.net/items/mus_frenchhorn.gif", "/search/items/?item_name=French Horn"],
  48. "Ghostkerchief Banjo": ["https://grundoscafe.b-cdn.net/items/inst_ghostkerchief_banjo.gif", "/search/items/?item_name=Ghostkerchief Banjo"],
  49. "Gloomy Drums": ["https://grundoscafe.b-cdn.net/items/inst_gloomy_drums.gif", "/search/items/?item_name=Gloomy Drums"],
  50. "Gloomy Guitar": ["https://grundoscafe.b-cdn.net/items/inst_gloomy_guitar.gif", "/search/items/?item_name=Gloomy Guitar"],
  51. "Gloomy Harp": ["https://grundoscafe.b-cdn.net/items/inst_gloomy_harp.gif", "/search/items/?item_name=Gloomy Harp"],
  52. "Grand Piano": ["https://grundoscafe.b-cdn.net/items/mus_grandpiano.gif", "/search/items/?item_name=Grand Piano"],
  53. "Grape Jelly Bongos": ["https://grundoscafe.b-cdn.net/items/inst_jelly_bongos.gif", "/search/items/?item_name=Grape Jelly Bongos"],
  54. "Gruundo Guitar": ["https://grundoscafe.b-cdn.net/items/gif_band_guitar.gif", "/search/items/?item_name=Gruundo Guitar"],
  55. "Guitarra Portuguesa": ["https://grundoscafe.b-cdn.net/items/mus_guitarralisboa.gif", "/search/items/?item_name=Guitarra Portuguesa"],
  56. "Harmonica": ["https://grundoscafe.b-cdn.net/items/toy_harmonica.gif", "/search/items/?item_name=Harmonica"],
  57. "Harp": ["https://grundoscafe.b-cdn.net/items/mus_harp.gif", "/search/items/?item_name=Harp"],
  58. "Heart Drums": ["https://grundoscafe.b-cdn.net/items/inst_valentinedrums.gif", "/search/items/?item_name=Heart Drums"],
  59. "Ice Accordion": ["https://grundoscafe.b-cdn.net/items/ice_accordion.gif", "/search/items/?item_name=Ice Accordion"],
  60. "Ice Harp": ["https://grundoscafe.b-cdn.net/items/ice_harp.gif", "/search/items/?item_name=Ice Harp"],
  61. "Jelly Triangle": ["https://grundoscafe.b-cdn.net/items/inst_jelly_triangle.gif", "/search/items/?item_name=Jelly Triangle"],
  62. "Jelly Xylophone": ["https://grundoscafe.b-cdn.net/items/inst_jelly_xylophone.gif", "/search/items/?item_name=Jelly Xylophone"],
  63. "Kau Bell": ["https://grundoscafe.b-cdn.net/items/imus_cowbell.gif", "/search/items/?item_name=Kau Bell"],
  64. "Light Faerie Harp": ["https://grundoscafe.b-cdn.net/items/inst_harp_faerie.gif", "/search/items/?item_name=Light Faerie Harp"],
  65. "Maccy Synth": ["https://grundoscafe.b-cdn.net/items/toy_synth.gif", "/search/items/?item_name=Maccy Synth"],
  66. "Mandolin": ["https://grundoscafe.b-cdn.net/items/inst_mandolin.gif", "/search/items/?item_name=Mandolin"],
  67. "Mystery Island Drum": ["https://grundoscafe.b-cdn.net/items/tiki_native_drum.gif", "/search/items/?item_name=Mystery Island Drum"],
  68. "Mystic Guitar": ["https://grundoscafe.b-cdn.net/items/inst_acoustic_guit.gif", "/search/items/?item_name=Mystic Guitar"],
  69. "Oboe": ["https://grundoscafe.b-cdn.net/items/toy_oboe.gif", "/search/items/?item_name=Oboe"],
  70. "Orange Jelly Guitar": ["https://grundoscafe.b-cdn.net/items/inst_jelly_guitar.gif", "/search/items/?item_name=Orange Jelly Guitar"],
  71. "Piano": ["https://grundoscafe.b-cdn.net/items/toy_piano.gif", "/search/items/?item_name=Piano"],
  72. "Pink Ukulele": ["https://grundoscafe.b-cdn.net/items/pink_ukulele.gif", "/search/items/?item_name=Pink Ukulele"],
  73. "Pink Violin": ["https://grundoscafe.b-cdn.net/items/inst_pink_violin.gif", "/search/items/?item_name=Pink Violin"],
  74. "Plushie Banjo": ["https://grundoscafe.b-cdn.net/items/inst_banjo_plushie.gif", "/search/items/?item_name=Plushie Banjo"],
  75. "Plushie Drum": ["https://grundoscafe.b-cdn.net/items/inst_drum_plushie.gif", "/search/items/?item_name=Plushie Drum"],
  76. "Plushie Trumpet": ["https://grundoscafe.b-cdn.net/items/inst_trumpet_plushie.gif", "/search/items/?item_name=Plushie Trumpet"],
  77. "Rainbow Guitar": ["https://grundoscafe.b-cdn.net/items/inst_rainbow_guitar.gif", "/search/items/?item_name=Rainbow Guitar"],
  78. "Recorder": ["https://grundoscafe.b-cdn.net/items/toy_recorder.gif", "/search/items/?item_name=Recorder"],
  79. "Red Moehawk Guitar": ["https://grundoscafe.b-cdn.net/items/moehawk_guitar1.gif", "/search/items/?item_name=Red Moehawk Guitar"],
  80. "Saxophone": ["https://grundoscafe.b-cdn.net/items/toy_saxaphone.gif", "/search/items/?item_name=Saxophone"],
  81. "Spirited Fiddle": ["https://grundoscafe.b-cdn.net/items/mus_fiddle.gif", "/search/items/?item_name=Spirited Fiddle"],
  82. "Stone Trumpet": ["https://grundoscafe.b-cdn.net/items/inst_stone_trumpet.gif", "/search/items/?item_name=Stone Trumpet"],
  83. "Trombone": ["https://grundoscafe.b-cdn.net/items/toy_trombone.gif", "/search/items/?item_name=Trombone"],
  84. "Trumpet": ["https://grundoscafe.b-cdn.net/items/toy_trumpet.gif", "/search/items/?item_name=Trumpet"],
  85. "Valentine Guitar": ["https://grundoscafe.b-cdn.net/items/inst_valentineguitar.gif", "/search/items/?item_name=Valentine Guitar"],
  86. "Valentine Kazoo": ["https://grundoscafe.b-cdn.net/items/inst_valentinekazoo.gif", "/search/items/?item_name=Valentine Kazoo"],
  87. "Valentine Piano": ["https://grundoscafe.b-cdn.net/items/inst_valentinepiano.gif", "/search/items/?item_name=Valentine Piano"],
  88. "Viola Caipira": ["https://grundoscafe.b-cdn.net/items/mus_violacaipira.gif", "/search/items/?item_name=Viola Caipira"],
  89. "Violin": ["https://grundoscafe.b-cdn.net/items/toy_violin.gif", "/search/items/?item_name=Violin"],
  90. "Wadjet Saxophone": ["https://grundoscafe.b-cdn.net/items/mus_wadjet_saxophone.gif", "/search/items/?item_name=Wadjet Saxophone"],
  91. "Wock Til You Drop Guitar": ["https://grundoscafe.b-cdn.net/items/special_wock_guitar.gif", "/search/items/?item_name=Wock Til You Drop Guitar"],
  92. "Wooden Washboard": ["https://grundoscafe.b-cdn.net/items/mus_washboard.gif", "/search/items/?item_name=Wooden Washboard"],
  93. }
  94.  
  95.  
  96. // Find all displayed instruments and missing instruments
  97. const displayedInstruments = Array.from(document.querySelectorAll('.instrument-name')).map(el => el.textContent.trim());
  98. const missingInstruments = Object.keys(instrumentData).filter(instrument => !displayedInstruments.includes(instrument));
  99.  
  100. // Highlight completed instruments
  101. document.querySelectorAll('.instrument-item').forEach(item => {
  102. const skillLevelElement = item.querySelector('.instrument-skill-level');
  103. if (skillLevelElement && skillLevelElement.textContent.trim() === 'Skill Level: 100%') {
  104. item.style.border = '3px solid #32CD32'; // Apply LimeGreen border
  105. }
  106. });
  107.  
  108. // Add search links for needed instruments
  109. document.querySelectorAll('.instrument-item').forEach(item => {
  110. const nameElement = item.querySelector('.instrument-name');
  111. const instrumentName = nameElement?.textContent.trim();
  112.  
  113. const isNeeded = !item.classList.contains('completed');
  114.  
  115. if (isNeeded && instrumentName) {
  116. const linksHTML = `
  117. <div id="${instrumentName.replace(/\s+/g, '-')}-links" class="searchhelp" style="display: block; unicode-bidi: isolate;">
  118. <a href="/market/wizard/?query=${encodeURIComponent(instrumentName)}&amp;submit" title="Search the Shop Wizard" target="_blank">
  119. <img title="Search the Shop Wizard" alt="Shop Wizard Search" class="search-helper-sw" src="https://grundoscafe.b-cdn.net/searchicons/wiz.png">
  120. </a>
  121. <a href="/safetydeposit/?page=1&amp;query=${encodeURIComponent(instrumentName)}&amp;exact=1" target="_blank">
  122. <img class="search-helper-sdb" title="Search Safety Deposit Box" src="https://grundoscafe.b-cdn.net/searchicons/sdb.png">
  123. </a>
  124. <a href="/island/tradingpost/browse/?query=${encodeURIComponent(instrumentName)}" title="Search Trading Post" target="_blank">
  125. <img class="search-helper-trading-post" src="https://grundoscafe.b-cdn.net/searchicons/trade.png">
  126. </a>
  127. <a href="/wishlist/search/?query=${encodeURIComponent(instrumentName)}" title="Search Wishlists" target="_blank">
  128. <img class="search-helper-wish-witch" src="https://grundoscafe.b-cdn.net/searchicons/wish.png">
  129. </a>
  130. <a href="/auctions/genie/?type=process_genie&amp;query=${encodeURIComponent(instrumentName)}&amp;criteria=exact" title="Search Auctions" target="_blank">
  131. <img class="search-helper-auctions" src="https://grundoscafe.b-cdn.net/searchicons/auction.png">
  132. </a>
  133. <a href="javascript:void(0);" title="Add Item To Wishlist" onclick="submitWish('${instrumentName}');">
  134. <img class="search-helper-wish-witch-add" src="https://grundoscafe.b-cdn.net/searchicons/wish_add_green.png">
  135. </a>
  136. <a href="/search/items/?item_name=${encodeURIComponent(instrumentName)}" title="View Item Details in Item Search" target="_blank">
  137. <img class="search-helper-item-search" src="https://grundoscafe.b-cdn.net/searchicons/search.png">
  138. </a>
  139. <a href="/viewshop/?shop_id=84" title="Check Shop" target="_blank">
  140. <img class="search-helper-shop sh-shop-84" src="https://grundoscafe.b-cdn.net/searchicons/shop.png">
  141. </a>
  142. <a href="https://virtupets.net/search?q=${encodeURIComponent(instrumentName)}" target="_blank">
  143. <img src="https://virtupets.net/assets/images/vp.png" alt="Virtupets" style="width: 20px;">
  144. </a>
  145. </div>
  146. `;
  147.  
  148. nameElement.insertAdjacentHTML('afterend', linksHTML);
  149. }
  150. });
  151.  
  152. // Display missing instruments
  153. if (missingInstruments.length > 0) {
  154. const missingContainer = document.createElement('div');
  155. missingContainer.className = 'missing-instruments-grid';
  156. missingContainer.style.display = 'grid';
  157. missingContainer.style.gridTemplateColumns = 'repeat(auto-fill, minmax(120px, 1fr))';
  158. missingContainer.style.gap = '8px';
  159. missingContainer.style.marginTop = '20px';
  160. missingContainer.style.padding = '15px';
  161. missingContainer.style.backgroundColor = '#f9f9f9';
  162. missingContainer.style.border = '1px solid #ccc';
  163. missingContainer.style.borderRadius = '8px';
  164.  
  165. const title = document.createElement('h2');
  166. title.textContent = "Missing Instruments";
  167. title.style.textAlign = 'center';
  168. title.style.gridColumn = 'span 4';
  169. missingContainer.appendChild(title);
  170.  
  171. missingInstruments.forEach(instrument => {
  172. const cardLink = document.createElement('a');
  173. cardLink.href = instrumentData[instrument][1];
  174. cardLink.target = "_blank";
  175. cardLink.style.textDecoration = 'none';
  176. cardLink.style.color = 'inherit';
  177.  
  178. const card = document.createElement('div');
  179. card.style.display = 'flex';
  180. card.style.flexDirection = 'column';
  181. card.style.alignItems = 'center';
  182. card.style.textAlign = 'center';
  183. card.style.padding = '10px';
  184. card.style.border = '1px solid #ccc';
  185. card.style.borderRadius = '8px';
  186. card.style.backgroundColor = '#fff';
  187.  
  188. const image = document.createElement('img');
  189. image.src = instrumentData[instrument][0];
  190. image.alt = instrument;
  191. image.style.width = '60px';
  192. image.style.height = '60px';
  193. image.style.marginBottom = '20px';
  194.  
  195. const name = document.createElement('div');
  196. name.textContent = instrument;
  197. name.style.fontWeight = 'bold';
  198. name.style.paddingBottom = '5px';
  199.  
  200. const links = document.createElement('div');
  201. links.id = `${instrument.replace(/\s+/g, '-')}-links`;
  202. links.className = 'searchhelp';
  203. links.style.display = 'block';
  204. links.style.unicodeBidi = 'isolate';
  205. links.innerHTML = `
  206. <a href="/market/wizard/?query=${encodeURIComponent(instrument)}&amp;submit" title="Search the Shop Wizard" target="_blank">
  207. <img title="Search the Shop Wizard" alt="Shop Wizard Search" class="search-helper-sw" src="https://grundoscafe.b-cdn.net/searchicons/wiz.png">
  208. </a>
  209. <a href="/safetydeposit/?page=1&amp;query=${encodeURIComponent(instrument)}&amp;exact=1" target="_blank">
  210. <img class="search-helper-sdb" title="Search Safety Deposit Box" src="https://grundoscafe.b-cdn.net/searchicons/sdb.png">
  211. </a>
  212. <a href="/island/tradingpost/browse/?query=${encodeURIComponent(instrument)}" title="Search Trading Post" target="_blank">
  213. <img class="search-helper-trading-post" src="https://grundoscafe.b-cdn.net/searchicons/trade.png">
  214. </a>
  215. <a href="/wishlist/search/?query=${encodeURIComponent(instrument)}" title="Search Wishlists" target="_blank">
  216. <img class="search-helper-wish-witch" src="https://grundoscafe.b-cdn.net/searchicons/wish.png">
  217. </a>
  218. <a href="/auctions/genie/?type=process_genie&amp;query=${encodeURIComponent(instrument)}&amp;criteria=exact" title="Search Auctions" target="_blank">
  219. <img class="search-helper-auctions" src="https://grundoscafe.b-cdn.net/searchicons/auction.png">
  220. </a>
  221. <a href="javascript:void(0);" title="Add Item To Wishlist" onclick="submitWish('${instrument}');">
  222. <img class="search-helper-wish-witch-add" src="https://grundoscafe.b-cdn.net/searchicons/wish_add_green.png">
  223. </a>
  224. <a href="/search/items/?item_name=${encodeURIComponent(instrument)}" title="View Item Details in Item Search" target="_blank">
  225. <img class="search-helper-item-search" src="https://grundoscafe.b-cdn.net/searchicons/search.png">
  226. </a>
  227. <a href="/viewshop/?shop_id=84" title="Check Shop" target="_blank">
  228. <img class="search-helper-shop sh-shop-84" src="https://grundoscafe.b-cdn.net/searchicons/shop.png">
  229. </a>
  230. <a href="https://virtupets.net/search?q=${encodeURIComponent(instrument)}" target="_blank">
  231. <img src="https://virtupets.net/assets/images/vp.png" alt="Virtupets" style="width: 20px;">
  232. </a>
  233. `;
  234.  
  235. card.appendChild(image);
  236. card.appendChild(name);
  237. card.appendChild(links);
  238. cardLink.appendChild(card);
  239. missingContainer.appendChild(cardLink);
  240. });
  241.  
  242. const instrumentsGrid = document.querySelector('.instruments-grid');
  243. if (instrumentsGrid) {
  244. instrumentsGrid.parentNode.insertBefore(missingContainer, instrumentsGrid.nextSibling);
  245. }
  246. }
  247. })();