Пример #1
0
def countdown(t):  # in seconds
    for i in range(t, 0, -1):
        if (not i % 10):
            #print ('sleeping for %d seconds\r' % i,)
            sys.stdout.write(str(i) + ' ')
            sys.stdout.flush()
        time.sleep(1)


logging.basicConfig(filename='primeDiceBot.log', level=logging.DEBUG)

logging.debug("Start")

helpme = primedice.helpers()
helpme.config_check(config)
user = primedice.primedice()
user.login(config.username, config.password)
logging.info("Current Balance = %s" % (user.balance))
init_balance = user.balance
game = strategy.MultyplyStrategy(user)
game.critical_lose = -200
#game.target = user.balance*1.5
while (user.balance >= init_balance):
    init_balance = user.balance
    game.target = 110
    game.start()
    countdown(120)
'''game = primedice_tester.primedice_tester(200)
test_strat = strategy.MultyplyStrategy(game)    
init_balance = game.balance
test_strat.critical_lose = -200
Пример #2
0
import requests
import sqlite3
import sys
import time

import config
import primeDiceClass as primedice

if len(sys.argv) < 4:
	# sys.exit('usage: bot.py <login> <password> <token> <optional tor_port>')
	sys.exit('usage: bot.py <login> <password> <token> <optional proxy_host> <optional proxy_port>')

logging.basicConfig(filename='log-' + sys.argv[1] + '.txt', level=logging.INFO, format='[%(asctime)s] %(levelname)s : %(message)s', datefmt='%H:%M:%S')
logging.info("=== Bot is starting, please wait!")

bot = primedice.primedice()
if len(sys.argv) > 5:
	bot.setProxy(sys.argv[4], sys.argv[5])
elif len(sys.argv) > 4:
	bot.setProxy(sys.argv[4])
while True:
	if bot.login(sys.argv[1], sys.argv[2], sys.argv[3]):
		break
	bot.restartTor()

bet_size = config.base_bet
streak = 0
profit = 0
wins = 0

conn = sqlite3.connect('primedice-' + sys.argv[1] + '.sqlite')
Пример #3
0
def countdown(t): # in seconds
    for i in range(t,0,-1):
        if(not i % 10):
          #print ('sleeping for %d seconds\r' % i,)
          sys.stdout.write(str(i)+' ')
          sys.stdout.flush()
        time.sleep(1)
        
logging.basicConfig(filename='primeDiceBot.log',level = logging.DEBUG)


logging.debug("Start")

helpme = primedice.helpers()
helpme.config_check(config)
user = primedice.primedice()
user.login(config.username, config.password)
logging.info( "Current Balance = %s" % (user.balance)) 
init_balance = user.balance
game = strategy.MultyplyStrategy(user)    
game.critical_lose = -200
#game.target = user.balance*1.5
while(user.balance >= init_balance):
    init_balance = user.balance
    game.target = 110
    game.start()
    countdown(120)


'''game = primedice_tester.primedice_tester(200)
test_strat = strategy.MultyplyStrategy(game)