Sleazy Fork is available in English.

Cellcraft Extras Script

Cellcraft Add All Item Hiden

אין להתקין סקריפט זה ישירות. זוהי ספריה עבור סקריפטים אחרים // @require https://update.sleazyfork.org/scripts/473105/1235474/Cellcraft%20Extras%20Script.js

  1. // ==UserScript==
  2. // @name Cellcraft Extras Script
  3. // @namespace Add Hiden Item
  4. // @version 0.1
  5. // @description Cellcraft Add All Item Hiden
  6. // @author Huy
  7. // @match https://cellcraft.io/
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=cellcraft.io
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (() => {
  13. addHiddenItems: {
  14. function createShopItem(
  15. title,
  16. price,
  17. prodId,
  18. type,
  19. tooltip,
  20. picture,
  21. time = null
  22. ) {
  23. const skinCard = document.createElement('div');
  24. skinCard.classList.add('skin-card');
  25.  
  26. const skinDiv = document.createElement('div');
  27. skinDiv.classList.add('skin');
  28.  
  29. if (time) {
  30. const timeDiv = document.createElement('div');
  31. timeDiv.classList.add('time');
  32. timeDiv.innerText = time;
  33. skinDiv.appendChild(timeDiv);
  34. }
  35.  
  36. const productImage = document.createElement('img');
  37. productImage.src = picture;
  38.  
  39. skinDiv.appendChild(productImage);
  40.  
  41. const infoDiv = document.createElement('div');
  42. infoDiv.classList.add('info');
  43.  
  44. const infoTitle = document.createElement('p');
  45. infoTitle.classList.add('title');
  46. infoTitle.innerText = title;
  47.  
  48. const infoPrice = document.createElement('p');
  49. infoPrice.classList.add('price');
  50.  
  51. const coinI = document.createElement('i');
  52. coinI.classList.add('fas', 'fa-coins');
  53.  
  54. infoPrice.appendChild(coinI);
  55. infoPrice.appendChild(new Text(price.toString()));
  56.  
  57. const buttonsDiv = document.createElement('div');
  58. buttonsDiv.classList.add('buttons');
  59.  
  60. const infoBtn = document.createElement('button');
  61. infoBtn.classList.add('btn', 'info', 'small');
  62. infoBtn.onclick = () => {
  63. window.itemInfoAlert(title, tooltip);
  64. };
  65.  
  66. const infoButtonIcon = document.createElement('i');
  67. infoButtonIcon.classList.add('fas', 'fa-info-circle');
  68.  
  69. infoBtn.appendChild(infoButtonIcon);
  70.  
  71. const buyButton = document.createElement('button');
  72. buyButton.classList.add('btn', 'success', 'small');
  73. buyButton.onclick = () => {
  74. window.warnBeforeBuy(
  75. type,
  76. 'coins',
  77. price.toString(),
  78. `${title}${time ? ` | ${time}` : ''}`,
  79. prodId.toString()
  80. );
  81. };
  82.  
  83. buyButton.appendChild(new Text('Buy'));
  84.  
  85. buttonsDiv.appendChild(infoBtn);
  86. buttonsDiv.appendChild(buyButton);
  87.  
  88. infoDiv.appendChild(infoTitle);
  89. infoDiv.appendChild(infoPrice);
  90. infoDiv.appendChild(buttonsDiv);
  91.  
  92. skinCard.appendChild(skinDiv);
  93. skinCard.appendChild(infoDiv);
  94.  
  95. return skinCard;
  96. }
  97.  
  98. const minionsDiv = document.querySelector(
  99. 'div.shop-page.minions > div.skin-cards'
  100. );
  101. const itemsDiv = document.querySelector(
  102. 'div.shop-page.runes > div.skin-cards'
  103. );
  104.  
  105. function addItemToShop(
  106. targetDiv,
  107. title,
  108. price,
  109. prodId,
  110. type,
  111. tooltip,
  112. picture,
  113. time = null
  114. ) {
  115. const elm = createShopItem(
  116. title,
  117. price,
  118. prodId,
  119. type,
  120. tooltip,
  121. picture,
  122. time
  123. );
  124. /** @type { HTMLParagraphElement | null } */
  125. let lowest = null;
  126. for (const child of targetDiv.children) {
  127. /** @type { HTMLParagraphElement | null } */
  128. let npriceElm = child.querySelector('p.price');
  129. if (!npriceElm) {
  130. continue;
  131. }
  132. let nprice = parseInt(npriceElm.innerText);
  133. if (isNaN(nprice)) {
  134. continue;
  135. }
  136. let oprice = lowest
  137. ? parseInt(lowest.querySelector('p.price').innerText)
  138. : Infinity;
  139.  
  140. if (nprice < oprice && nprice > price) {
  141. lowest = child;
  142. }
  143. }
  144. if (!lowest) {
  145. targetDiv.appendChild(elm);
  146. } else {
  147. targetDiv.insertBefore(elm, lowest);
  148. }
  149. }
  150. addHiddenMinions: {
  151. addItemToShop(
  152. minionsDiv,
  153. '50 Minions',
  154. 150,
  155. 3,
  156. 'minions',
  157. 'These 50 minions will follow you around the map, and gain you mass for 2 hours. You can control them with the keybinds set in the settings.',
  158. 'https://cdn0.iconfinder.com/data/icons/famous-character-vol-1-colored/48/JD-06-512.png',
  159. '2 Hours'
  160. );
  161. addItemToShop(
  162. minionsDiv,
  163. '50 Minions',
  164. 300,
  165. 15,
  166. 'minions',
  167. 'These 50 minions will follow you around the map, and gain you mass for 8 hours. You can control them with the keybinds set in the settings.',
  168. 'https://cdn0.iconfinder.com/data/icons/famous-character-vol-1-colored/48/JD-06-512.png',
  169. '8 Hours'
  170. );
  171. addItemToShop(
  172. minionsDiv,
  173. '80 Minions',
  174. 300,
  175. 4,
  176. 'minions',
  177. 'These 80 minions will follow you around the map, and gain you mass for 4 hours. You can control them with the keybinds set in the settings.',
  178. 'https://cdn0.iconfinder.com/data/icons/famous-character-vol-1-colored/48/JD-06-512.png',
  179. '4 Hours'
  180. );
  181. addItemToShop(
  182. minionsDiv,
  183. '100 Minions',
  184. 700,
  185. 9,
  186. 'minions',
  187. 'These 100 minions will follow you around the map, and gain you mass for 24 hours. You can control them with the keybinds set in the settings.',
  188. 'https://cdn0.iconfinder.com/data/icons/famous-character-vol-1-colored/48/JD-06-512.png',
  189. '24 Hours'
  190. );
  191. addItemToShop(
  192. minionsDiv,
  193. '125 Minions',
  194. 900,
  195. 10,
  196. 'minions',
  197. 'These 125 minions will follow you around the map, and gain you mass for 48 hours. You can control them with the keybinds set in the settings.',
  198. 'https://cdn0.iconfinder.com/data/icons/famous-character-vol-1-colored/48/JD-06-512.png',
  199. '48 Hours'
  200. );
  201. addItemToShop(
  202. minionsDiv,
  203. '300 Minions',
  204. 2000,
  205. 11,
  206. 'minions',
  207. 'These 300 minions will follow you around the map, and gain you mass for 72 hours. You can control them with the keybinds set in the settings.',
  208. 'https://cdn0.iconfinder.com/data/icons/famous-character-vol-1-colored/48/JD-06-512.png',
  209. '72 Hours'
  210. );
  211. addItemToShop(
  212. minionsDiv,
  213. '100XL Minions',
  214. 800,
  215. 8,
  216. 'minions',
  217. 'These 100 XXL minions will follow you around the map, and gain you mass for 1 hour. You can control them with the keybinds set in the settings.',
  218. 'https://cdn0.iconfinder.com/data/icons/famous-character-vol-1-colored/48/JD-06-512.png',
  219. '1 Hour'
  220. );
  221. addItemToShop(
  222. minionsDiv,
  223. '100XL Minions',
  224. 2500,
  225. 12,
  226. 'minions',
  227. 'These 100 XXL minions will follow you around the map, and gain you mass for 24 hours. You can control them with the keybinds set in the settings.',
  228. 'https://cdn0.iconfinder.com/data/icons/famous-character-vol-1-colored/48/JD-06-512.png',
  229. '24 Hours'
  230. );
  231. addItemToShop(
  232. minionsDiv,
  233. '500XL Minions',
  234. 3000,
  235. 16,
  236. 'minions',
  237. 'These 500 XXL minions will follow you around the map, and gain you mass for 24 hours. You can control them with the keybinds set in the settings.',
  238. 'https://cdn0.iconfinder.com/data/icons/famous-character-vol-1-colored/48/JD-06-512.png',
  239. '24 Hours'
  240. );
  241. }
  242. addItems: {
  243. let ogShop = [];
  244. for (const child of itemsDiv.children) {
  245. try {
  246. const infoBtn = child.querySelector(
  247. 'button.btn.info.small'
  248. );
  249. const buyBtn = child.querySelector(
  250. 'button.btn.success.small'
  251. );
  252. const imgSrc = child.querySelector('img').src;
  253. const infoJSON = JSON.parse(
  254. infoBtn.getAttribute('item-info')
  255. );
  256. const buyJSON = JSON.parse(
  257. buyBtn.getAttribute('warn-before-buy')
  258. );
  259. console.log(parseInt(buyJSON.price));
  260. ogShop.push([
  261. infoJSON.title,
  262. parseInt(buyJSON.price),
  263. parseInt(buyJSON.prodId),
  264. buyJSON.type,
  265. infoJSON.text,
  266. imgSrc,
  267. ]);
  268. } catch (e) {}
  269. }
  270. itemsDiv.innerHTML = '';
  271. for (const ogShopItem of ogShop) {
  272. addItemToShop(itemsDiv, ...ogShopItem);
  273. }
  274. addItemToShop(
  275. itemsDiv,
  276. 'Virus',
  277. 380,
  278. 7,
  279. 'items',
  280. 'Virus',
  281. 'https://cellcraft.io/img/inventory/virus.png'
  282. );
  283. addItemToShop(
  284. itemsDiv,
  285. 'Mothercell',
  286. 380,
  287. 8,
  288. 'items',
  289. 'Mothercell',
  290. 'https://cellcraft.io/img/inventory/mothercell.png'
  291. );
  292. addItemToShop(
  293. itemsDiv,
  294. 'Freeze Ability',
  295. 290,
  296. 18,
  297. 'items',
  298. 'Freeze Ability',
  299. 'https://cellcraft.io/img/freeze.png'
  300. );
  301. addItemToShop(
  302. itemsDiv,
  303. '2x Spawn Mass',
  304. 300,
  305. 20,
  306. 'items',
  307. '2x Spawn Mass',
  308. 'https://cdn.discordapp.com/attachments/376498148358750209/694875968522813480/wjzVz167eGDWdGVRKVnsHpeY32mQkUc9yn6WaJ3jGDMmeh0d6o5c60cUpJ57Y-s1SP79Z1935m_TLaflO5u6WRUC1s0HLqNqplf2.png'
  309. );
  310. addItemToShop(
  311. itemsDiv,
  312. 'Invisibility',
  313. 280,
  314. 22,
  315. 'items',
  316. 'Invisibility',
  317. 'https://cellcraft.io/img/frozen_virus.png'
  318. );
  319. addItemToShop(
  320. itemsDiv,
  321. '2x XP',
  322. 2000,
  323. 23,
  324. 'items',
  325. '2x XP',
  326. 'https://cdn.discordapp.com/attachments/376498148358750209/694875968522813480/wjzVz167eGDWdGVRKVnsHpeY32mQkUc9yn6WaJ3jGDMmeh0d6o5c60cUpJ57Y-s1SP79Z1935m_TLaflO5u6WRUC1s0HLqNqplf2.png'
  327. );
  328. addItemToShop(
  329. itemsDiv,
  330. 'Anti Recombine',
  331. 60,
  332. 34,
  333. 'items',
  334. 'Anti Recombine',
  335. 'https://cellcraft.io/skins/objects/21_lo.png'
  336. );
  337. addItemToShop(
  338. itemsDiv,
  339. 'Anti Freeze',
  340. 60,
  341. 35,
  342. 'items',
  343. 'Anti Freeze',
  344. 'https://cellcraft.io/skins/objects/20_lo.png'
  345. );
  346. }
  347. }
  348. })();