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:
|
if not abort:
|
||||||
# Run
|
# Run
|
||||||
import toontown.toonbase.ClientStart
|
import toontown.toonbase.ToontownStart
|
||||||
|
|
|
@ -19,4 +19,4 @@ echo "Username: $ttsUsername"
|
||||||
echo "Gameserver: $TTS_GAMESERVER"
|
echo "Gameserver: $TTS_GAMESERVER"
|
||||||
echo "==============================="
|
echo "==============================="
|
||||||
|
|
||||||
ppython -m toontown.toonbase.ClientStart
|
ppython -m toontown.toonbase.ToontownStart
|
||||||
|
|
|
@ -23,4 +23,4 @@ echo "Username: $ttsUsername"
|
||||||
echo "Gameserver: $TTS_GAMESERVER"
|
echo "Gameserver: $TTS_GAMESERVER"
|
||||||
echo "==============================="
|
echo "==============================="
|
||||||
|
|
||||||
ppython -m toontown.toonbase.ClientStartRemoteDB
|
ppython -m toontown.toonbase.ToontownStartRemoteDB
|
||||||
|
|
|
@ -21,4 +21,4 @@ echo "Username: $ttsUsername"
|
||||||
echo "Gameserver: $TTS_GAMESERVER"
|
echo "Gameserver: $TTS_GAMESERVER"
|
||||||
echo "==============================="
|
echo "==============================="
|
||||||
|
|
||||||
ppython -m toontown.toonbase.ClientStart
|
ppython -m toontown.toonbase.ToontownStart
|
||||||
|
|
|
@ -60,11 +60,11 @@ echo ===============================
|
||||||
cd ../../
|
cd ../../
|
||||||
|
|
||||||
if %INPUT%==2 (
|
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 (
|
) 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 (
|
) 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
|
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
|
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||||
|
|
||||||
notify = directNotify.newCategory('ClientStart')
|
notify = directNotify.newCategory('ToontownStart')
|
||||||
notify.setInfo(True)
|
notify.setInfo(True)
|
||||||
|
|
||||||
from otp.settings.Settings import Settings
|
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 json
|
||||||
import os
|
import os
|
||||||
import requests
|
import requests
|
||||||
from panda3d.core import *
|
from panda3d.core import *
|
||||||
|
|
||||||
|
|
||||||
username = os.environ['ttsUsername']
|
username = os.environ['ttsUsername']
|
||||||
password = os.environ['ttsPassword']
|
password = os.environ['ttsPassword']
|
||||||
|
|
||||||
accountServerEndpoint = 'http://www.toontownstride.com/api/'
|
accountServerEndpoint = 'http://www.toontownstride.com/api/'
|
||||||
session = requests.Session()
|
session = requests.Session()
|
||||||
csrf_query = session.get(accountServerEndpoint + 'login/')
|
csrf_query = session.get(accountServerEndpoint + 'login/')
|
||||||
csrf = session.cookies.get_dict().get('csrftoken', '')
|
csrf = session.cookies.get_dict().get('csrftoken', '')
|
||||||
request = session.post(
|
request = session.post(
|
||||||
accountServerEndpoint + 'login/',
|
accountServerEndpoint + 'login/',
|
||||||
data={'username': username, 'password': password, 'csrfmiddlewaretoken': csrf})
|
data={'username': username, 'password': password, 'csrfmiddlewaretoken': csrf})
|
||||||
|
|
||||||
try:
|
try:
|
||||||
response = json.loads('{'+request.text.split('{', 1)[1]) # so that we ignore the csrf token
|
response = json.loads('{'+request.text.split('{', 1)[1]) # so that we ignore the csrf token
|
||||||
except ValueError:
|
except ValueError:
|
||||||
print "Couldn't verify account credentials."
|
print "Couldn't verify account credentials."
|
||||||
else:
|
else:
|
||||||
if response['status'] != 7:
|
if response['status'] != 7:
|
||||||
print response['message']
|
print response['message']
|
||||||
else:
|
else:
|
||||||
os.environ['TTS_PLAYCOOKIE'] = response['token']
|
os.environ['TTS_PLAYCOOKIE'] = response['token']
|
||||||
os.environ['TTS_GAMESERVER'] = response['gameserver']
|
os.environ['TTS_GAMESERVER'] = response['gameserver']
|
||||||
|
|
||||||
# Start the game:
|
# Start the game:
|
||||||
import toontown.toonbase.ClientStart
|
import toontown.toonbase.ToontownStart
|
Loading…
Reference in a new issue