mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-26 05:02:31 -06:00
29 lines
No EOL
757 B
Python
Executable file
29 lines
No EOL
757 B
Python
Executable file
#!/usr/bin/env python2
|
|
import json
|
|
import os
|
|
import requests
|
|
from pandac.PandaModules import *
|
|
|
|
|
|
username = os.environ['ttsUsername']
|
|
password = os.environ['ttsPassword']
|
|
|
|
accountServerEndpoint = ConfigVariableString(
|
|
'account-server-endpoint',
|
|
'http://tigercat1.me/tmpremote/api/').getValue()
|
|
request = requests.post(
|
|
accountServerEndpoint + 'login/',
|
|
data={'n': username, 'p': password})
|
|
|
|
try:
|
|
response = json.loads(request.text)
|
|
except ValueError:
|
|
print "Couldn't verify account credentials."
|
|
else:
|
|
if not response['success']:
|
|
print response['reason']
|
|
else:
|
|
os.environ['TTS_PLAYCOOKIE'] = response['token']
|
|
|
|
# Start the game:
|
|
import toontown.toonbase.ClientStart |