@@ -12,16 +12,18 @@ block content
1212 var nums = 0 , currency = ' btc' , base = 0 , isloop = false , currentLanguage = ' lua' ;
1313 var autoLossRadio, autoWinRadio;
1414 var code;
15- var startTime = new Date (), settime, difftime = 0 ;
15+ var startTime = new Date (), settime, difftime = 0 , intervalBetTime = 0 ;
1616 var toggleLog = false , toggleChart = true ;
1717 var basebet = 0.00000001 , nextbet = 0.00000001 , chance = 90 , bethigh = false ;
1818 var previousbet = 0 , win = false , currentprofit = 0 , balance = 0 , bets = 0 , wins = 0 , losses = 0 , profit = 0 , currentstreak = 0 , currentroll = 0 , currentAmount = 0 , totalprofit = 0 ;
1919 var lastbet = {id: 0 ,chance: chance, date: 1585642326 ,roll: 49.5 ,amount: nextbet,nonce: 1000 ,serverhash: ' mydice' ,serverseed: ' mydice' ,clientseed: ' mydice' ,profit: profit,uid: 1000 ,high: bethigh};
2020 var humps = [' baseBet' , ' nextBet' , ' betHigh' , ' previousBet' , ' currentProfit' , ' currentStreak' ,' currentRoll' ,' lastBet.Id' ,' lastBet.Chance' ,' lastBet.date' ,' lastBet.Roll' ,' lastBet.Amount' ,' lastBet.nonce' ,' lastBet.serverhash' ,' lastBet.serverseed' ,' lastBet.clientseed' ,' lastBet.Profit' ,' lastBet.uid' ,' lastBet.high' ,' lastBet' ];
2121 var maxwinstreak = 0 , maxlossstreak = 0 , maxwinstreakamount = 0 , maxlossstreakamount = 0 , maxstreakamount = 0 , minstreakamount = 0 , maxbetamount= 0 ;
22- fengari .load (' function stop()\n isloop = false \n js.global:stop() \n print(isloop) \ n end' )();
22+ fengari .load (' function stop()\n isloop = false \n js.global:stop() \n end' )();
2323 fengari .load (' function resetseed()\n js.global:resetseed() \n end' )();
2424 fengari .load (' function resetsession()\n js.global:resetsession() \n end' )();
25+ fengari .load (' function resetstats()\n js.global:resetstats() \n end' )();
26+ fengari .load (' function betinterval(ms)\n js.global:betinterval(ms) \n end' )();
2527 fengari .load (' function sound(file)\n js.global:sound(file) \n end' )();
2628 fengari .load (' function message(text, type, expire)\n js.global:message(text, type, expire) \n end' )();
2729 fengari .load (' function start()\n js.global:start() \n end' )();
@@ -370,6 +372,34 @@ block content
370372 },
371373 width: 400 ,
372374 cells: [
375+ {
376+ header: " Tutorials" ,
377+ body: {
378+ id: " youtube_form" ,
379+ view: " form" ,
380+ height: 0 ,
381+ width: 0 ,
382+ scroll: true ,
383+ rows: [
384+ {
385+ view: " iframe" ,
386+ src: " https://www.youtube.com/embed/mvCedgWmp8w"
387+ },
388+ {
389+ view: " iframe" ,
390+ src: " https://www.youtube.com/embed/u7MXeReh0VE?t=1"
391+ },
392+ {
393+ view: " iframe" ,
394+ src: " https://www.youtube.com/embed/0e8Hm9uf4xU?t=13"
395+ },
396+ {
397+ view: " iframe" ,
398+ src: " https://www.youtube.com/embed/vVxUOKJ_lSs?t=220"
399+ },
400+ ]
401+ }
402+ },
373403 {
374404 header: " BOT" ,
375405 body: {
@@ -672,6 +702,14 @@ block content
672702 value: " 0" ,
673703 name: " auto_bet_reseed"
674704 },
705+ {
706+ id: " auto_bet_interval" ,
707+ view: " text" ,
708+ label: " BET INTERVAL [ms] (0:NON-INTERVAL)" ,
709+ labelWidth: 230 ,
710+ value: " 0" ,
711+ name: " auto_bet_interval"
712+ },
675713 ]
676714 },
677715 {
@@ -1319,6 +1357,14 @@ block content
13191357 value: " 0" ,
13201358 name: " auto_bet_reseed"
13211359 },
1360+ {
1361+ id: " auto_bet_interval" ,
1362+ view: " text" ,
1363+ label: " BET INTERVAL [ms] (0:NON-INTERVAL)" ,
1364+ labelWidth: 230 ,
1365+ value: " 0" ,
1366+ name: " auto_bet_interval"
1367+ },
13221368 ]},
13231369 {
13241370 id: " auto_resetseed_button" ,
@@ -1902,6 +1948,14 @@ block content
19021948 let layout = $$ (" mobile_toolbar" ).getParentView ();
19031949 layout .show ();
19041950 });
1951+ $$ (" auto_bet_interval" ).attachEvent (" onFocus" , function (current_view , prev_view ){
1952+ let layout = $$ (" mobile_toolbar" ).getParentView ();
1953+ layout .hide ();
1954+ });
1955+ $$ (" auto_bet_interval" ).attachEvent (" onBlur" , function (current_view , prev_view ){
1956+ let layout = $$ (" mobile_toolbar" ).getParentView ();
1957+ layout .show ();
1958+ });
19051959
19061960 $$ (" mobile_toolbar_total" ).attachEvent (" onItemClick" , function (){
19071961 $$ (" bet_total_stats" ).show ();
@@ -2201,6 +2255,11 @@ block content
22012255 refresh (currencyValue);
22022256 resetBetTime ();
22032257 }
2258+ function resetstats (){
2259+ currencyValue = $$ (" bet_currency_selection" ).getValue ();
2260+ refreshStats (currencyValue);
2261+ resetBetTime ();
2262+ }
22042263 function resetseed (){
22052264 let now = Math .floor (Date .now ()/ 1000 );
22062265 let diff = now - lastResetSeed;
@@ -2414,7 +2473,7 @@ block content
24142473 }
24152474 function action (c ,h ,p ,ch ,cv ,cb ){
24162475 let houseEdgeValue = $$ (" bet_house_edge_selection" ).getValue ();
2417- webix .ajax ().post (' bet' , { Currency: c, PayIn: p, High: h, Chance: ch, CurrencyValue: cv, HouseEdge: houseEdgeValue }).then (function (result ) {
2476+ webix .ajax ().post (' bet' , { Currency: c, PayIn: p, High: h, Chance: ch, CurrencyValue: cv, HouseEdge: houseEdgeValue, intervalBetTime : intervalBetTime }).then (function (result ) {
24182477 let ret = result .json ();
24192478 cb (ret);
24202479 }).fail (function (xhr ) {
@@ -2425,6 +2484,9 @@ block content
24252484 webix .message ({type: ' error' , text: response .err });
24262485 });
24272486 }
2487+ function betinterval (ms ) {
2488+ intervalBetTime = ms;
2489+ }
24282490 function checkerr (mess ){
24292491 let result = webix .ajax ().sync ().get (' checkerr?mess=' + mess+ ' &count=' + errCount );
24302492 let ret = JSON .parse (result .responseText );
@@ -2458,6 +2520,7 @@ block content
24582520 }
24592521 currencyValue = $$ (" bet_currency_selection" ).getValue () - 1 ;
24602522 let currentAmount = p/ 100000000 ;
2523+ intervalBetTime = $$ (" auto_bet_interval" ).getValue ();
24612524 action (c,h,p,ch,currencyValue,function (ret ) {
24622525 try {
24632526 if (isError (ret)) {
@@ -2665,6 +2728,28 @@ block content
26652728 stopOnWin = false ;
26662729 stopOnLoss = false ;
26672730 }
2731+ function clearStats (){
2732+ $$ (' bet_current_stats2' ).setValues ({
2733+ bet_current_stats_current_streak: 0 ,
2734+ bet_current_stats_max_win_streak: 0 ,
2735+ bet_current_stats_max_loss_streak: 0 ,
2736+ bet_current_stats_max_win_streak_amount: 0 ,
2737+ bet_current_stats_max_loss_streak_amount: 0 ,
2738+ bet_current_stats_max_bet_amount: 0 ,
2739+ bet_current_stats_seed: 0 ,
2740+ });
2741+ $$ (' bet_current_stats3' ).setValues ({
2742+ bet_time: 0 ,
2743+ bets: 0 ,
2744+ bet_profit_per_hour: 0 ,
2745+ bet_profit_per_day: 0 ,
2746+ bet_profit_per_bet: 0 ,
2747+ });
2748+ maxstreakamount = 0 ;
2749+ minstreakamount = 0 ;
2750+ stopOnWin = false ;
2751+ stopOnLoss = false ;
2752+ }
26682753 function refresh (newId ) {
26692754 clear (function (userinfo ){
26702755 setStats (userinfo, newId- 1 );
@@ -2673,6 +2758,14 @@ block content
26732758 clearSession ();
26742759 });
26752760 }
2761+ function refreshStats (newId ) {
2762+ clear (function (userinfo ){
2763+ setStats (userinfo, newId- 1 );
2764+ $$ (' bet_datatable' ).clearAll ();
2765+ $$ (" bet_chart_graph" ).clearAll ();
2766+ clearStats ();
2767+ });
2768+ }
26762769 function clear (cb ){
26772770 $$ (" bet_chart" ).showProgress ({
26782771 type: " icon" ,
@@ -2987,8 +3080,12 @@ block content
29873080 ' window.resume()\n ' ;
29883081 resetSeedFun = ' \n def resetseed():\n ' +
29893082 ' window.resetseed()\n ' ;
3083+ betintervalFun = ' \n def betinterval(ms):\n ' +
3084+ ' window.betinterval(ms)\n ' ;
29903085 resetSessionFun = ' \n def resetsession():\n ' +
29913086 ' window.resetsession()\n ' ;
3087+ resetStatsFun = ' \n def resetstats():\n ' +
3088+ ' window.resetstats()\n ' ;
29923089 stopFun = ' \n def stop():\n ' +
29933090 ' window.isloop = False\n ' +
29943091 ' global isloop\n ' +
@@ -3022,7 +3119,7 @@ block content
30223119 ' \n document["python_before_bet_button"].bind("click", beforebet)\n ' +
30233120 ' \n document["python_after_bet_button"].bind("click", afterbet)\n ' +
30243121 ' \n document["python_stop_button"].bind("click", stopbet)\n ' ;
3025- strScript = strScript + messageFun + resetSeedFun + resetSessionFun + soundFun + stopFun + startFun + resumeFun + stopBetFun + beforeBetFun + afterBetFun + clickFun;
3122+ strScript = strScript + messageFun + resetSeedFun + resetSessionFun + resetStatsFun + soundFun + stopFun + startFun + resumeFun + stopBetFun + beforeBetFun + afterBetFun + clickFun + betintervalFun ;
30263123
30273124 // console.log("eval python:",strScript);
30283125 let dynamicStr = document .createElement (" script" );
0 commit comments