ClientStart can screw off.

This commit is contained in:
John Cote 2015-07-08 08:15:51 -04:00
parent d0c0054e89
commit 059b7801cb
7 changed files with 38 additions and 38 deletions

View file

@ -73,4 +73,4 @@ if pack and pack != 'default':
if not abort:
# Run
import toontown.toonbase.ClientStart
import toontown.toonbase.ToontownStart

View file

@ -19,4 +19,4 @@ echo "Username: $ttsUsername"
echo "Gameserver: $TTS_GAMESERVER"
echo "==============================="
ppython -m toontown.toonbase.ClientStart
ppython -m toontown.toonbase.ToontownStart

View file

@ -23,4 +23,4 @@ echo "Username: $ttsUsername"
echo "Gameserver: $TTS_GAMESERVER"
echo "==============================="
ppython -m toontown.toonbase.ClientStartRemoteDB
ppython -m toontown.toonbase.ToontownStartRemoteDB

View file

@ -21,4 +21,4 @@ echo "Username: $ttsUsername"
echo "Gameserver: $TTS_GAMESERVER"
echo "==============================="
ppython -m toontown.toonbase.ClientStart
ppython -m toontown.toonbase.ToontownStart

View file

@ -60,11 +60,11 @@ echo ===============================
cd ../../
if %INPUT%==2 (
"C:\Panda3D-1.10.0\python\ppython.exe" -m toontown.toonbase.ClientStartRemoteDB
"C:\Panda3D-1.10.0\python\ppython.exe" -m toontown.toonbase.ToontownStartRemoteDB
) else if %INPUT%==4 (
"C:\Panda3D-1.10.0\python\ppython.exe" -m toontown.toonbase.ClientStartRemoteDB
"C:\Panda3D-1.10.0\python\ppython.exe" -m toontown.toonbase.ToontownStartRemoteDB
) else (
"C:\Panda3D-1.10.0\python\ppython.exe" -m toontown.toonbase.ClientStart
"C:\Panda3D-1.10.0\python\ppython.exe" -m toontown.toonbase.ToontownStart
)
pause

View file

@ -58,7 +58,7 @@ if __debug__:
from direct.directnotify.DirectNotifyGlobal import directNotify
notify = directNotify.newCategory('ClientStart')
notify = directNotify.newCategory('ToontownStart')
notify.setInfo(True)
from otp.settings.Settings import Settings

View file

@ -1,30 +1,30 @@
import json
import os
import requests
from panda3d.core import *
username = os.environ['ttsUsername']
password = os.environ['ttsPassword']
accountServerEndpoint = 'http://www.toontownstride.com/api/'
session = requests.Session()
csrf_query = session.get(accountServerEndpoint + 'login/')
csrf = session.cookies.get_dict().get('csrftoken', '')
request = session.post(
accountServerEndpoint + 'login/',
data={'username': username, 'password': password, 'csrfmiddlewaretoken': csrf})
try:
response = json.loads('{'+request.text.split('{', 1)[1]) # so that we ignore the csrf token
except ValueError:
print "Couldn't verify account credentials."
else:
if response['status'] != 7:
print response['message']
else:
os.environ['TTS_PLAYCOOKIE'] = response['token']
os.environ['TTS_GAMESERVER'] = response['gameserver']
# Start the game:
import toontown.toonbase.ClientStart
import json
import os
import requests
from panda3d.core import *
username = os.environ['ttsUsername']
password = os.environ['ttsPassword']
accountServerEndpoint = 'http://www.toontownstride.com/api/'
session = requests.Session()
csrf_query = session.get(accountServerEndpoint + 'login/')
csrf = session.cookies.get_dict().get('csrftoken', '')
request = session.post(
accountServerEndpoint + 'login/',
data={'username': username, 'password': password, 'csrfmiddlewaretoken': csrf})
try:
response = json.loads('{'+request.text.split('{', 1)[1]) # so that we ignore the csrf token
except ValueError:
print "Couldn't verify account credentials."
else:
if response['status'] != 7:
print response['message']
else:
os.environ['TTS_PLAYCOOKIE'] = response['token']
os.environ['TTS_GAMESERVER'] = response['gameserver']
# Start the game:
import toontown.toonbase.ToontownStart