Advertisement
Guest User

Untitled

a guest
Jun 24th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.33 KB | None | 0 0
  1. // Version 1.6 - Created by FREEDOM
  2. // This is exactly the same as the AUTO function on the site except this one throws in
  3. // a random amount of rounds to stop betting when it lost only to begin again after
  4. // waiting. This is to reduce the chance of it riding a red train while afking.
  5. //
  6. // Chrome: Press f12 and switch to the console tab. Stats and outputs will be shown there.
  7.  
  8. var idontwannaspendthismuch = 8;
  9. var roadtoknife = [1,2,3,5,8,13,21,34];
  10. var luckynumber_special = 17;
  11. var doingit = false;
  12. var yess = 0;
  13. var nooo = 0;
  14. var specialattack = 0;
  15. var ncra = 0;
  16. var greentrain = 0;
  17. var redtrain = 0;
  18. var prevg = false;
  19. var prevw = false;
  20. var mred = 0;
  21. var mgreen = 0;
  22. var xgreen = 0;
  23. var xred = 0;
  24. var lgreen = 0;
  25. var lred = 0;
  26. var my_dick = 0;
  27. var betAmount = 4; // Set the amount to bet. Must be more than 1
  28. var cashOut = 2; // x
  29. var noNegative = -10000; // If your net goes this much negative it stops betting
  30. var Rmin = 1; // Minimum amount of rounds to wait before betting again after a loss
  31. var Rmax = 5; // Maximum amount of rounds to wait before betting again after a lossµ
  32. var pulloutMethod = 1; // 1 = Rmin to Rmax Pullout, 2 = Multiplier Pullout (set amount below)
  33. var pulloutMultiAmount = 3; //2: Amount of times to let it crash below cashOut before betting again
  34.  
  35. //============= Modify Past this line at your own risk ==================
  36. var net = 0;
  37. var minBet = 1;
  38. var gamesPlayed = 0;
  39. var gamesWon = 0;
  40. var gamesLost = 0;
  41. var gamesNotEntered = 0;
  42. var maxBet = engine.getMaxBet();
  43. var ID = engine.getSteamID();
  44. var balance = engine.getBalance();
  45. var curBR = balance;
  46. var maxBR = balance;
  47. var minBR = balance;
  48. var startBR = balance;
  49. var cashedOut = true;
  50. var pullout = 0;
  51. var pullout2 = 0;
  52. var pullout2count = 0;
  53. var count = 0;
  54. var gameResult;
  55. var gameInside;
  56. errorHandling();
  57.  
  58. engine.on('game_starting', function(info) {
  59. //console.log('Game Starting in ' + info.time_till_start);
  60. placeBet();
  61. });
  62.  
  63. engine.on('game_started', function(data) {
  64. //console.log('Game Started', data);
  65. });
  66.  
  67. engine.on('game_crash', function(data) {
  68. console.log('Game crashed at ', (data.game_crash/100));
  69. ncra = data.game_crash;
  70. gameResult = engine.lastGamePlay();
  71. gameInside = engine.lastGamePlayed();
  72. if (gameResult=="WON"&&gameInside==true) {
  73.  
  74.  
  75. netUpdate();
  76. specialattack = specialattack + 1;
  77. if (prevg == true){
  78. greentrain = greentrain + 1;
  79. redtrain = 0;
  80.  
  81.  
  82. }
  83. else{
  84.  
  85. redtrain = redtrain + 1;
  86. greentrain = 0;
  87.  
  88. }
  89. gamesWon += 1;
  90. betAmount = 4;
  91. my_dick = 0;
  92. gamesPlayed += 1;
  93. prevg = true;
  94. logg();
  95. }
  96. else if (gameResult=="LOST"&&gameInside==true) {
  97. netUpdate();
  98. gamesLost += 1;
  99. betAmount = betAmount *2; //This is the Martingale
  100. if (betAmount >= idontwannaspendthismuch){
  101.  
  102.  
  103. engine.stop();
  104.  
  105.  
  106. }
  107. my_dick = my_dick + 1; //This is the Golden Number State, to chose the position of the Golden Number Array
  108. if (my_dick > 7) { //Best name ever
  109. my_dick = 0;
  110.  
  111. };
  112. gamesPlayed += 1;
  113. prevg = false;
  114. pulloutMethodM();
  115. }
  116. else if (gameInside==false&&(pullout>0||pullout2count>0)) {
  117. pullout2 = (data.game_crash/100);
  118. pulloutCalc();
  119. }
  120. });
  121.  
  122. engine.on('player_bet', function(data) {
  123. if (data.steamid == ID) {
  124. cashedOut = false;
  125. }
  126. });
  127.  
  128. engine.on('cashed_out', function(resp) {
  129. if (resp.steamid == ID) {
  130. cashedOut = true;
  131. }
  132. });
  133.  
  134. engine.on('msg', function(data) {
  135. //console.log('Chat message!...');
  136. });
  137.  
  138. engine.on('connect', function() {
  139. //console.log('Client connected, this wont happen when you run the script');
  140. });
  141.  
  142. engine.on('disconnect', function() {
  143. //console.log('Client disconnected');
  144. });
  145. function errorHandling() {
  146. if (betAmount>=1&&betAmount<=50000);
  147. else {
  148. console.log('Wrong betting amount','\n','Bot stopped');
  149. engine.stop();
  150. }
  151. if (cashOut>=1);
  152. else {
  153. console.log('Multiplier setting is wrong','\n','Bot stopped');
  154. engine.stop();
  155. }
  156. if (Rmax<Rmin) {
  157. console.log('Random range is wrong. Rmax cannot be lower than Rmin','\n','Bot stopped');
  158. engine.stop();
  159. }
  160. if (pulloutMethod>=3||pulloutMethod<=0) {
  161. console.log('Wrong pullout method selected','\n','Bot stopped');
  162. engine.stop();
  163. }
  164. if (noNegative>=0) {
  165. console.log('noNegative must be in the negatives','\n','Bot stopped');
  166. engine.stop();
  167. }
  168. console.log('No errors, bot started');
  169. }
  170. function placeBet() {
  171. if (pullout2count==0&&pullout==0&&(net/100)>noNegative) {
  172. cashedOut = false;
  173. if (specialattack >= luckynumber_special){
  174. betAmount = betAmount*4;
  175. special();
  176. specialattack = 0;
  177. }
  178. else{
  179.  
  180. cashOut = 2;
  181. }
  182. engine.placeBet( betAmount*100, cashOut*100, false );
  183. console.log('Placing a bet: ',betAmount);
  184. }
  185. else {
  186. if (pullout>0||pullout2count>0) {
  187. }
  188. else {
  189. console.log('Bet amount invalid. Bot stopped');
  190. engine.stop();
  191. }
  192. }
  193. }
  194. function pulloutMethodM() {
  195. switch(pulloutMethod) {
  196. case 1:
  197. pullout = (roadtoknife[my_dick]);
  198. logg();
  199. console.log('Lost a bet, waiting for ',pullout,' rounds before betting again');
  200. break;
  201. case 2:
  202. console.log('debug 3')
  203. pullout2count = pulloutMultiAmount;
  204. logg();
  205. console.log('Waiting ',pullout2count,'rounds were the crash is less than ',cashOut);
  206. break;
  207. default:
  208. console.log('Wrong method specified. Type in 1 or 2','\n','Bot Stopped');
  209. engine.stop();
  210. break;
  211. }
  212.  
  213. }
  214. function pulloutCalc() {
  215. switch(pulloutMethod) {
  216. case 1:
  217. pullout -= 1;
  218. console.log('Pullout is at ',pullout);
  219. break;
  220. case 2:
  221. if (pullout2<=cashOut) {
  222. pullout2count -= 1
  223. console.log('Pullout is at ',pullout2count);
  224. }
  225. break;
  226. default:
  227. console.log('Pullout error','\n','Bot stopped');
  228. engine.stop();
  229. }
  230.  
  231. }
  232. function netUpdate() {
  233. curBR = engine.getBalance();
  234. if (curBR<minBR) {
  235. minBR = curBR;
  236. }
  237. else if (curBR>maxBR) {
  238. maxBR = curBR;
  239. }
  240. net = curBR - startBR;
  241. }
  242.  
  243. function special() {
  244.  
  245. //special bet will get a number between 2 and 10 and propose it as multiplier
  246. //the closest to 2 the greater is the chance to get the number as multiplier
  247. var first = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,6,6,6,6,7,7,7,8,8,9,10];
  248. var second = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,6,6,6,6,7,7,7,8,8,9];
  249. var third = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,6,6,6,6,7,7,7,8,8,9];
  250. var fch = first[Math.floor((Math.random() * (first.length)) + 0)];
  251. var sch = second[Math.floor((Math.random() * second.length) + 0)];
  252. var tch = third[Math.floor((Math.random() * third.length) + 0)];
  253. fch = String(fch);
  254. sch = String(sch);
  255. tch = String(tch);
  256. var nm = parseFloat((fch + "." + sch + tch));
  257. cashOut = nm;
  258. console.log("Cash out multiplier : ",nm);
  259. doingit = true;
  260.  
  261.  
  262. }
  263.  
  264.  
  265.  
  266. function logg() {
  267.  
  268. if ((doingit == true) && (ncra >= cashOut)){
  269. yess = yess + 1;
  270. doingit = false;
  271. }
  272. if ((doingit == true) && (ncra < cashOut)){
  273.  
  274. nooo = nooo + 1;
  275. doingit = false;
  276. }
  277. console.log('\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n');
  278. if ( (ncra) < 200){
  279.  
  280. mred = mred + 1;
  281. mgreen = 0;
  282. }
  283. else{
  284.  
  285. mgreen = mgreen + 1;
  286. mred = 0;
  287. }
  288. if (mgreen > xgreen){
  289. xgreen = mgreen;
  290. };
  291. if (mred > xred){
  292. xred = mred;
  293. };
  294.  
  295.  
  296.  
  297.  
  298. if (greentrain > lgreen){
  299. lgreen = greentrain;
  300. };
  301. if (redtrain > lred){
  302. lred = redtrain;
  303. };
  304.  
  305. console.log('Total games played: ',gamesPlayed);
  306. console.log('Total games won/lost: ',gamesWon,'/',gamesLost , '|| Special in ', (luckynumber_special - specialattack), 'round(s) ||' , ' Specials won/lost ', yess,"/",nooo);
  307. console.log('Golden number state',my_dick);
  308. console.log('Gone through : Longest green train ', lgreen, '- Longest red train ', lred);
  309. console.log('In the game : Longest green train ', xgreen, '- Longest red train ', xred);
  310. console.log('Net: ', net/100);
  311. if (betAmount >= idontwannaspendthismuch){
  312.  
  313. console.log("Bot stopped since the betting amount exceded ",idontwannaspendthismuch);
  314. }
  315. }
  316. function checkBet(moni) {
  317. return (moni>=1&&moni<=50000);
  318. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement