Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 70.61 KB | None | 0 0
  1. // ==UserScript==
  2. // @name BlyatMod Private Version
  3. // @namespace -
  4. // Ligne 2900 pour le insta
  5. // @version 2.0
  6. // @description Purged insta
  7. // @author RoYaL
  8. // @match *://moomoo.io/*
  9. // @match *://sandbox.moomoo.io/*
  10. // @grant GM_xmlhttpRequest
  11. // @require https://greasyfork.org/scripts/368273-msgpack/code/msgpack.js?version=598723
  12. // @require http://code.jquery.com/jquery-3.3.1.min.js
  13. // @require https://code.jquery.com/ui/1.12.0/jquery-ui.min.js
  14. // @require https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.js
  15. // @require https://cdnjs.cloudflare.com/ajax/libs/pako/1.0.10/pako.js
  16. // @run-at document-start
  17. // ==/UserScript==
  18.  
  19. var msgpack5 = msgpack;
  20. if (window.location.href.includes("moomoo")){
  21. $(document).ready(() => {
  22.  
  23. $("#consentBlock").css({display: "none"});
  24. var autoHealSpeed = 77;
  25. var DEFAULT_HAT = 7;
  26. var DEFAULT_WINGS = 18;
  27. var instaKillKey = 116;
  28. var spikeKey = 118;
  29. var trapKey = 102;
  30. var removeMonkeyTail = true;
  31. var askMeAgain = true; //set this to false if the user doesnt want to be asked about hat switching again
  32.  
  33. var allTraps = [];
  34. var CORESTATE = {
  35. inwater: {active: false},
  36. nearenemy: {active: false},
  37. intrap: {active: false},
  38. ipress: {active: false},
  39. };
  40.  
  41. try {
  42. document.getElementById("moomooio_728x90_home").style.display = "none"; //Remove sidney's ads
  43. $("#moomooio_728x90_home").parent().css({display: "none"});
  44. } catch (e) {
  45. console.log("error removing ad");
  46. }
  47.  
  48. unsafeWindow.onbeforeunload = null;
  49.  
  50. unsafeWindow.admob = {
  51. requestInterstitialAd: ()=>{},
  52. showInterstitialAd: ()=>{}
  53. }
  54.  
  55.  
  56. var accessories = [{
  57. id: 12,
  58. name: "Snowball",
  59. price: 1e3,
  60. scale: 105,
  61. xOff: 18,
  62. desc: "no effect"
  63. }, {
  64. id: 9,
  65. name: "Tree Cape",
  66. price: 1e3,
  67. scale: 90,
  68. desc: "no effect"
  69. }, {
  70. id: 10,
  71. name: "Stone Cape",
  72. price: 1e3,
  73. scale: 90,
  74. desc: "no effect"
  75. }, {
  76. id: 3,
  77. name: "Cookie Cape",
  78. price: 1500,
  79. scale: 90,
  80. desc: "no effect"
  81. }, {
  82. id: 8,
  83. name: "Cow Cape",
  84. price: 2e3,
  85. scale: 90,
  86. desc: "no effect"
  87. }, {
  88. id: 11,
  89. name: "Monkey Tail",
  90. price: 2e3,
  91. scale: 97,
  92. xOff: 25,
  93. desc: "Super speed but reduced damage",
  94. spdMult: 1.35,
  95. dmgMultO: .2
  96. }, {
  97. id: 17,
  98. name: "Apple Basket",
  99. price: 3e3,
  100. scale: 80,
  101. xOff: 12,
  102. desc: "slowly regenerates health over time",
  103. healthRegen: 1
  104. }, {
  105. id: 6,
  106. name: "Winter Cape",
  107. price: 3e3,
  108. scale: 90,
  109. desc: "no effect"
  110. }, {
  111. id: 4,
  112. name: "Skull Cape",
  113. price: 4e3,
  114. scale: 90,
  115. desc: "no effect"
  116. }, {
  117. id: 5,
  118. name: "Dash Cape",
  119. price: 5e3,
  120. scale: 90,
  121. desc: "no effect"
  122. }, {
  123. id: 2,
  124. name: "Dragon Cape",
  125. price: 6e3,
  126. scale: 90,
  127. desc: "no effect"
  128. }, {
  129. id: 1,
  130. name: "Super Cape",
  131. price: 8e3,
  132. scale: 90,
  133. desc: "no effect"
  134. }, {
  135. id: 7,
  136. name: "Troll Cape",
  137. price: 8e3,
  138. scale: 90,
  139. desc: "no effect"
  140. }, {
  141. id: 14,
  142. name: "Thorns",
  143. price: 1e4,
  144. scale: 115,
  145. xOff: 20,
  146. desc: "no effect"
  147. }, {
  148. id: 15,
  149. name: "Blockades",
  150. price: 1e4,
  151. scale: 95,
  152. xOff: 15,
  153. desc: "no effect"
  154. }, {
  155. id: 20,
  156. name: "Devils Tail",
  157. price: 1e4,
  158. scale: 95,
  159. xOff: 20,
  160. desc: "no effect"
  161. }, {
  162. id: 16,
  163. name: "Sawblade",
  164. price: 12e3,
  165. scale: 90,
  166. spin: !0,
  167. xOff: 0,
  168. desc: "deal damage to players that damage you",
  169. dmg: .15
  170. }, {
  171. id: 13,
  172. name: "Angel Wings",
  173. price: 15e3,
  174. scale: 138,
  175. xOff: 22,
  176. desc: "slowly regenerates health over time",
  177. healthRegen: 3
  178. }, {
  179. id: 19,
  180. name: "Shadow Wings",
  181. price: 15e3,
  182. scale: 138,
  183. xOff: 22,
  184. desc: "increased movement speed",
  185. spdMult: 1.1
  186. }, {
  187. id: 18,
  188. name: "Blood Wings",
  189. price: 2e4,
  190. scale: 178,
  191. xOff: 26,
  192. desc: "restores health when you deal damage",
  193. healD: .2
  194. }, {
  195. id: 21,
  196. name: "Corrupt X Wings",
  197. price: 2e4,
  198. scale: 178,
  199. xOff: 26,
  200. desc: "deal damage to players that damage you",
  201. dmg: .25
  202. }]
  203.  
  204.  
  205. var hats = hats = [{
  206. id: 45,
  207. name: "Shame!",
  208. dontSell: !0,
  209. price: 0,
  210. scale: 120,
  211. desc: "hacks are for losers"
  212. }, {
  213. id: 51,
  214. name: "Moo Cap",
  215. price: 0,
  216. scale: 120,
  217. desc: "coolest mooer around"
  218. }, {
  219. id: 50,
  220. name: "Apple Cap",
  221. price: 0,
  222. scale: 120,
  223. desc: "apple farms remembers"
  224. }, {
  225. id: 28,
  226. name: "Moo Head",
  227. price: 0,
  228. scale: 120,
  229. desc: "no effect"
  230. }, {
  231. id: 29,
  232. name: "Pig Head",
  233. price: 0,
  234. scale: 120,
  235. desc: "no effect"
  236. }, {
  237. id: 30,
  238. name: "Fluff Head",
  239. price: 0,
  240. scale: 120,
  241. desc: "no effect"
  242. }, {
  243. id: 36,
  244. name: "Pandou Head",
  245. price: 0,
  246. scale: 120,
  247. desc: "no effect"
  248. }, {
  249. id: 37,
  250. name: "Bear Head",
  251. price: 0,
  252. scale: 120,
  253. desc: "no effect"
  254. }, {
  255. id: 38,
  256. name: "Monkey Head",
  257. price: 0,
  258. scale: 120,
  259. desc: "no effect"
  260. }, {
  261. id: 44,
  262. name: "Polar Head",
  263. price: 0,
  264. scale: 120,
  265. desc: "no effect"
  266. }, {
  267. id: 35,
  268. name: "Fez Hat",
  269. price: 0,
  270. scale: 120,
  271. desc: "no effect"
  272. }, {
  273. id: 42,
  274. name: "Enigma Hat",
  275. price: 0,
  276. scale: 120,
  277. desc: "join the enigma army"
  278. }, {
  279. id: 43,
  280. name: "Blitz Hat",
  281. price: 0,
  282. scale: 120,
  283. desc: "hey everybody i'm blitz"
  284. }, {
  285. id: 49,
  286. name: "Bob XIII Hat",
  287. price: 0,
  288. scale: 120,
  289. desc: "like and subscribe"
  290. }, {
  291. id: 8,
  292. name: "Bummle Hat",
  293. price: 100,
  294. scale: 120,
  295. desc: "no effect"
  296. }, {
  297. id: 2,
  298. name: "Straw Hat",
  299. price: 500,
  300. scale: 120,
  301. desc: "no effect"
  302. }, {
  303. id: 15,
  304. name: "Winter Cap",
  305. price: 600,
  306. scale: 120,
  307. desc: "allows you to move at normal speed in snow",
  308. coldM: 1
  309. }, {
  310. id: 5,
  311. name: "Cowboy Hat",
  312. price: 1e3,
  313. scale: 120,
  314. desc: "no effect"
  315. }, {
  316. id: 4,
  317. name: "Ranger Hat",
  318. price: 2e3,
  319. scale: 120,
  320. desc: "no effect"
  321. }, {
  322. id: 18,
  323. name: "Explorer Hat",
  324. price: 2e3,
  325. scale: 120,
  326. desc: "no effect"
  327. }, {
  328. id: 31,
  329. name: "Flipper Hat",
  330. price: 2500,
  331. scale: 120,
  332. desc: "have more control while in water",
  333. watrImm: !0
  334. }, {
  335. id: 1,
  336. name: "Marksman Cap",
  337. price: 3e3,
  338. scale: 120,
  339. desc: "increases arrow speed and range",
  340. aMlt: 1.3
  341. }, {
  342. id: 10,
  343. name: "Bush Gear",
  344. price: 3e3,
  345. scale: 160,
  346. desc: "allows you to disguise yourself as a bush"
  347. }, {
  348. id: 48,
  349. name: "Halo",
  350. price: 3e3,
  351. scale: 120,
  352. desc: "no effect"
  353. }, {
  354. id: 6,
  355. name: "Soldier Helmet",
  356. price: 4e3,
  357. scale: 120,
  358. desc: "reduces damage taken but slows movement",
  359. spdMult: .94,
  360. dmgMult: .75
  361. }, {
  362. id: 23,
  363. name: "Anti Venom Gear",
  364. price: 4e3,
  365. scale: 120,
  366. desc: "makes you immune to poison",
  367. poisonRes: 1
  368. }, {
  369. id: 13,
  370. name: "Medic Gear",
  371. price: 5e3,
  372. scale: 110,
  373. desc: "slowly regenerates health over time",
  374. healthRegen: 3
  375. }, {
  376. id: 9,
  377. name: "Miners Helmet",
  378. price: 5e3,
  379. scale: 120,
  380. desc: "earn 1 extra gold per resource",
  381. extraGold: 1
  382. }, {
  383. id: 32,
  384. name: "Musketeer Hat",
  385. price: 5e3,
  386. scale: 120,
  387. desc: "reduces cost of projectiles",
  388. projCost: .5
  389. }, {
  390. id: 7,
  391. name: "Bull Helmet",
  392. price: 6e3,
  393. scale: 120,
  394. desc: "increases damage done but drains health",
  395. healthRegen: -5,
  396. dmgMultO: 1.5,
  397. spdMult: .96
  398. }, {
  399. id: 22,
  400. name: "Emp Helmet",
  401. price: 6e3,
  402. scale: 120,
  403. desc: "turrets won't attack but you move slower",
  404. antiTurret: 1,
  405. spdMult: .7
  406. }, {
  407. id: 12,
  408. name: "Booster Hat",
  409. price: 6e3,
  410. scale: 120,
  411. desc: "increases your movement speed",
  412. spdMult: 1.16
  413. }, {
  414. id: 26,
  415. name: "Barbarian Armor",
  416. price: 8e3,
  417. scale: 120,
  418. desc: "knocks back enemies that attack you",
  419. dmgK: .6
  420. }, {
  421. id: 21,
  422. name: "Plague Mask",
  423. price: 1e4,
  424. scale: 120,
  425. desc: "melee attacks deal poison damage",
  426. poisonDmg: 5,
  427. poisonTime: 6
  428. }, {
  429. id: 46,
  430. name: "Bull Mask",
  431. price: 1e4,
  432. scale: 120,
  433. desc: "bulls won't target you unless you attack them",
  434. bullRepel: 1
  435. }, {
  436. id: 14,
  437. name: "Windmill Hat",
  438. topSprite: !0,
  439. price: 1e4,
  440. scale: 120,
  441. desc: "generates points while worn",
  442. pps: 1.5
  443. }, {
  444. id: 11,
  445. name: "Spike Gear",
  446. topSprite: !0,
  447. price: 1e4,
  448. scale: 120,
  449. desc: "deal damage to players that damage you",
  450. dmg: .45
  451. }, {
  452. id: 53,
  453. name: "Turret Gear",
  454. topSprite: !0,
  455. price: 1e4,
  456. scale: 120,
  457. desc: "you become a walking turret",
  458. turret: {
  459. proj: 1,
  460. range: 700,
  461. rate: 2500
  462. },
  463. spdMult: .5
  464. }, {
  465. id: 20,
  466. name: "Samurai Armor",
  467. price: 12e3,
  468. scale: 120,
  469. desc: "increased attack speed and fire rate",
  470. atkSpd: .78
  471. }, {
  472. id: 16,
  473. name: "Bushido Armor",
  474. price: 12e3,
  475. scale: 120,
  476. desc: "restores health when you deal damage",
  477. healD: .4
  478. }, {
  479. id: 27,
  480. name: "Scavenger Gear",
  481. price: 15e3,
  482. scale: 120,
  483. desc: "earn double points for each kill",
  484. kScrM: 2
  485. }, {
  486. id: 40,
  487. name: "Tank Gear",
  488. price: 15e3,
  489. scale: 120,
  490. desc: "increased damage to buildings but slower movement",
  491. spdMult: .3,
  492. bDmg: 3.3
  493. }, {
  494. id: 52,
  495. name: "Thief Gear",
  496. price: 15e3,
  497. scale: 120,
  498. desc: "steal half of a players gold when you kill them",
  499. goldSteal: .5
  500. }]
  501.  
  502.  
  503. var objects = [{
  504. id: 0,
  505. name: "food",
  506. layer: 0
  507. }, {
  508. id: 1,
  509. name: "walls",
  510. place: !0,
  511. limit: 30,
  512. layer: 0
  513. }, {
  514. id: 2,
  515. name: "spikes",
  516. place: !0,
  517. limit: 15,
  518. layer: 0
  519. }, {
  520. id: 3,
  521. name: "mill",
  522. place: !0,
  523. limit: 7,
  524. layer: 1
  525. }, {
  526. id: 4,
  527. name: "mine",
  528. place: !0,
  529. limit: 1,
  530. layer: 0
  531. }, {
  532. id: 5,
  533. name: "trap",
  534. place: !0,
  535. limit: 6,
  536. layer: -1
  537. }, {
  538. id: 6,
  539. name: "booster",
  540. place: !0,
  541. limit: 12,
  542. layer: -1
  543. }, {
  544. id: 7,
  545. name: "turret",
  546. place: !0,
  547. limit: 2,
  548. layer: 1
  549. }, {
  550. id: 8,
  551. name: "watchtower",
  552. place: !0,
  553. limit: 12,
  554. layer: 1
  555. }, {
  556. id: 9,
  557. name: "buff",
  558. place: !0,
  559. limit: 4,
  560. layer: -1
  561. }, {
  562. id: 10,
  563. name: "spawn",
  564. place: !0,
  565. limit: 1,
  566. layer: -1
  567. }, {
  568. id: 11,
  569. name: "sapling",
  570. place: !0,
  571. limit: 2,
  572. layer: 0
  573. }, {
  574. id: 12,
  575. name: "blocker",
  576. place: !0,
  577. limit: 3,
  578. layer: -1
  579. }, {
  580. id: 13,
  581. name: "teleporter",
  582. place: !0,
  583. limit: 1,
  584. layer: -1
  585. }]
  586.  
  587. var weapons = [{
  588. id: 0,
  589. type: 0,
  590. name: "tool hammer",
  591. desc: "tool for gathering all resources",
  592. src: "hammer_1",
  593. length: 140,
  594. width: 140,
  595. xOff: -3,
  596. yOff: 18,
  597. dmg: 25,
  598. range: 65,
  599. gather: 1,
  600. speed: 300
  601. }, {
  602. id: 1,
  603. type: 0,
  604. age: 2,
  605. name: "hand axe",
  606. desc: "gathers resources at a higher rate",
  607. src: "axe_1",
  608. length: 140,
  609. width: 140,
  610. xOff: 3,
  611. yOff: 24,
  612. dmg: 30,
  613. spdMult: 1,
  614. range: 70,
  615. gather: 2,
  616. speed: 400
  617. }, {
  618. id: 2,
  619. type: 0,
  620. age: 8,
  621. pre: 1,
  622. name: "great axe",
  623. desc: "deal more damage and gather more resources",
  624. src: "great_axe_1",
  625. length: 140,
  626. width: 140,
  627. xOff: -8,
  628. yOff: 25,
  629. dmg: 35,
  630. spdMult: 1,
  631. range: 75,
  632. gather: 4,
  633. speed: 400
  634. }, {
  635. id: 3,
  636. type: 0,
  637. age: 2,
  638. name: "short sword",
  639. desc: "increased attack power but slower move speed",
  640. src: "sword_1",
  641. iPad: 1.3,
  642. length: 130,
  643. width: 210,
  644. xOff: -8,
  645. yOff: 46,
  646. dmg: 35,
  647. spdMult: .85,
  648. range: 110,
  649. gather: 1,
  650. speed: 300
  651. }, {
  652. id: 4,
  653. type: 0,
  654. age: 8,
  655. pre: 3,
  656. name: "katana",
  657. desc: "greater range and damage",
  658. src: "samurai_1",
  659. iPad: 1.3,
  660. length: 130,
  661. width: 210,
  662. xOff: -8,
  663. yOff: 59,
  664. dmg: 40,
  665. spdMult: .8,
  666. range: 118,
  667. gather: 1,
  668. speed: 300
  669. }, {
  670. id: 5,
  671. type: 0,
  672. age: 2,
  673. name: "polearm",
  674. desc: "long range melee weapon",
  675. src: "spear_1",
  676. iPad: 1.3,
  677. length: 130,
  678. width: 210,
  679. xOff: -8,
  680. yOff: 53,
  681. dmg: 45,
  682. knock: .2,
  683. spdMult: .82,
  684. range: 142,
  685. gather: 1,
  686. speed: 700
  687. }, {
  688. id: 6,
  689. type: 0,
  690. age: 2,
  691. name: "bat",
  692. desc: "fast long range melee weapon",
  693. src: "bat_1",
  694. iPad: 1.3,
  695. length: 110,
  696. width: 180,
  697. xOff: -8,
  698. yOff: 53,
  699. dmg: 20,
  700. knock: .7,
  701. range: 110,
  702. gather: 1,
  703. speed: 300
  704. }, {
  705. id: 7,
  706. type: 0,
  707. age: 2,
  708. name: "daggers",
  709. desc: "really fast short range weapon",
  710. src: "dagger_1",
  711. iPad: .8,
  712. length: 110,
  713. width: 110,
  714. xOff: 18,
  715. yOff: 0,
  716. dmg: 20,
  717. knock: .1,
  718. range: 65,
  719. gather: 1,
  720. hitSlow: .1,
  721. spdMult: 1.13,
  722. speed: 100
  723. }, {
  724. id: 8,
  725. type: 0,
  726. age: 2,
  727. name: "stick",
  728. desc: "great for gathering but very weak",
  729. src: "stick_1",
  730. length: 140,
  731. width: 140,
  732. xOff: 3,
  733. yOff: 24,
  734. dmg: 1,
  735. spdMult: 1,
  736. range: 70,
  737. gather: 7,
  738. speed: 400
  739. }, {
  740. id: 9,
  741. type: 1,
  742. age: 6,
  743. name: "hunting bow",
  744. desc: "bow used for ranged combat and hunting",
  745. src: "bow_1",
  746. req: ["wood", 4],
  747. length: 120,
  748. width: 120,
  749. xOff: -6,
  750. yOff: 0,
  751. projectile: 0,
  752. spdMult: .75,
  753. speed: 600
  754. }, {
  755. id: 10,
  756. type: 1,
  757. age: 6,
  758. name: "great hammer",
  759. desc: "hammer used for destroying structures",
  760. src: "great_hammer_1",
  761. length: 140,
  762. width: 140,
  763. xOff: -9,
  764. yOff: 25,
  765. dmg: 10,
  766. spdMult: .88,
  767. range: 75,
  768. sDmg: 7.5,
  769. gather: 1,
  770. speed: 400
  771. }, {
  772. id: 11,
  773. type: 1,
  774. age: 6,
  775. name: "wooden shield",
  776. desc: "blocks projectiles and reduces melee damage",
  777. src: "shield_1",
  778. length: 120,
  779. width: 120,
  780. shield: .2,
  781. xOff: 6,
  782. yOff: 0,
  783. spdMult: .7
  784. }, {
  785. id: 12,
  786. type: 1,
  787. age: 8,
  788. pre: 9,
  789. name: "crossbow",
  790. desc: "deals more damage and has greater range",
  791. src: "crossbow_1",
  792. req: ["wood", 5],
  793. aboveHand: !0,
  794. armS: .75,
  795. length: 120,
  796. width: 120,
  797. xOff: -4,
  798. yOff: 0,
  799. projectile: 2,
  800. spdMult: .7,
  801. speed: 700
  802. }, {
  803. id: 13,
  804. type: 1,
  805. age: 9,
  806. pre: 12,
  807. name: "repeater crossbow",
  808. desc: "high firerate crossbow with reduced damage",
  809. src: "crossbow_2",
  810. req: ["wood", 10],
  811. aboveHand: !0,
  812. armS: .75,
  813. length: 120,
  814. width: 120,
  815. xOff: -4,
  816. yOff: 0,
  817. projectile: 3,
  818. spdMult: .7,
  819. speed: 300
  820. }, {
  821. id: 14,
  822. type: 1,
  823. age: 6,
  824. name: "mc grabby",
  825. desc: "steals resources from enemies",
  826. src: "grab_1",
  827. length: 130,
  828. width: 210,
  829. xOff: -8,
  830. yOff: 53,
  831. dmg: 0,
  832. steal: 250,
  833. knock: .2,
  834. spdMult: 1.05,
  835. range: 125,
  836. gather: 0,
  837. speed: 700
  838. }, {
  839. id: 15,
  840. type: 1,
  841. age: 9,
  842. pre: 12,
  843. name: "musket",
  844. desc: "slow firerate but high damage and range",
  845. src: "musket_1",
  846. req: ["stone", 10],
  847. aboveHand: !0,
  848. rec: .35,
  849. armS: .6,
  850. hndS: .3,
  851. hndD: 1.6,
  852. length: 205,
  853. width: 205,
  854. xOff: 25,
  855. yOff: 0,
  856. projectile: 5,
  857. hideProjectile: !0,
  858. spdMult: .6,
  859. speed: 1500
  860. }]
  861.  
  862. var activeObjects = [{
  863. name: "apple",
  864. desc: "restores 20 health when consumed",
  865. req: ["food", 10],
  866. consume: function (e) {
  867. return e.changeHealth(20, e)
  868. },
  869. scale: 0.00002,
  870. holdOffset: 0.00001
  871. }, {
  872. age: 3,
  873. name: "cookie",
  874. desc: "restores 40 health when consumed",
  875. req: ["food", 15],
  876. consume: function (e) {
  877. return e.changeHealth(40, e)
  878. },
  879. scale: 0.00002,
  880. holdOffset: 0.00001
  881. }, {
  882. age: 7,
  883. name: "pizza",
  884. desc: "restores 30 health and another 50 over 5 seconds",
  885. req: ["food", 30],
  886. consume: function (e) {
  887. return !!(e.changeHealth(30, e) || e.health < 100) && (e.dmgOverTime.dmg = -10, e.dmgOverTime.doer = e, e.dmgOverTime.time = 5, !0)
  888. },
  889. scale: 27,
  890. holdOffset: 15
  891. }, {
  892. name: "wood wall",
  893. desc: "provides protection for your village",
  894. req: ["wood", 10],
  895. projDmg: !0,
  896. health: 380,
  897. scale: 50,
  898. holdOffset: 20,
  899. placeOffset: -5
  900. }, {
  901. age: 3,
  902. name: "stone wall",
  903. desc: "provides improved protection for your village",
  904. req: ["stone", 25],
  905. health: 900,
  906. scale: 50,
  907. holdOffset: 20,
  908. placeOffset: -5
  909. }, {
  910. age: 7,
  911. pre: 1,
  912. name: "castle wall",
  913. desc: "provides powerful protection for your village",
  914. req: ["stone", 35],
  915. health: 1500,
  916. scale: 52,
  917. holdOffset: 20,
  918. placeOffset: -5
  919. }, {
  920. name: "spikes",
  921. desc: "damages enemies when they touch them",
  922. req: ["wood", 20, "stone", 5],
  923. health: 400,
  924. dmg: 20,
  925. scale: 49,
  926. spritePadding: -23,
  927. holdOffset: 8,
  928. placeOffset: -5
  929. }, {
  930. age: 5,
  931. name: "greater spikes",
  932. desc: "damages enemies when they touch them",
  933. req: ["wood", 30, "stone", 10],
  934. health: 500,
  935. dmg: 35,
  936. scale: 52,
  937. spritePadding: -23,
  938. holdOffset: 8,
  939. placeOffset: -5
  940. }, {
  941. age: 9,
  942. pre: 1,
  943. name: "poison spikes",
  944. desc: "poisons enemies when they touch them",
  945. req: ["wood", 35, "stone", 15],
  946. health: 600,
  947. dmg: 30,
  948. pDmg: 5,
  949. scale: 52,
  950. spritePadding: -23,
  951. holdOffset: 8,
  952. placeOffset: -5
  953. }, {
  954. age: 9,
  955. pre: 2,
  956. name: "spinning spikes",
  957. desc: "damages enemies when they touch them",
  958. req: ["wood", 30, "stone", 20],
  959. health: 500,
  960. dmg: 45,
  961. turnSpeed: .003,
  962. scale: 52,
  963. spritePadding: -23,
  964. holdOffset: 8,
  965. placeOffset: -5
  966. }, {
  967. name: "windmill",
  968. desc: "generates gold over time",
  969. req: ["wood", 50, "stone", 10],
  970. health: 400,
  971. pps: 1,
  972. turnSpeed: .0016,
  973. spritePadding: 25,
  974. iconLineMult: 12,
  975. scale: 45,
  976. holdOffset: 20,
  977. placeOffset: 5
  978. }, {
  979. age: 5,
  980. pre: 1,
  981. name: "faster windmill",
  982. desc: "generates more gold over time",
  983. req: ["wood", 60, "stone", 20],
  984. health: 500,
  985. pps: 1.5,
  986. turnSpeed: .0025,
  987. spritePadding: 25,
  988. iconLineMult: 12,
  989. scale: 47,
  990. holdOffset: 20,
  991. placeOffset: 5
  992. }, {
  993. age: 8,
  994. pre: 1,
  995. name: "power mill",
  996. desc: "generates more gold over time",
  997. req: ["wood", 100, "stone", 50],
  998. health: 800,
  999. pps: 2,
  1000. turnSpeed: .005,
  1001. spritePadding: 25,
  1002. iconLineMult: 12,
  1003. scale: 47,
  1004. holdOffset: 20,
  1005. placeOffset: 5
  1006. }, {
  1007. age: 5,
  1008. type: 2,
  1009. name: "mine",
  1010. desc: "allows you to mine stone",
  1011. req: ["wood", 20, "stone", 100],
  1012. iconLineMult: 12,
  1013. scale: 65,
  1014. holdOffset: 20,
  1015. placeOffset: 0
  1016. }, {
  1017. age: 5,
  1018. type: 0,
  1019. name: "sapling",
  1020. desc: "allows you to farm wood",
  1021. req: ["wood", 150],
  1022. iconLineMult: 12,
  1023. colDiv: .5,
  1024. scale: 110,
  1025. holdOffset: 50,
  1026. placeOffset: -15
  1027. }, {
  1028. age: 4,
  1029. name: "pit trap",
  1030. desc: "pit that traps enemies if they walk over it",
  1031. req: ["wood", 30, "stone", 30],
  1032. trap: !0,
  1033. ignoreCollision: !0,
  1034. hideFromEnemy: !0,
  1035. health: 500,
  1036. colDiv: .2,
  1037. scale: 50,
  1038. holdOffset: 20,
  1039. placeOffset: -5
  1040. }, {
  1041. age: 4,
  1042. name: "boost pad",
  1043. desc: "provides boost when stepped on",
  1044. req: ["stone", 20, "wood", 5],
  1045. ignoreCollision: !0,
  1046. boostSpeed: 1.5,
  1047. health: 150,
  1048. colDiv: .7,
  1049. scale: 45,
  1050. holdOffset: 20,
  1051. placeOffset: -5
  1052. }, {
  1053. age: 7,
  1054. doUpdate: !0,
  1055. name: "turret",
  1056. desc: "defensive structure that shoots at enemies",
  1057. req: ["wood", 200, "stone", 150],
  1058. health: 800,
  1059. projectile: 1,
  1060. shootRange: 700,
  1061. shootRate: 2200,
  1062. scale: 43,
  1063. holdOffset: 20,
  1064. placeOffset: -5
  1065. }, {
  1066. age: 7,
  1067. name: "platform",
  1068. desc: "platform to shoot over walls and cross over water",
  1069. req: ["wood", 20],
  1070. ignoreCollision: !0,
  1071. zIndex: 1,
  1072. health: 300,
  1073. scale: 43,
  1074. holdOffset: 20,
  1075. placeOffset: -5
  1076. }, {
  1077. age: 7,
  1078. name: "healing pad",
  1079. desc: "standing on it will slowly heal you",
  1080. req: ["wood", 30, "food", 10],
  1081. ignoreCollision: !0,
  1082. healCol: 15,
  1083. health: 400,
  1084. colDiv: .7,
  1085. scale: 45,
  1086. holdOffset: 20,
  1087. placeOffset: -5
  1088. }, {
  1089. age: 9,
  1090. name: "spawn pad",
  1091. desc: "you will spawn here when you die but it will dissapear",
  1092. req: ["wood", 100, "stone", 100],
  1093. health: 400,
  1094. ignoreCollision: !0,
  1095. spawnPoint: !0,
  1096. scale: 45,
  1097. holdOffset: 20,
  1098. placeOffset: -5
  1099. }, {
  1100. age: 7,
  1101. name: "blocker",
  1102. desc: "blocks building in radius",
  1103. req: ["wood", 30, "stone", 25],
  1104. ignoreCollision: !0,
  1105. blocker: 300,
  1106. health: 400,
  1107. colDiv: .7,
  1108. scale: 45,
  1109. holdOffset: 20,
  1110. placeOffset: -5
  1111. }, {
  1112. age: 7,
  1113. name: "teleporter",
  1114. desc: "teleports you to a random point on the map",
  1115. req: ["wood", 60, "stone", 60],
  1116. ignoreCollision: !0,
  1117. teleport: !0,
  1118. health: 200,
  1119. colDiv: .7,
  1120. scale: 45,
  1121. holdOffset: 20,
  1122. placeOffset: -5
  1123. }];
  1124.  
  1125. var allContainers = [accessories, hats, objects, weapons, activeObjects];
  1126. function obs(objName){
  1127. for (let container of allContainers){
  1128. for (let obj of container){
  1129. if (obj.name.toLowerCase() == objName.toLowerCase()){
  1130. return obj.id;
  1131. }
  1132. }
  1133. }
  1134.  
  1135. return -1;
  1136.  
  1137. }
  1138.  
  1139. function activeObs(objName){
  1140. for (var i=0;i<activeObjects.length;i++){
  1141. let activeObj = activeObjects[i];
  1142. if (activeObj.name.toLowerCase() == objName.toLowerCase()){
  1143. return i;
  1144. }
  1145.  
  1146. }
  1147. }
  1148.  
  1149.  
  1150.  
  1151. var switchToHat = obs("bull helmet");
  1152. var switchToAccessory = obs("blood wings");
  1153. var switchToWep = obs("polearm");
  1154. var switchToRange = obs("crossbow");
  1155. var bullHelm = obs("bull helmet");
  1156. var monkeyTail = obs("monkey tail");
  1157. var turretGear = obs("Turret Gear");
  1158.  
  1159. var invalidHats = [obs("shame!")]
  1160. console.log(invalidHats);
  1161.  
  1162.  
  1163.  
  1164. const START_SSWX = [146, 161, 99, 146, 1, 192]
  1165. var noallow = false;
  1166. const END_SSWX = [146, 161, 99, 146, 0, 192];
  1167. const TAKEOUT = [4, 132, 164, 116, 121, 112, 101, 2, 164, 100, 97, 116, 97, 147, 161, 53, 15, 212, 0, 0, 167, 111, 112, 116, 105, 111, 110, 115, 129, 168, 99, 111, 109, 112, 114, 101, 115, 115, 195, 163, 110, 115, 112, 161, 47];
  1168. const APPLE = [4, 132, 164, 116, 121, 112, 101, 2, 164, 100, 97, 116, 97, 147, 161, 53, 0, 212, 0, 0, 167, 111, 112, 116, 105, 111, 110, 115, 129, 168, 99, 111, 109, 112, 114, 101, 115, 115, 195, 163, 110, 115, 112, 161, 47];
  1169. const COOKIE = [4, 132, 164, 116, 121, 112, 101, 2, 164, 100, 97, 116, 97, 147, 161, 53, 1, 212, 0, 0, 167, 111, 112, 116, 105, 111, 110, 115, 129, 168, 99, 111, 109, 112, 114, 101, 115, 115, 195, 163, 110, 115, 112, 161, 47];
  1170. const PIZZA = [97, 117, 116, 111, 115, 112, 101, 101, 100]
  1171. var currentHat = 0;
  1172. var currentAccessory = 0;
  1173. var IN_PROCESS = false;
  1174. var justDied = false;
  1175. var recentHealth = 100;
  1176. var ws;
  1177. var MYID;
  1178. var hasApple = true;
  1179. var foodInHand = false;
  1180. var autoheal = true;
  1181. var autobull = true;
  1182. var STATE = 0;
  1183. var inInstaProcess = false;
  1184. var autoattack = false;
  1185. var allMooMooObjects = {};
  1186. var bowWorked = false;
  1187. var hasWinter = false;
  1188. var hasFlipper = false;
  1189. var myCLAN = null;
  1190. var goodData;
  1191. var myPlayer;
  1192. var nearestPlayerAngle = 0;
  1193. var focusPlayerObj;
  1194. var MYANGLE = 0;
  1195. let coregood = [212, 0, 0, 167, 111, 112, 116, 105, 111, 110, 115, 129, 168, 99, 111, 109, 112];
  1196. var targets = [false, false];
  1197.  
  1198.  
  1199. let badreplace = [130, 166, 98, 117, 102, 102, 101, 114, 130, 164, 116, 121, 112, 101, 166, 66, 117, 102, 102, 101, 114, 164, 100, 97, 116, 97, 145, 0, 164, 116, 121, 112, 101, 0]
  1200. document.msgpack = msgpack;
  1201. function n(){
  1202. this.buffer = new Uint8Array([0]);
  1203. this.buffer.__proto__ = new Uint8Array;
  1204. this.type = 0;
  1205. }
  1206.  
  1207. var nval = msgpack5.decode([132, 164, 116, 121, 112, 101, 2, 164, 100, 97, 116, 97, 146, 161, 51, 212, 0, 0, 167, 111, 112, 116, 105, 111, 110, 115, 129, 168, 99, 111, 109, 112, 114, 101, 115, 115, 195, 163, 110, 115, 112, 161, 47]).data[1];
  1208. document.n = nval;
  1209. document.timeTween = 130;
  1210.  
  1211. function replaceFromArray(oldp, newp, array){
  1212. return array.join(",").replace(oldp.join(","), newp.join(",")).split(",").map(x => parseInt(x))
  1213.  
  1214. }
  1215.  
  1216. var playersNear = [];
  1217.  
  1218. var player = function(id, x, y, clan){
  1219. this.id = id;
  1220. this.x = x;
  1221. this.y = y;
  1222. this.clan = clan;
  1223. }
  1224.  
  1225. var repeatingLast = false;
  1226. var lastWords = "";
  1227.  
  1228. var styleSheetObj = document.createElement("link");
  1229. styleSheetObj.rel = "stylesheet";
  1230. styleSheetObj.href = "https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.css"
  1231. document.head.appendChild(styleSheetObj);
  1232.  
  1233. var settingsDiv = document.createElement('div');
  1234. var settingsSlider = document.createElement('input');
  1235. var itemTitle = document.createElement("h1");
  1236. var currentSpeed = document.createElement("h2");
  1237. var speedContain = document.createElement("div");
  1238. settingsSlider.type = "range";
  1239. settingsSlider.min = "12";
  1240. settingsSlider.max = "99";
  1241. settingsSlider.value = "50";
  1242. settingsSlider.id = "healSlider";
  1243. itemTitle.innerText = "AutoHeal Speed";
  1244. currentSpeed.innerHTML = '<div id="cspeed">Current Speed »</div> <div id="numfocus">50</div>';
  1245. currentSpeed.id = "currentSpeed";
  1246. speedContain.id = "speedContain";
  1247. itemTitle.id = "itemTitle";
  1248. settingsDiv.appendChild(settingsSlider);
  1249. speedContain.appendChild(currentSpeed);
  1250. /*document.querySelector("#setupCard").appendChild(itemTitle);
  1251. document.querySelector("#setupCard").appendChild(settingsDiv);
  1252. document.querySelector("#setupCard").appendChild(speedContain);
  1253. $("#healSlider").css({width: "100%", marginTop: 10});
  1254. $("#itemTitle").css({fontWeight: '100', fontSize: 25, width: "100%", textAlign: "center", fontFamily: "sans-serif"});*/
  1255.  
  1256. var targetbtn = document.createElement("img");
  1257. targetbtn.src = "https://i.imgur.com/gWzcwQR.png";
  1258. targetbtn.id = "tbtn";
  1259. document.body.prepend(targetbtn);
  1260.  
  1261. $("#healSlider").change((event, ui) => {
  1262. let coreVal = parseInt($("#healSlider").val());
  1263. autoHealSpeed = 150 - coreVal;
  1264. currentSpeed.innerHTML = `<div id="cspeed">Current Speed »</div> <div id="numfocus">${coreVal}</div>`;
  1265. })
  1266.  
  1267. function generateHatHTML(name, id){
  1268. return `<div id="flextop"><img id="hatimgmain" src="http://moomoo.io/img/hats/hat_${id}.png">
  1269. <h1 id="changeAlert">Biome Hat Changed!</h1></div>
  1270. <h3 id="typealert">Your hat was automatically changed to the <span id="hatname">${name}</span></h3>
  1271.  
  1272. <div id="flexlow">
  1273. <button id="sback">Switch Back!</button> <button id="okbtn">OK</button>
  1274. </div>`
  1275. }
  1276.  
  1277. var menuChange = document.createElement("div");
  1278. menuChange.className = "menuCard";
  1279. menuChange.id = "mainSettings";
  1280. menuChange.innerHTML = `
  1281. <h1 id="settingsTitle">CloudyMod Settings</h1>
  1282. <div class="flexControl">
  1283. <h3 class="menuPrompt">Insta-kill when I press: </h3> <input value="${String.fromCharCode(instaKillKey)}" id="keyPress" maxlength="1" type="text"/>
  1284. </div>
  1285. <hr/>
  1286. <h3 class="menuPrompt">When I attack, put on:</h3>
  1287. <div id="choiceWrap">
  1288. <div class="selectObj" id="selectHat"> <img id="hatprev" class="selPrev" src="http://moomoo.io/img/hats/hat_${DEFAULT_HAT}.png"/> </div>
  1289. <img id="middlePlus" src="https://i.imgur.com/Sya0CZr.png"/>
  1290. <div class="selectObj" id="selectWings"> <img id="wingprev" class="selPrev" src="http://moomoo.io/img/accessories/access_${DEFAULT_WINGS}.png"/> </div>
  1291. </div>
  1292. <div id="mnwrap">
  1293. <h3 class="menuPrompt" id="rmvMonkey">Remove monkey tail?</h3> <input id="removeMonkey" maxlength="1" ${removeMonkeyTail ? "checked" : ""} type="checkbox"/>
  1294. </div>
  1295. <hr/>
  1296. <h3 class="menuPrompt lowprompt">Custom hotkeys:</h3>
  1297. <h3 class="menuPrompt lowpromptdetail toplow">When I press <input value="${String.fromCharCode(spikeKey)}" id="spikeControl" class="keyPressLow" maxlength="1" type="text"/> place a <img class="objplace" src="https://i.imgur.com/0wiUP4V.png"/></h3>
  1298. <h3 class="menuPrompt lowpromptdetail">When I press <input value="${String.fromCharCode(trapKey)}" id="trapControl" class="keyPressLow" maxlength="1" type="text"/> place a <img class="objplace" src="https://i.imgur.com/mHWrRQV.png"/></h3>
  1299. <hr id="hrule"/>
  1300. <div id="endwrap">
  1301. <h3 id="createdEnd">Created by Cloudy#9558 | <a href="https://discordapp.com/invite/s4F4wZh">Join My Discord</a></h3>
  1302. </div>
  1303. `
  1304. //document.querySelector("#menuCardHolder").prepend(menuChange);
  1305.  
  1306. var hatChangeAlert = document.createElement("div");
  1307. hatChangeAlert.id = "hatChangeAlert";
  1308. document.body.prepend(hatChangeAlert);
  1309.  
  1310. $("#selectHat").click( () => {
  1311. let allHats = [];
  1312. for (var i=0;i<hats.length;i++){
  1313. if (invalidHats.includes(hats[i].id)) continue;
  1314. allHats.push(`<div objid=${hats[i].id} class="selectObjAlert ${hats[i].id == switchToHat ? "chosenhat" : ""} inalertHat"> <img class="selPrev" src="http://moomoo.io/img/hats/hat_${hats[i].id}.png"/> </div>`);
  1315. }
  1316. $.alert({
  1317. title: "Choose Your Hat!",
  1318. content: allHats,
  1319. useBootstrap: false,
  1320. buttons: {
  1321. cancel: () => {},
  1322. confirm: () => {
  1323. switchToHat = $(".chosenhat").attr("objid");
  1324. $("#hatprev").attr("src", `http://moomoo.io/img/hats/hat_${switchToHat}.png`)
  1325. },
  1326. }
  1327.  
  1328. });
  1329. });
  1330.  
  1331. $("#selectWings").click( () => {
  1332. let allHats = [];
  1333. for (var i=0;i<accessories.length;i++){
  1334. allHats.push(`<div objid=${accessories[i].id} class="selectObjAlert ${accessories[i].id == switchToAccessory ? "chosenwing" : ""} inalertWing"> <img class="selPrev" src="http://moomoo.io/img/accessories/access_${accessories[i].id}.png"/> </div>`);
  1335. }
  1336. $.alert({
  1337. title: "Choose Your Accessory!",
  1338. content: allHats,
  1339. useBootstrap: false,
  1340. buttons: {
  1341. cancel: () => {},
  1342. confirm: () => {
  1343. switchToAccessory = $(".chosenwing").attr("objid");
  1344. $("#wingprev").attr("src", `http://moomoo.io/img/accessories/access_${switchToAccessory}.png`)
  1345.  
  1346. },
  1347. }
  1348.  
  1349. });
  1350. });
  1351.  
  1352.  
  1353. $("#spikeControl").on("input", () => {
  1354. var cval = $("#spikeControl").val();
  1355. if (cval){
  1356. spikeKey = cval.charCodeAt(0);
  1357. }
  1358. });
  1359.  
  1360. $("#trapControl").on("input", () => {
  1361. var cval = $("#trapControl").val();
  1362. if (cval){
  1363. trapKey = cval.charCodeAt(0);
  1364. }
  1365. });
  1366.  
  1367. $("#keyPress").on("input", () => {
  1368. var cval = $("#keyPress").val();
  1369. if (cval){
  1370. instaKillKey = cval.charCodeAt(0);
  1371. }
  1372. })
  1373.  
  1374. $(document).on("click", ".inalertHat", (e) => {
  1375. $(".chosenhat").removeClass("chosenhat");
  1376. $(e.target.tagName == "DIV" ? e.target : $(e.target).parent()).addClass("chosenhat");
  1377. });
  1378.  
  1379. $(document).on("click", ".inalertWing", (e) => {
  1380. $(".chosenwing").removeClass("chosenwing");
  1381. $(e.target.tagName == "DIV" ? e.target : $(e.target).parent()).addClass("chosenwing");
  1382. });
  1383.  
  1384.  
  1385. $("#removeMonkey").click( () => {
  1386. removeMonkeyTail = !removeMonkeyTail;
  1387. });
  1388.  
  1389.  
  1390. var botSpan;
  1391.  
  1392. $(document).on("click", "#okbtn", () => {
  1393. $("#hatChangeAlert").animate({opacity: 0, top: -300});
  1394.  
  1395. });
  1396.  
  1397. $(document).on("click", "#sback", () => {
  1398. document.dns(["13c", [0, currentHat, 0]]);
  1399. $("#hatChangeAlert").animate({opacity: 0, top: -300});
  1400. });
  1401.  
  1402.  
  1403.  
  1404.  
  1405. var styleItem = document.createElement("style");
  1406. styleItem.type = "text/css";
  1407. styleItem.appendChild(document.createTextNode(`
  1408.  
  1409. #sback, #okbtn {
  1410. font-family: sans-serif;
  1411. font-weight: 300;
  1412. border: none;
  1413. outline: none;
  1414. font-size: 15px;
  1415.  
  1416. }
  1417.  
  1418. #sback {
  1419.  
  1420. border-radius: 5px;
  1421. padding: 9px;
  1422. cursor: pointer;
  1423. margin-top: -1.5px;
  1424. background-color: #d85858;
  1425. color: white;
  1426.  
  1427.  
  1428. }
  1429.  
  1430. #okbtn {
  1431.  
  1432. border-radius: 5px;
  1433. padding: 9px;
  1434. cursor: pointer;
  1435. margin-top: -1.5px;
  1436. background-color: #7399d6;
  1437. color: white;
  1438.  
  1439. }
  1440.  
  1441. #flexlow {
  1442. display: flex;
  1443. justify-content: space-evenly;
  1444. align-items: center;
  1445. width: 100%;
  1446.  
  1447. }
  1448.  
  1449. #changeAlert {
  1450. font-family: sans-serif;
  1451. font-weight: 200;
  1452. font-size: 23px;
  1453.  
  1454.  
  1455. }
  1456.  
  1457. #typealert {
  1458. font-family: sans-serif;
  1459. font-weight: 200;
  1460. font-size: 17px;
  1461. width: 95%;
  1462. margin-left: 2.5%;
  1463. text-align: center;
  1464. margin-top: 5.5px;
  1465. }
  1466.  
  1467. #hatChangeAlert {
  1468. position: absolute;
  1469. padding: 5px;
  1470. top: -300px;
  1471. opacity: 0;
  1472. left: 20px;
  1473. width: 300px;
  1474. height: 165px;
  1475. border-radius: 10px;
  1476. background-color: rgba(255, 255, 255, 0.7);
  1477. box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.08), 0 2px 10px 0 rgba(0, 0, 0, 0.06);
  1478.  
  1479.  
  1480.  
  1481. }
  1482.  
  1483. #changeAlert {
  1484. display: inline-block;
  1485.  
  1486. }
  1487.  
  1488. #hatimgmain {
  1489. width: 50px;
  1490. height: 50px;
  1491. display: inline-block;
  1492.  
  1493.  
  1494. }
  1495.  
  1496. #flextop {
  1497. display: flex;
  1498. width: 100%;
  1499. justify-content: space-evenly;
  1500. align-items: center;
  1501.  
  1502. }
  1503.  
  1504. #tbtn {
  1505. position: absolute;
  1506. left: 0;
  1507. top: 0;
  1508. width: 80px;
  1509. height: 80px;
  1510. opacity: 0;
  1511.  
  1512. }
  1513.  
  1514. .chosenhat {
  1515. border: 1px solid #7daaf2;
  1516. }
  1517.  
  1518. .chosenwing {
  1519. border: 1px solid #7daaf2;
  1520. }
  1521.  
  1522. .inalertHat {
  1523. margin-left: 30px !important;
  1524. margin-top: 10px !important;
  1525. }
  1526.  
  1527. .inalertWing {
  1528. margin-left: 30px !important;
  1529. margin-top: 10px !important;
  1530. }
  1531.  
  1532. option {
  1533. border-radius: 0px;
  1534. }
  1535.  
  1536. #hrule {
  1537. margin-top: 20px;
  1538. }
  1539.  
  1540. #endwrap {
  1541. margin-top: 15px;
  1542. width: 100%;
  1543. text-align: center;
  1544. margin-bottom: -15px;
  1545. }
  1546.  
  1547. #createEnd {
  1548. width: 100%;
  1549. text-align: center;
  1550. margin: 0 auto;
  1551.  
  1552. }
  1553.  
  1554. .lowprompt {
  1555. margin-bottom: -100px !important;
  1556.  
  1557. }
  1558.  
  1559.  
  1560. .lowpromptdetail {
  1561. margin-left: 25px;
  1562. color: #4c4c4c !important;
  1563. margin-top: 20px !important;
  1564. margin-bottom: 0 !important;
  1565.  
  1566. }
  1567.  
  1568. .toplow {
  1569. margin-top: 10px !important;
  1570. }
  1571.  
  1572.  
  1573. .objplace {
  1574. width: 45px;
  1575. height: 45px;
  1576. margin-bottom: -17px;
  1577. border: 0.5px solid #f2f2f2;
  1578. border-radius: 10px;
  1579. margin-left: 5px;
  1580. cursor: pointer;
  1581. }
  1582.  
  1583. .selPrev {
  1584. width: 80px;
  1585. height: 80px;
  1586. display: block;
  1587. margin: auto;
  1588. margin-top: 10px;
  1589.  
  1590. }
  1591.  
  1592. #choiceWrap {
  1593. display: flex;
  1594. justify-content: space-evenly;
  1595. align-items: center;
  1596.  
  1597.  
  1598. }
  1599.  
  1600. #middlePlus {
  1601. display: inline-block;
  1602. width: 50px;
  1603. height: 50px;
  1604. font-weight: 100;
  1605. font-family: sans-serif;
  1606. color: #4A4A4A;
  1607. opacity: 0.8;
  1608.  
  1609. }
  1610.  
  1611. .selectObj {
  1612. cursor: pointer;
  1613. width: 100px;
  1614. height: 100px;
  1615. background-color: #fcfcfc;
  1616. display: inline-block;
  1617. border-radius: 10px;
  1618. box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.08), 0 2px 10px 0 rgba(0, 0, 0, 0.06);
  1619.  
  1620. }
  1621.  
  1622.  
  1623. .selectObjAlert {
  1624. cursor: pointer;
  1625. width: 100px;
  1626. height: 100px;
  1627. background-color: #fcfcfc;
  1628. display: inline-block;
  1629. border-radius: 10px;
  1630. box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.08), 0 2px 10px 0 rgba(0, 0, 0, 0.06);
  1631.  
  1632. }
  1633.  
  1634. #mnwrap {
  1635. width: 100%;
  1636. text-align: center;
  1637. margin-bottom: -7px;
  1638. margin-top: 8px;
  1639. }
  1640.  
  1641. #flexControl {
  1642.  
  1643.  
  1644. }
  1645.  
  1646. #keyPress {
  1647. margin-left: 20px;
  1648. height: 20px;
  1649. width: 50px;
  1650. background-color: #e5e3e3;
  1651. border-radius: 7.5px;
  1652. font-size: 16px;
  1653. border: none;
  1654. text-align: center;
  1655. color: #4A4A4A;
  1656.  
  1657. }
  1658.  
  1659. .keyPressLow {
  1660. margin-left: 8px;
  1661. font-size: 16px;
  1662. margin-right: 8px;
  1663. height: 25px;
  1664. width: 50px;
  1665. background-color: #fcfcfc;
  1666. border-radius: 3.5px;
  1667. border: none;
  1668. text-align: center;
  1669. color: #4A4A4A;
  1670. border: 0.5px solid #f2f2f2;
  1671.  
  1672.  
  1673. }
  1674.  
  1675. #keyPress:focus {
  1676. border: none;
  1677. outline: none;
  1678. }
  1679.  
  1680. .keyPressLow:focus{
  1681.  
  1682. outline: none;
  1683. }
  1684.  
  1685. input[type=range] {
  1686. -webkit-appearance: none;
  1687. margin-top: 0px;
  1688. width: 100%;
  1689. }
  1690. input[type=range]:focus {
  1691. outline: none;
  1692. }
  1693. #healSlider::-webkit-slider-runnable-track {
  1694. width: 100%;
  1695. height: 10px;
  1696. cursor: pointer;
  1697. animate: 0.2s;
  1698. background: #dddddd;
  1699. border-radius: 5px;
  1700. }
  1701. #healSlider::-webkit-slider-thumb {
  1702. width: 25px;
  1703. height: 25px;
  1704. background: rgb(142, 210, 101);
  1705. border-radius: 12.5px;
  1706. margin-top: -6.25px;
  1707. -webkit-appearance: none;
  1708.  
  1709. }
  1710.  
  1711.  
  1712. #speedContain {
  1713. width: 80%;
  1714. height: 40px;
  1715. background-color: #75d679;
  1716. border-radius: 20px;
  1717. margin-left: 10%;
  1718. box-shadow: 1px 1px 4px gray;
  1719. }
  1720.  
  1721. #currentSpeed {
  1722. height: 40px;
  1723. width: 100%;
  1724. text-align: center;
  1725.  
  1726. color: white;
  1727. font-weight: 400 !important;
  1728. font-family: sans-serif;
  1729. font-size: 20px;
  1730. }
  1731.  
  1732. #numfocus {
  1733. background-color: white;
  1734. color: #75d679;
  1735. border-radius: 20px;
  1736. margin-right: -24%;
  1737. padding: 10px;
  1738. display: inline-block;
  1739. font-size: 20px;
  1740. font-weight: 400;
  1741. font-family: sans-serif;
  1742.  
  1743. }
  1744.  
  1745. #cspeed {
  1746. display: inline-block;
  1747. height: 300px;
  1748. margin-top: 0px;
  1749. margin-left: -10px;
  1750. color: white;
  1751. font-weight: 400 !important;
  1752. font-family: sans-serif;
  1753. font-size: 20px;
  1754.  
  1755. }
  1756.  
  1757.  
  1758.  
  1759. .menuPrompt {
  1760. font-size: 18px;
  1761. font-family: 'Hammersmith One';
  1762. color: #4A4A4A;
  1763. flex: 0.2;
  1764. text-align: center;
  1765. margin-top: 10px;
  1766. display: inline-block;
  1767.  
  1768. }
  1769.  
  1770. #mainSettings {
  1771. width: 400px;
  1772. height: 375px;
  1773. overflow-y: scroll;
  1774.  
  1775. }
  1776.  
  1777. #settingsTitle {
  1778. font-size: 32px;
  1779. font-family: 'Hammersmith One';
  1780. color: #4A4A4A;
  1781. width: 100%;
  1782. text-align: center;
  1783. margin-top: 10px;
  1784.  
  1785. }
  1786.  
  1787. #rmvMonkey {
  1788. font-size: 16.5px;
  1789. opacity: 0.9;
  1790.  
  1791. }
  1792.  
  1793.  
  1794.  
  1795. #infoDiv {
  1796. position: absolute;
  1797. left: -25%;
  1798. right: 0%;
  1799. text-align: center;
  1800. background-color: rgba(252, 252, 252, 0.5);
  1801. display: inline-block;
  1802. box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.08), 0 2px 10px 0 rgba(0, 0, 0, 0.06);
  1803.  
  1804. }
  1805.  
  1806. #autotitle {
  1807. font-family: sans-serif;
  1808. font-size: 30px;
  1809. font-weight: 200;
  1810. }
  1811.  
  1812. #arrivalest {
  1813. font-family: sans-serif;
  1814. font-size: 20px;
  1815. font-weight: 200;
  1816. }
  1817.  
  1818. #timeest {
  1819.  
  1820. }
  1821.  
  1822. #cancelTrip {
  1823. background-color: rgb(203, 68, 74);
  1824. color: white;
  1825. border: none;
  1826. border-radius: 4px;
  1827. font-size: 17px;
  1828. font-family: sans-serif;
  1829. cursor: pointer;
  1830. outline: none;
  1831. font-weight: 300;
  1832. margin-bottom: 18px;
  1833. width: 112px;
  1834. height: 33.6px;
  1835.  
  1836. }
  1837.  
  1838. #spotDiv {
  1839. position: absolute;
  1840. width: 10px;
  1841. height: 10px;
  1842. marginLeft: -5px;
  1843. marginTop: -5px;
  1844. opacity: 1;
  1845. background-color: rgb(203, 68, 74);
  1846. left: 0;
  1847. right: 0;
  1848. border-radius: 5px;
  1849. z-index: 1000;
  1850.  
  1851. }
  1852.  
  1853. @media only screen and (max-width: 765px){
  1854. #numfocus {
  1855. margin-right: -13%;
  1856. }
  1857. }
  1858.  
  1859. #botText {
  1860. color: #5aed57;
  1861. font-size: 20px;
  1862. font-family: sans-serif;
  1863. font-weight: 300;
  1864. }
  1865.  
  1866. `))
  1867. document.head.appendChild(styleItem);
  1868.  
  1869. //$("#adCard").css({display: "none"});
  1870.  
  1871. $("#youtuberOf").css({display: "none"});
  1872. let newImg = document.createElement("img");
  1873. newImg.src = "https://i.imgur.com/OZL1PXR.png";
  1874. newImg.style = `position: absolute; top: 15px; left: 15px; z-index: 100000; width: 50px; height: 50px; cursor: pointer;`;
  1875. document.body.prepend(newImg);
  1876.  
  1877. newImg.addEventListener("click", () => {
  1878. let w = window.open("http://scriptsourceapp.com/menu.html", null, `height=650, width=1075, status=yes, toolbar=no, menubar=no, location=no`);
  1879. });
  1880.  
  1881. var iPressKey;
  1882. var placeName;
  1883. var putonName;
  1884.  
  1885.  
  1886.  
  1887. function healthFunction(t, a) {
  1888. return Math.abs(((t + a/2) % a) - a/2);
  1889. }
  1890.  
  1891. function encodeSEND(json){
  1892. let OC = msgpack5.encode(json);
  1893. var aAdd = Array.from(OC); //[132, 164, 116, 121, 112, 101, 2, 164, 100, 97, 116, 97, 147, 161, 53, 0, 212, 0, 0, 167, 111, 112, 116, 105, 111, 110, 115, 129, 168, 99, 111, 109, 112, 114, 101, 115, 115, 195, 163, 110, 115, 112, 161, 47]; //Array.from(OC);
  1894. return new Uint8Array(aAdd).buffer;
  1895. }
  1896.  
  1897.  
  1898. var previousZone;
  1899.  
  1900. $("#mapDisplay").css({background: `url('https://i.imgur.com/fgFsQJp.png')`});
  1901.  
  1902.  
  1903. function bullHelmet2(status){
  1904. console.info(status);
  1905. var dataTemplate = {"data":[], "options":{"compress":true}, "nsp": "/", "type": 2};
  1906. if (!status.includes("m")){
  1907. if (!status.includes(`a`)){
  1908. dataTemplate["data"] = ["13c", [0, status == "on" ? switchToHat : currentHat, 0]];
  1909. } else {
  1910. dataTemplate["data"] = ["13c", [0, parseInt(status == "aon" ? switchToAccessory : currentAccessory), 1]];
  1911. }
  1912. } else {
  1913. if (currentAccessory == obs("monkey tail") && removeMonkeyTail){ //remove monkey tail
  1914. console.info("HERE2");
  1915. dataTemplate["data"] = ["13c", [0, status == "mOn" ? obs("monkey tail") : 0, 1]];
  1916. } else {
  1917. console.info("HERE");
  1918. dataTemplate["data"] = ["13c", [0, currentAccessory, 1]];
  1919. }
  1920. }
  1921. console.info(dataTemplate["data"]);
  1922. let encoded = encodeSEND(dataTemplate["data"]);
  1923. return encoded;
  1924. }
  1925.  
  1926. console.error(unsafeWindow);
  1927.  
  1928.  
  1929. unsafeWindow.WebSocket.prototype.oldSend = WebSocket.prototype.send;
  1930. unsafeWindow.WebSocket.prototype.send = function(m){
  1931. //console.info(new Uint8Array(m));
  1932.  
  1933. if (targets.every(x=>x==false)){
  1934. for (let elementDiv of document.getElementsByClassName("spotDiv")){
  1935. document.body.removeChild(elementDiv);
  1936. }
  1937.  
  1938. }
  1939.  
  1940. if (!ws){
  1941. document.ws = this;
  1942.  
  1943. ws = this;
  1944. console.info("WS SET");
  1945. console.log(ws);
  1946. socketFound(this);
  1947. }
  1948.  
  1949.  
  1950. if (inInstaProcess){
  1951. this.oldSend(m);
  1952. console.log("here");
  1953. return;
  1954. }
  1955. let x = new Uint8Array(m);
  1956. let y = Array.from(x);
  1957. let j = [146, 161, 50, 145, 203];
  1958. if (y.every((x,i) => j[i]==x)){
  1959. console.log(y);
  1960. }
  1961.  
  1962.  
  1963. this.oldSend(m);
  1964.  
  1965. /*if (Array.from(x).every( (num, idx) => START_SSWX[idx]==num )){
  1966. setTimeout( () => {
  1967. if (noallow){
  1968. noallow = false;
  1969. return;
  1970. }
  1971. this.oldSend(m);
  1972.  
  1973. }, 10);
  1974. } else {
  1975. this.oldSend(m);
  1976. }*/
  1977.  
  1978. //console.info(x);
  1979. let x_arr_SSX = Array.from(x);
  1980. //console.log(x_arr_SSX);
  1981. if (x_arr_SSX.length === 6 && autobull){
  1982. if (x_arr_SSX.every( (num, idx) => START_SSWX[idx]==num )){
  1983. console.info("started swing");
  1984. IN_PROCESS = true;
  1985. this.oldSend(bullHelmet2("on"));
  1986. this.oldSend(bullHelmet2("mOff"));
  1987. document.dns(["13c", [0, switchToAccessory, 1]])
  1988. } else if (x_arr_SSX.every( (num, idx) => END_SSWX[idx]==num ) ){
  1989. console.info("ended swing");
  1990. this.oldSend(bullHelmet2("off"));
  1991. this.oldSend(bullHelmet2("mOn"));
  1992. document.dns(["13c", [0, currentAccessory, 1]])
  1993. IN_PROCESS = false;
  1994. }
  1995. }
  1996.  
  1997.  
  1998. /*let usageArray = Array.from(new Uint8Array(m));
  1999. if (usageArray.length == 45){
  2000. if (usageArray[16] == 0 || usageArray[16] == 1) foodInHand = false;
  2001. console.info(`Food in hand: null{foodInHand}`);
  2002.  
  2003. };*/
  2004.  
  2005. let realData = {}
  2006. let realInfo = msgpack5.decode(x);
  2007. if (realInfo[1] instanceof Array){
  2008. realData.data = [realInfo[0], ...realInfo[1]]
  2009. } else {
  2010. realData.data = realInfo
  2011. }
  2012. //console.log(realData)
  2013. //console.info("sent");
  2014. //console.info(realData.data);
  2015. if (realData.data[0] == "ch"){
  2016. lastWords = realData.data[1];
  2017.  
  2018.  
  2019. }
  2020. if(realData.data[0]!="2") {
  2021. // console.info("HERE3");
  2022. // console.info(realData.data[0])
  2023. console.info(realData.data);
  2024. // console.log(x);
  2025. if (realData.data[0]=="3"){
  2026. //console.info(realData.data[1]);
  2027. /*console.info(new Uint8Array(m));
  2028. if(typeof realData.data[1] != "number" && !nval){
  2029. nval = realData.data[1];
  2030. document.n = nval;
  2031. console.info("SET NVAL to");
  2032. console.info(nval);
  2033.  
  2034.  
  2035. }*/
  2036. /*console.info(typeof realData.data[2]);
  2037. console.info(realData.data[2].buffer);
  2038. goodData = realData.data;
  2039. console.info(goodData);
  2040. console.info(["5", 0, nval]);
  2041. document.n = goodData[2];
  2042. document.nval = nval*/
  2043. }
  2044. }
  2045. //console.info(new Date().getTime());
  2046. // console.log(realData.data[0]);
  2047. if (realData.data[0]=="s"){
  2048. console.info("user respawned");
  2049. for (var elem of Object.values(allMooMooObjects)){
  2050. console.info(elem);
  2051. elem.style.opacity = 1;
  2052. }
  2053. justDied = false;
  2054. } else if (realData.data[0]=="13c"){
  2055. console.info("In Hat Part");
  2056. console.info(realData);
  2057. console.info(IN_PROCESS);
  2058. console.info(realData.data.length == 4)
  2059. console.info("test");
  2060. if (!IN_PROCESS && realData.data.length == 4 && realData.data[3]==0 &&realData.data[1]==0){
  2061. currentHat = realData.data[2];
  2062. console.info("Changed hat to " + currentHat);
  2063.  
  2064. } else if (!IN_PROCESS && realData.data.length == 4 && realData.data[3]==1 &&realData.data[1]==0){
  2065. currentAccessory = realData.data[2];
  2066. console.info("Changed accessory to " + currentAccessory);
  2067. } else if (realData.data.length == 4 && realData.data[3] == 0 && realData.data[1]==1){
  2068. let hatID = realData.data[2];
  2069. if (hatID == obs("winter cap")){
  2070. hasWinter = true;
  2071. } else if (hatID == obs("flipper hat")){
  2072. hasFlipper = true;
  2073. }
  2074. console.log("BOUGHT HAT");
  2075. }
  2076.  
  2077. } else if (realData.data[0]=="2"){
  2078. MYANGLE = realData.data[1];
  2079. //console.log("ANGLE");
  2080.  
  2081. } else if (realData.data[0]=="5") {
  2082. //console.info("hai");
  2083. //console.info(new Uint8Array(m));
  2084. //console.info(realData.data);
  2085. }
  2086. };
  2087.  
  2088.  
  2089. function socketFound(socket){
  2090. window.addEventListener("message", (message) => {
  2091. if (message.origin != "http://scriptsourceapp.com") return;
  2092.  
  2093. autoHealSpeed = message.data.autoHealSpeed;
  2094. instaKillKey = message.data.instaKillKey;
  2095. spikeKey = message.data.spikeKey;
  2096. trapKey = message.data.trapKey;
  2097. iPressKey = message.data.iPressKey;
  2098. switchToAccessory = message.data.switchToAccessory;
  2099. switchToHat = message.data.switchToHat;
  2100. placeName = message.data.placeName;
  2101. putonName = message.data.putonName;
  2102. // oldAlert('hi');
  2103. for (let keyobj of Object.keys(message.data.state)){
  2104. CORESTATE[keyobj] = {
  2105. active: false,
  2106. rel: message.data.state[keyobj][0],
  2107. }
  2108. }
  2109.  
  2110.  
  2111. });
  2112. socket.addEventListener('message', function(message){
  2113. handleMessage(message);
  2114. });
  2115. }
  2116.  
  2117. function isElementVisible(e) {
  2118. return (e.offsetParent !== null);
  2119. }
  2120.  
  2121. function aim(x, y){
  2122. var cvs = document.getElementById("gameCanvas");
  2123. cvs.dispatchEvent(new MouseEvent("mousemove", {
  2124. clientX: x,
  2125. clientY: y
  2126.  
  2127. }));
  2128.  
  2129. }
  2130.  
  2131.  
  2132. function triggerAlert(name, id){
  2133. hatChangeAlert.innerHTML = generateHatHTML(name, id);
  2134. $("#hatChangeAlert").animate({opacity: 1, top: '20px'});
  2135. setTimeout( () => {
  2136. $("#hatChangeAlert").animate({opacity: 0, top: -300});
  2137. }, 5000);
  2138. }
  2139.  
  2140.  
  2141.  
  2142.  
  2143. function heal(){
  2144. console.log(hasApple);
  2145. console.log("healing");
  2146. if (recentHealth>=100) return;
  2147. console.info(recentHealth);
  2148. console.info(`HERE I AM IN THE HEAL FUNC with ${hasApple}`);
  2149. var dataTemplate = {"data":[], "options":{"compress":true}, "nsp": "/", "type": 2};
  2150. if (hasApple){
  2151. if (!haveApple()){
  2152. heal();
  2153. return;
  2154. }
  2155. else { //User has apple
  2156. document.dns(["5", [0, null]]);
  2157.  
  2158. }
  2159. }
  2160. else { //User has cookie
  2161. console.info('user has cookie');
  2162. document.dns(["5", [1, null]]);
  2163. }
  2164. document.dns(["c", [1, 0]]);
  2165.  
  2166.  
  2167. setTimeout( () => {
  2168. document.dns(["c", [0, 0]]);
  2169. }, 100);
  2170. recentHealth += hasApple ? 20 : 40;
  2171.  
  2172. }
  2173.  
  2174. var runaway = false;
  2175.  
  2176. function handleMessage(m){
  2177. if (repeatingLast){
  2178. doNewSend(["ch", [lastWords]]);
  2179. }
  2180. var secondVote = autoattack;
  2181. for (let obj of Object.values(CORESTATE)){
  2182. if (obj.rel == "attack"){
  2183. console.log(obj)
  2184. if (obj.active == true){
  2185. secondVote = true;
  2186. } else {
  2187. secondVote = autoattack;
  2188. }
  2189. } else if (obj.rel == "run"){
  2190. if (obj.active == true){
  2191. runaway = true;
  2192. } else {
  2193. runaway = false;
  2194. }
  2195. }
  2196. }
  2197. autoattack = secondVote;
  2198.  
  2199. let td = new Uint8Array(m.data);
  2200. // console.info(td);
  2201. //console.info(td);
  2202. //console.info(td.slice(98,-1));
  2203. var infotest = msgpack5.decode(td);
  2204. var info;
  2205. if(infotest.length > 1) {
  2206. info = [infotest[0], ...infotest[1]];
  2207. if (info[1] instanceof Array){
  2208. info = info;
  2209. }
  2210. } else {
  2211. info = infotest;
  2212. }
  2213.  
  2214. // console.log(info);
  2215. //console.info("received");
  2216. //console.info(new Date().getTime());
  2217. if(!info) return;
  2218. //if(!["c","5", "3"].includes(info[0])) console.log(info[0])
  2219. if (inInstaProcess){
  2220. doNewSend(["2", [nearestPlayerAngle]]);
  2221. }
  2222. // doNewSend(["2", 0.45]);
  2223. if (info[0]=="3"){ //player update
  2224. botTag();
  2225. playersNear = [];
  2226. var locInfoNow = info[1];
  2227. //console.log(locInfoNow)
  2228. //console.info(locInfoNow);
  2229. for (var i=0;i<locInfoNow.length/13;i++){
  2230. var playerData = locInfoNow.slice(13*i, 13*i+13);
  2231. if (playerData[0]==MYID){
  2232. myCLAN = playerData[7];
  2233. myPlayer = new player(playerData[0], playerData[1], playerData[2], playerData[7]);
  2234.  
  2235. var newTraps = [];
  2236. for (let arr of allTraps){
  2237. let objx = arr[1];
  2238. let objy = arr[2];
  2239. let objtype = arr[arr.length-2];
  2240. console.log(myPlayer);
  2241. let totalDist = Math.sqrt( (objx-myPlayer.x)**2 + (objy-myPlayer.y)**2 );
  2242. console.log(totalDist);
  2243. if (objtype == 15 && totalDist < 100){
  2244. let spikeVal;
  2245. if (havePoison()) {
  2246. spikeVal = 8;
  2247. } else if (haveGreat()){
  2248. spikeVal = 7;
  2249. } else if (haveSpinning()){
  2250. spikeVal = 9;
  2251. } else {
  2252. spikeVal = 6;
  2253. }
  2254.  
  2255. for (var j=0;j<0;j++){
  2256. let angle = (-1 * Math.PI + ((Math.PI*2)/20)*j) - 0.1;
  2257. placeSpike(spikeVal, angle);
  2258. console.log("c.data " + j);
  2259. console.log("c.data " + angle);
  2260. }
  2261.  
  2262. CORESTATE.intrap.active = true;
  2263. CORESTATE.intrap.extra = arr[0]; //object id
  2264.  
  2265. } else if (objtype == 15 && totalDist < 1500){
  2266. newTraps.push(arr)
  2267. }
  2268. }
  2269. allTraps = newTraps;
  2270.  
  2271. if (myPlayer.y < 2400){
  2272. CORESTATE.inwater.active = false;
  2273. if (!hasWinter) return;
  2274. if (previousZone != "winter"){
  2275. previousZone = "winter";
  2276. IN_PROCESS = true;
  2277. document.dns(["13c", [0, obs("winter cap"), 0]]);
  2278. IN_PROCESS = false;
  2279. if (askMeAgain) triggerAlert("Winter Cap", obs("winter cap"));
  2280. }
  2281. } else if (myPlayer.y > 6850 && myPlayer.y < 7550){
  2282. CORESTATE.inwater.active = true;
  2283. if (!hasFlipper) return;
  2284. if (previousZone != "river"){
  2285. previousZone = "river";
  2286. IN_PROCESS = true;
  2287. document.dns(["13c", [0, obs("flipper hat") , 0]]);
  2288. IN_PROCESS = false;
  2289. if (askMeAgain) triggerAlert("Flipper Hat", obs("flipper hat"));
  2290. }
  2291. } else {
  2292. CORESTATE.inwater.active = false;
  2293. if (previousZone != "normal"){
  2294. previousZone = "normal";
  2295. $("#hatChangeAlert").animate({opacity: 0, top: -300});
  2296. if (askMeAgain) document.dns(["13c", [0, currentHat, 0]]);
  2297.  
  2298. }
  2299. }
  2300. if (!targets.every(x => x===false)){
  2301. let targetXDir = targets[0];
  2302. let targetYDir = targets[1];
  2303. let correctAngle = Math.atan2(targetYDir-myPlayer.y, targetXDir-myPlayer.x);
  2304. document.dns(["3", [correctAngle]]);
  2305. //For every 1 second of travel, you go forward 320 pixels!
  2306. let totalDist = Math.sqrt( (targetXDir-myPlayer.x)**2 + (targetYDir-myPlayer.y)**2 );
  2307. let totalTime = Math.ceil(totalDist/319.2);
  2308. document.getElementById("timeest").innerHTML = `${totalTime} seconds...`
  2309.  
  2310. if (totalDist < 100){
  2311. targets = [false, false];
  2312. document.dns(["3", [null]]);
  2313. $("#infoDiv").animate({opacity: 0});
  2314. }
  2315.  
  2316. }
  2317. continue
  2318. }
  2319. if (playerData[7]===null || playerData[7] != myCLAN){
  2320. var locPlayer = new player(playerData[0], playerData[1], playerData[2], playerData[7]);
  2321. playersNear.push(locPlayer);
  2322. }
  2323.  
  2324. }
  2325. var nearestPlayerPosition = playersNear.sort( (a,b) => pdist(a, myPlayer) - pdist(b, myPlayer) );
  2326. var nearestPlayer = nearestPlayerPosition[0];
  2327. focusPlayerObj = nearestPlayer;
  2328. if (nearestPlayer){
  2329. CORESTATE.nearenemy.active = true;
  2330. nearestPlayerAngle = Math.atan2( nearestPlayer.y-myPlayer.y, nearestPlayer.x-myPlayer.x);
  2331. if (autoattack){
  2332. doNewSend(["3", [nearestPlayerAngle]]);
  2333. ws.send(encodeSEND([ "c",[1, null] ]));
  2334. aim(nearestPlayer.x-myPlayer.x+window.innerWidth/2, nearestPlayer.y-myPlayer.y+window.innerHeight/2);
  2335.  
  2336. $("#tbtn").css({opacity: 1, marginLeft: nearestPlayer.x-myPlayer.x+window.innerWidth/2-20, marginTop: nearestPlayer.y-myPlayer.y+window.innerHeight/2-20});
  2337. } else if (runaway) {
  2338. doNewSend(["3", [-1 * nearestPlayerAngle]]);
  2339. //$("#tbtn").animate({opacity: 0.5});
  2340. }
  2341. } else {
  2342. CORESTATE.nearenemy.active = false;
  2343. // $("#tbtn").animate({opacity: 0.5});
  2344. }
  2345.  
  2346. }
  2347.  
  2348. if (info[0]=="6"){
  2349. var locInfo = info[1];
  2350. if (locInfo[locInfo.length-1].toString() == MYID){ //Object created
  2351. if (window.innerWidth >= 770){
  2352. console.log(locInfo);
  2353. var itemID = `actionBarItem${locInfo[locInfo.length-2]+16}`;
  2354. var imgURL = document.getElementById(itemID).style.backgroundImage.toString().match(/url\("(.+)?(?=")/)[1];
  2355. console.info(imgURL);
  2356. let mapDisplay = document.getElementById("mapDisplay").getBoundingClientRect();
  2357. let mapSize = [14365, 14365];
  2358. let boxSize = [$("#mapDisplay").width(), $("#mapDisplay").height()];
  2359. let targets = [locInfo[1], locInfo[2]].map(item => (130*item)/14365);
  2360. let x = mapDisplay.x + targets[0] - 6;
  2361. let y = mapDisplay.y + targets[1] - 6;
  2362. let newTarget = document.createElement("div");
  2363. newTarget.rawX = targets[0];
  2364. newTarget.rawY = targets[1];
  2365. newTarget.rimgURL = imgURL;
  2366. newTarget.style = `background-image: url("${imgURL}"); background-size: 12px 12px; width:12px; height:12px; position:absolute; left: ${x}px; top:${y}px; opacity:0; z-index:100; cursor: pointer;`;
  2367. newTarget.className = "mapTarget";
  2368. document.getElementsByTagName("body")[0].appendChild(newTarget);
  2369. $(newTarget).animate({opacity: 1});
  2370. allMooMooObjects[locInfo[0]] = newTarget;
  2371.  
  2372. }
  2373. } else {
  2374. console.log(locInfo);
  2375. for (var i=0;i<locInfo.length/8;i+=1){
  2376. let arr = locInfo.slice(i*8, (i+1)*8); console.log(arr)
  2377. let objtype = arr[arr.length-2];
  2378. if (objtype == 15){
  2379. allTraps.push(arr);
  2380. }
  2381.  
  2382. }
  2383.  
  2384.  
  2385. }
  2386. }
  2387.  
  2388. if (info[0]=="12"){
  2389.  
  2390. let newTraps = [];
  2391. for (let trap of allTraps){
  2392. if (trap[trap.length-2] != info[1]) newTraps.push(trap);
  2393. }
  2394. allTraps = newTraps;
  2395.  
  2396.  
  2397. console.error(info);
  2398. if (Object.keys(allMooMooObjects).includes(info[1].toString())){
  2399. allMooMooObjects[info[1]].remove();
  2400. }
  2401. if (CORESTATE.intrap.active){
  2402. if (CORESTATE.intrap.extra == info[1]){
  2403. CORESTATE.intrap.active = false;
  2404. let newTraps = [];
  2405. for (let trap of allTraps){
  2406. if (trap[trap.length-2] != info[1]) newTraps.push(trap);
  2407. }
  2408. allTraps = newTraps;
  2409. }
  2410. }
  2411. }
  2412.  
  2413. // console.info("-------------")
  2414. if (info[0] == "1" && !MYID){
  2415. MYID = info[1];
  2416. }
  2417.  
  2418.  
  2419. if (info[0] == "18" && info[4]=="1200") {
  2420. console.info(info);
  2421. bowWorked = true;
  2422. }
  2423.  
  2424. if (info[0] == "h" && info[1] == MYID && autoheal){
  2425. console.info("doing stuff");
  2426. console.info(info);
  2427. if (info[2] < 100 && info[2] > 0){
  2428. recentHealth = info[2];
  2429. console.info("RECEIVED:");
  2430. console.info(info);
  2431. //recentHealth += hasApple ? 20 : 40;
  2432. console.info("heal notif sent");
  2433. setTimeout( () => {
  2434. heal();
  2435. }, autoHealSpeed);
  2436. } else if (info[2] > 0) {
  2437. console.info("done healing");
  2438. recentHealth = 100;
  2439. if (foodInHand){
  2440. console.info("okay bad thing happened");
  2441. var dataTemplate5 = {"type": 2, "data":[], "options":{"compress":false}, "nsp": "/"};
  2442. dataTemplate5["data"]=["5", [0, true]];
  2443. let encoded5 = encodeSEND(dataTemplate5["data"]);
  2444. ws.send(encoded5);
  2445. console.info("corrected bad thing");
  2446. }
  2447.  
  2448. } else {
  2449. hasApple = true; //You've died tragically in combat; back to the apple for you!
  2450. console.info("Setting has apple to true from here");
  2451. }
  2452. }
  2453. else if(info[0] == "11"){
  2454. console.info("doing death");
  2455. for (var elem of Object.values(allMooMooObjects)){
  2456. console.info(elem);
  2457. elem.style.opacity = 0;
  2458. }
  2459. hasApple = true;
  2460. justDied = true;
  2461. recentHealth = 100;
  2462.  
  2463. }
  2464.  
  2465. }
  2466.  
  2467. function pdist(player1, player2){
  2468. return Math.sqrt( Math.pow((player2.y-player1.y), 2) + Math.pow((player2.x-player1.x), 2) );
  2469. }
  2470.  
  2471. function haveApple(){
  2472. console.info("Im being used and justDied is:" + justDied);
  2473. if (justDied){
  2474. hasApple = true;
  2475. return true;
  2476. }
  2477. if (hasApple) hasApple = isElementVisible(document.getElementById("actionBarItem16"));
  2478. return hasApple;
  2479. }
  2480.  
  2481. function havePoison(){
  2482. let hasPoison = true;
  2483. if (hasPoison) hasPoison = isElementVisible(document.getElementById("actionBarItem24"));
  2484. return hasPoison;
  2485. }
  2486.  
  2487. /*$(window).resize( () => {
  2488. for (var elem of Object.values(allMooMooObjects)){
  2489. let mapDisplay = document.getElementById("mapDisplay").getBoundingClientRect();
  2490. let mapSize = [14365, 14365];
  2491. let boxSize = [$("#mapDisplay").width(), $("#mapDisplay").height()];
  2492. let x = mapDisplay.x + parseInt(elem.rawX) - 6;
  2493. let y = mapDisplay.y + parseInt(elem.rawY) - 6;
  2494. console.log(x, y);
  2495. elem.style = `background-image: url("${elem.rimgURL}"); background-size: 12px 12px; width:12px; height:12px; position:absolute; left: ${x}px; top:${y}px; opacity:0; z-index:100; cursor: pointer;`;
  2496. }
  2497. });*/
  2498.  
  2499. function haveGreat(){
  2500. let hasGreat = true;
  2501. if (hasGreat) hasGreat = isElementVisible(document.getElementById("actionBarItem23"));
  2502. return hasGreat;
  2503. }
  2504.  
  2505. function haveSpinning(){
  2506. let hasSpinning = true;
  2507. if (hasSpinning) hasSpinning = isElementVisible(document.getElementById("actionBarItem25"));
  2508. return hasSpinning;
  2509. }
  2510.  
  2511. function doNewSend(sender){
  2512. ws.send(encodeSEND(sender));
  2513. }
  2514.  
  2515. function placeSpike(item, angle){
  2516. ws.send(encodeSEND( ["5", [item, null]]));
  2517. ws.send(encodeSEND([
  2518. "c",
  2519. [
  2520. 1,
  2521. angle ? angle : null
  2522. ]
  2523. ]));
  2524.  
  2525. ws.send(encodeSEND([
  2526. "c",
  2527. [
  2528. 0,
  2529. null
  2530. ]
  2531. ])); //spike function by
  2532. }
  2533.  
  2534. $("#mapDisplay").on("click", (event) => {
  2535. if (!targets.every(x=>x===false)) return;
  2536.  
  2537. $("#spotDiv").css({zIndex: 10000});
  2538. var xpos = event.pageX - $("#mapDisplay").offset().left;
  2539. var ypos = event.pageY - $("#mapDisplay").offset().top;
  2540. var mapWidth = $("#mapDisplay").width();
  2541. var mapHeight = $("#mapDisplay").height();
  2542. var shiftX = (xpos/mapWidth)*14365;
  2543. var shiftY = (ypos/mapHeight)*14365;
  2544. targets = [shiftX, shiftY];
  2545. var infoDiv = document.createElement("div");
  2546. infoDiv.innerHTML = `<h1 id="autotitle">You are currently in CloudyMod auto-pilot.</h1>
  2547. <h3 id="arrivalest">You will arrive in <span id="timeest">30 seconds...</span></h3>
  2548.  
  2549. <button type="button" id="cancelTrip">Cancel</button>`;
  2550. infoDiv.id = "infoDiv";
  2551. document.body.prepend(infoDiv);
  2552.  
  2553. let spotDiv = document.createElement("div");
  2554. spotDiv.id = "spotDiv";
  2555. spotDiv.className = "spotDiv";
  2556. document.body.prepend(spotDiv);
  2557. $("#spotDiv").css({left: event.pageX, top: event.pageY});
  2558. $("#spotDiv").animate({width: '50px', height: '50px', marginLeft: '-25px', marginTop: '-25px', borderRadius: '25px', opacity: 0}, 2000);
  2559. var spotDivs = [];
  2560. let coreInterval = setInterval( () => {
  2561. console.log('looping');
  2562. if (targets.every(x=>x===false)){
  2563. clearInterval(coreInterval);
  2564. console.log('clearing');
  2565. for (let elementDiv of document.getElementsByClassName("spotDiv")){
  2566. document.body.removeChild(elementDiv);
  2567. }
  2568.  
  2569. } else {
  2570. let spotDiv = document.createElement("div");
  2571. spotDiv.id = "spotDiv";
  2572. spotDiv.className = "spotDiv";
  2573. document.body.prepend(spotDiv);
  2574. $("#spotDiv").css({left: event.pageX, top: event.pageY});
  2575. $("#spotDiv").animate({width: '50px', height: '50px', marginLeft: '-25px', marginTop: '-25px', borderRadius: '25px', opacity: 0}, 2000);
  2576. spotDivs.push(spotDiv);
  2577. }
  2578. }, 700);
  2579.  
  2580. })
  2581.  
  2582. document.dns = doNewSend;
  2583.  
  2584.  
  2585. function botTag(){
  2586. if (!botSpan || !isElementVisible(botSpan)){
  2587. botSpan = document.createElement("span");
  2588. botSpan.id = "botText";
  2589. var ageDiv = document.getElementById("ageText");
  2590. ageDiv.prepend(botSpan);
  2591. }
  2592.  
  2593. if (autoattack){
  2594. botSpan.innerHTML = "BOT "
  2595. console.log(botSpan);
  2596. console.log(botSpan.id)
  2597. console.log(botSpan.innerHTML)
  2598. } else {
  2599. $("#tbtn").animate({opacity: 0});
  2600. botSpan.innerHTML = "";
  2601. }
  2602. }
  2603.  
  2604. $(document).on("click", "#cancelTrip", () => {
  2605. targets = [false, false];
  2606. document.dns(["3", [null]]);
  2607. $("#infoDiv").animate({opacity: 0});
  2608. })
  2609.  
  2610. document.title="Auto heal ON"
  2611.  
  2612. document.addEventListener('keypress', (e)=>{
  2613.  
  2614.  
  2615. if (e.keyCode == 84 && document.activeElement.id.toLowerCase() !== 'chatbox'){
  2616. STATE+=1;
  2617. let coreIndex = STATE%2; //STATE%4;
  2618. //let truthArray = [ [1,2].includes(coreIndex), [0,1].includes(coreIndex)];
  2619. //autobull = truthArray[0];
  2620. autoheal = coreIndex == 0; //truthArray[1];
  2621. document.title = document.title=`Auto Heal ${autoheal ? "ON" : "OFF"}` //"Heal " + (autoheal ? "ON" : "OFF") + " / Bull Hat " + (autobull ? "ON" : "OFF");
  2622. } else if (e.keyCode == trapKey && document.activeElement.id.toLowerCase() !== 'chatbox') { //Place a trap
  2623. console.log("UH OH")
  2624. var dataTemplate = {"data":[], "options":{"compress":true}, "nsp": "/", "type": 2};
  2625. var data50 = dataTemplate;
  2626. if (isElementVisible(document.getElementById("actionBarItem31"))){
  2627. data50["data"]=["5", [15, 0]];
  2628. } else {
  2629. data50["data"]=["5", [16, 0]];
  2630. }
  2631. ws.send(encodeSEND(data50["data"]));
  2632. var data51 = dataTemplate;
  2633. data51["data"]=[
  2634. "c",
  2635. [
  2636. 1,
  2637. null
  2638. ]
  2639. ];
  2640. let encoded2 = encodeSEND(data51["data"]);
  2641. ws.send(encoded2);
  2642. dataTemplate["data"]=["c",0, null];
  2643. let encoded = encodeSEND(dataTemplate);
  2644. ws.send(encoded);
  2645.  
  2646. } else if (e.keyCode == 112 && document.activeElement.id.toLowerCase() !== 'chatbox'){
  2647. autoattack = !autoattack
  2648. botTag();
  2649.  
  2650. } else if (e.keyCode == spikeKey && document.activeElement.id.toLowerCase() !== 'chatbox') { //Place a spike
  2651. if (havePoison()) {
  2652. placeSpike(8);
  2653. } else if (haveGreat()){
  2654. placeSpike(7);
  2655. } else if (haveSpinning()){
  2656. placeSpike(9);
  2657. } else {
  2658. placeSpike(6);
  2659. }
  2660.  
  2661. } else if (e.keyCode == instaKillKey && document.activeElement.id.toLowerCase() !== 'chatbox') {
  2662. let allActiveItems = Array.from(document.getElementById("actionBar").children).filter(x=>x.style.display != "none");
  2663. let allActiveIDs = allActiveItems.map(x=>parseInt(x.id.replace("actionBarItem", "")));
  2664. switchToWep = allActiveIDs[0];
  2665. switchToRange = allActiveIDs[1];
  2666. console.info(currentAccessory);
  2667. var ctime = new Date().getTime();
  2668. console.info(inInstaProcess)
  2669. if (!inInstaProcess){
  2670. console.info("got in");
  2671. inInstaProcess = true
  2672. IN_PROCESS = true;
  2673.  
  2674. doNewSend(["13c", [0, bullHelm, 0]]);
  2675. if (currentAccessory == monkeyTail){
  2676. doNewSend(["13c", [0, 0, 1]]);
  2677. }
  2678. doNewSend(["5", [switchToWep, true]]);
  2679. console.info("Starting at 0");
  2680.  
  2681. //after bad
  2682.  
  2683.  
  2684. setTimeout( () => {
  2685. doNewSend(["2", [nearestPlayerAngle]]);
  2686. doNewSend([
  2687. "c",
  2688. [
  2689. 1,
  2690. null
  2691. ]
  2692. ]); //If we're perfect, we only send this once
  2693. console.info(`Sending swing at ${new Date().getTime() - ctime}`);
  2694. ctime = new Date().getTime();
  2695. }, 20);
  2696.  
  2697.  
  2698.  
  2699. setTimeout( () => {
  2700. doNewSend(["2", [nearestPlayerAngle]]);
  2701. doNewSend(["5", [switchToRange, true]]);
  2702. console.info(`Changed weapon at ${new Date().getTime() - ctime}`);
  2703. ctime = new Date().getTime();
  2704. }, document.timeTween); //120-140?
  2705.  
  2706.  
  2707. setTimeout(() => {
  2708.  
  2709. doNewSend(["13c", [0, turretGear, 0]]);
  2710. }, 119);
  2711.  
  2712. setTimeout( () => {
  2713.  
  2714. doNewSend(["c", [0, null]]);
  2715. //doNewSend(["13c", [0, currentHat, 0]]);
  2716. if (currentAccessory == monkeyTail){
  2717. doNewSend(["13c", [0, currentAccessory, 1]]);
  2718. }
  2719. doNewSend(["5", [switchToWep, true]]);
  2720. console.info(`Finished at ${new Date().getTime() - ctime}`);
  2721. ctime = new Date().getTime();
  2722. }, 430);
  2723.  
  2724. setTimeout( () => {
  2725. if (bowWorked){
  2726. doNewSend(["5", [switchToRange, true]]);
  2727. }
  2728. }, 700);
  2729.  
  2730. setTimeout( () => {
  2731. if (bowWorked){
  2732. doNewSend([
  2733. "c",
  2734. [
  2735. 1,
  2736. null
  2737. ]
  2738. ]);
  2739. }
  2740. doNewSend(["13c", [0, currentHat, 0]]); /*test*/
  2741. }, 295);
  2742.  
  2743. setTimeout( () => {
  2744. if (bowWorked){
  2745. doNewSend(["c", [0, null]]);
  2746. }
  2747. }, 150);
  2748.  
  2749. setTimeout( () => {
  2750. inInstaProcess = false;
  2751. if (bowWorked){
  2752. doNewSend(["5", [switchToWep, true]]);
  2753. setTimeout( () => {
  2754. doNewSend(["c", [0, null]]);
  2755. }, 450);
  2756. bowWorked = false;
  2757. IN_PROCESS = false;
  2758. }
  2759. IN_PROCESS = false;
  2760. }, 1060);
  2761.  
  2762. //if it worked, fire, if it didn't dont fire
  2763. }
  2764.  
  2765. //IT WORKS ON AND OFF
  2766. // WTF ??!?p!?
  2767.  
  2768.  
  2769. } else if (document.activeElement.id.toLowerCase() !== 'chatbox' ){
  2770. if (e.keyCode == 108){ //use pressed "l"; spikes
  2771.  
  2772.  
  2773. let spikeVal;
  2774. if (havePoison()) {
  2775. spikeVal = 8;
  2776. } else if (haveGreat()){
  2777. spikeVal = 7;
  2778. } else if (haveSpinning()){
  2779. spikeVal = 9;
  2780. } else {
  2781. spikeVal = 6;
  2782. }
  2783.  
  2784.  
  2785. for (var i=0;i<4;i++){
  2786. let angle = (Math.PI/2)*i;
  2787. /*let x = Math.cos(angle)*50;
  2788. let y = Math.sin(angle)*50;
  2789. console.log(x, y);
  2790. aim(x, y);*/
  2791. document.dns(["2", [angle]]);
  2792. placeSpike(spikeVal);
  2793.  
  2794. }
  2795.  
  2796.  
  2797. } else if (e.keyCode == 111){ //user pressed "i"; traps
  2798. for (var j=0;j<4;j++){
  2799. document.dns(["2", [(Math.PI/2)*j]]);
  2800. document.dns(["5", [15, 0]]);
  2801. document.dns(["c", [1, null]]);
  2802. document.dns(["c", [0, null]]);
  2803. }
  2804.  
  2805. } else if (e.keyCode == iPressKey){
  2806.  
  2807. if (CORESTATE.ipress.rel){
  2808. if (CORESTATE.ipress.rel == "puton"){
  2809. document.dns(["13c", [0, putonName, 0]]);
  2810. } else if (CORESTATE.ipress.rel == "place"){
  2811. placeSpike(placeName);
  2812. }
  2813. }
  2814. }
  2815. else if (e.keyCode == 104){
  2816. if (focusPlayerObj && focusPlayerObj.clan){
  2817. document.dns(["10", [focusPlayerObj.clan]]);
  2818. }
  2819. }
  2820. }
  2821. });
  2822.  
  2823. window.kiH = () => {};
  2824.  
  2825. document.body.oncontextmenu = (e) => {
  2826.  
  2827. noallow = true;
  2828.  
  2829. setTimeout( () => {
  2830.  
  2831. let allActiveItems = Array.from(document.getElementById("actionBar").children).filter(x=>x.style.display != "none");
  2832. let allActiveIDs = allActiveItems.map(x=>parseInt(x.id.replace("actionBarItem", "")));
  2833. switchToWep = allActiveIDs[0];
  2834. switchToRange = allActiveIDs[1];
  2835. console.info(currentAccessory);
  2836. var ctime = new Date().getTime();
  2837. console.info(inInstaProcess)
  2838. if (!inInstaProcess){
  2839. console.info("got in");
  2840. inInstaProcess = true
  2841. IN_PROCESS = true;
  2842.  
  2843. doNewSend(["13c", [0, bullHelm, 0]]);
  2844. if (currentAccessory == monkeyTail){
  2845. doNewSend(["13c", [0, 0, 1]]);
  2846. }
  2847. doNewSend(["5", [switchToWep, true]]);
  2848. console.info("Starting at 0");
  2849.  
  2850. //after bad
  2851.  
  2852.  
  2853. setTimeout( () => {
  2854. doNewSend(["2", [nearestPlayerAngle]]);
  2855. doNewSend([
  2856. "c",
  2857. [
  2858. 1,
  2859. null
  2860. ]
  2861. ]); //If we're perfect, we only send this once
  2862. console.info(`Sending swing at ${new Date().getTime() - ctime}`);
  2863. ctime = new Date().getTime();
  2864. }, 20);
  2865.  
  2866.  
  2867.  
  2868. setTimeout( () => {
  2869. doNewSend(["2", [nearestPlayerAngle]]);
  2870. doNewSend(["5", [switchToRange, true]]);
  2871. console.info(`Changed weapon at ${new Date().getTime() - ctime}`);
  2872. ctime = new Date().getTime();
  2873. }, document.timeTween); //120-140?
  2874.  
  2875.  
  2876.  
  2877.  
  2878. setTimeout( () => {
  2879. doNewSend(["c", [0, null]]);
  2880. doNewSend(["13c", [0, currentHat, 0]]);
  2881. if (currentAccessory == monkeyTail){
  2882. doNewSend(["13c", [0, currentAccessory, 1]]);
  2883. }
  2884. doNewSend(["5", [switchToWep, true]]);
  2885. console.info(`Finished at ${new Date().getTime() - ctime}`);
  2886. ctime = new Date().getTime();
  2887. }, 600);
  2888.  
  2889. setTimeout( () => {
  2890. if (bowWorked){
  2891. doNewSend(["5", [switchToRange, true]]);
  2892. }
  2893. }, 730);
  2894.  
  2895. setTimeout( () => {
  2896. if (bowWorked){
  2897. doNewSend([
  2898. "c",
  2899. [
  2900. 1,
  2901. null
  2902. ]
  2903. ]);
  2904. }
  2905. }, 840);
  2906.  
  2907. setTimeout( () => {
  2908. if (bowWorked){
  2909. doNewSend(["c", [0, null]]);
  2910. }
  2911. }, 950);
  2912.  
  2913. setTimeout( () => {
  2914. inInstaProcess = false;
  2915. if (bowWorked){
  2916. doNewSend(["5", [switchToWep, true]]);
  2917. setTimeout( () => {
  2918. doNewSend(["c", [0, null]]);
  2919. }, 300);
  2920. bowWorked = false;
  2921. IN_PROCESS = false;
  2922. }
  2923. IN_PROCESS = false;
  2924. }, 1060);
  2925.  
  2926. //if it worked, fire, if it didn't dont fire
  2927. }
  2928.  
  2929. //IT WORKS ON AND OFF
  2930. // WTF ??!?p!?
  2931.  
  2932.  
  2933. }, 150);
  2934. }
  2935.  
  2936.  
  2937. document.ps = placeSpike;
  2938.  
  2939. });
  2940. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement