mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
ClientStart can screw off.
This commit is contained in:
parent
d0c0054e89
commit
059b7801cb
7 changed files with 38 additions and 38 deletions
|
@ -73,4 +73,4 @@ if pack and pack != 'default':
|
|||
|
||||
if not abort:
|
||||
# Run
|
||||
import toontown.toonbase.ClientStart
|
||||
import toontown.toonbase.ToontownStart
|
||||
|
|
|
@ -19,4 +19,4 @@ echo "Username: $ttsUsername"
|
|||
echo "Gameserver: $TTS_GAMESERVER"
|
||||
echo "==============================="
|
||||
|
||||
ppython -m toontown.toonbase.ClientStart
|
||||
ppython -m toontown.toonbase.ToontownStart
|
||||
|
|
|
@ -23,4 +23,4 @@ echo "Username: $ttsUsername"
|
|||
echo "Gameserver: $TTS_GAMESERVER"
|
||||
echo "==============================="
|
||||
|
||||
ppython -m toontown.toonbase.ClientStartRemoteDB
|
||||
ppython -m toontown.toonbase.ToontownStartRemoteDB
|
||||
|
|
|
@ -21,4 +21,4 @@ echo "Username: $ttsUsername"
|
|||
echo "Gameserver: $TTS_GAMESERVER"
|
||||
echo "==============================="
|
||||
|
||||
ppython -m toontown.toonbase.ClientStart
|
||||
ppython -m toontown.toonbase.ToontownStart
|
||||
|
|
|
@ -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
|
||||
|
|
2
toontown/toonbase/ClientStart.py → toontown/toonbase/ToontownStart.py
Executable file → Normal file
2
toontown/toonbase/ClientStart.py → toontown/toonbase/ToontownStart.py
Executable file → Normal 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
|
60
toontown/toonbase/ClientStartRemoteDB.py → toontown/toonbase/ToontownStartRemoteDB.py
Executable file → Normal file
60
toontown/toonbase/ClientStartRemoteDB.py → toontown/toonbase/ToontownStartRemoteDB.py
Executable file → Normal 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
|
Loading…
Reference in a new issue