some code for player profiles

This commit is contained in:
imayushsaini 2021-06-26 13:24:49 +05:30
parent 840abc6ee5
commit 02ec976174
19 changed files with 600 additions and 263 deletions

View file

@ -30,7 +30,7 @@ party_is_public: true
# servers on one machine.
# 43210 is the default and the only port that will show up in the LAN
# browser tab.
#port: 43210
port: 43210
# Max devices in the party. Note that this does *NOT* mean max players.
# Any device in the party can have more than one player on it if they have

2
dist/ba_root/.bsac2 vendored

File diff suppressed because one or more lines are too long

View file

@ -132,6 +132,7 @@
"Client Input Device #10": "__account__",
"Client Input Device #2": "__account__",
"Client Input Device #3": "__account__",
"Client Input Device #4": "__account__",
"Client Input Device #5": "__account__",
"Client Input Device #6": "__account__",
"Client Input Device #7": "__account__",
@ -163,35 +164,38 @@
"Plugins": {
"characters_duplicate.unlock_characters": {
"enabled": true
},
"importcustomcharacters.HeySmoothy": {
"enabled": true
}
},
"Port": 43210,
"Region Pings": {
"af-south-1": 332.0533000000001,
"ap-northeast-1": 153.0722999999998,
"ap-northeast-2": 177.3448999999996,
"ap-south-1": 44.40215280000021,
"ap-southeast-1": 154.81258440000002,
"ap-southeast-2": 177.44980000000066,
"ca-central-1": 237.2696999999997,
"eu-central-1": 161.99570000000028,
"eu-north-1": 173.3184000000003,
"eu-south-1": 150.99719999999994,
"eu-west-1": 174.4621000000004,
"eu-west-2": 172.11209999999966,
"eu-west-3": 160.90859999999995,
"me-south-1": 74.56136400000022,
"sa-east-1": 360.89020000000005,
"us-east-1": 235.8709999999995,
"us-east-2": 249.04710000000028,
"us-west-1": 270.4567000000004,
"us-west-2": 291.1767000000012
"af-south-1": 309.84879999999924,
"ap-northeast-1": 148.42390000000006,
"ap-northeast-2": 161.85600000000022,
"ap-south-1": 42.165108800000134,
"ap-southeast-1": 79.17185659999987,
"ap-southeast-2": 177.35650000000015,
"ca-central-1": 233.7878,
"eu-central-1": 154.8980000000002,
"eu-north-1": 184.45529999999977,
"eu-south-1": 162.1055,
"eu-west-1": 169.56609999999995,
"eu-west-2": 161.36629999999917,
"eu-west-3": 156.3263999999993,
"me-south-1": 71.85055820000007,
"sa-east-1": 351.13220000000035,
"us-east-1": 235.26540000000028,
"us-east-2": 252.81119999999913,
"us-west-1": 269.8210999999997,
"us-west-2": 282.83270000000016
},
"Show Tutorial": false,
"Signed In Last Session": false,
"Team Game Max Players": 20,
"Team Tournament Playlists": {},
"launchCount": 82,
"launchCount": 93,
"lc14173": 1,
"lc14292": 1
}

View file

@ -1,197 +1 @@
{
"Achievements": {
"Boom Goes the Dynamite": {
"Complete": false
},
"Boxer": {
"Complete": false
},
"Dual Wielding": {
"Complete": false
},
"Flawless Victory": {
"Complete": false
},
"Free Loader": {
"Complete": true
},
"Gold Miner": {
"Complete": false
},
"Got the Moves": {
"Complete": false
},
"In Control": {
"Complete": false
},
"Last Stand God": {
"Complete": false
},
"Last Stand Master": {
"Complete": false
},
"Last Stand Wizard": {
"Complete": false
},
"Mine Games": {
"Complete": false
},
"Off You Go Then": {
"Complete": false
},
"Onslaught God": {
"Complete": false
},
"Onslaught Master": {
"Complete": false
},
"Onslaught Training Victory": {
"Complete": false
},
"Onslaught Wizard": {
"Complete": false
},
"Precision Bombing": {
"Complete": false
},
"Pro Boxer": {
"Complete": false
},
"Pro Football Shutout": {
"Complete": false
},
"Pro Football Victory": {
"Complete": false
},
"Pro Onslaught Victory": {
"Complete": false
},
"Pro Runaround Victory": {
"Complete": false
},
"Rookie Football Shutout": {
"Complete": false
},
"Rookie Football Victory": {
"Complete": false
},
"Rookie Onslaught Victory": {
"Complete": false
},
"Runaround God": {
"Complete": false
},
"Runaround Master": {
"Complete": false
},
"Runaround Wizard": {
"Complete": false
},
"Sharing is Caring": {
"Complete": false
},
"Stayin' Alive": {
"Complete": false
},
"Super Mega Punch": {
"Complete": false
},
"Super Punch": {
"Complete": false
},
"TNT Terror": {
"Complete": false
},
"Team Player": {
"Complete": false
},
"The Great Wall": {
"Complete": false
},
"The Wall": {
"Complete": false
},
"Uber Football Shutout": {
"Complete": false
},
"Uber Football Victory": {
"Complete": false
},
"Uber Onslaught Victory": {
"Complete": false
},
"Uber Runaround Victory": {
"Complete": false
}
},
"Auto Account State": "Server",
"Auto Balance Teams": true,
"Campaigns": {},
"Default Player Profiles": {
"Client Input Device #1": "__account__",
"Client Input Device #10": "__account__",
"Client Input Device #2": "__account__",
"Client Input Device #3": "__account__",
"Client Input Device #5": "__account__",
"Client Input Device #6": "__account__",
"Client Input Device #7": "__account__",
"Client Input Device #8": "AARAV SINGH",
"Client Input Device #9": "__account__"
},
"Free-for-All Max Players": 20,
"Free-for-All Playlist Randomize": true,
"Free-for-All Playlist Selection": "__default__",
"Free-for-All Playlists": {},
"Idle Exit Minutes": null,
"Local Account Name": "Server751316",
"PSTR": 0,
"Player Profiles": {
"__account__": {
"character": "Spaz",
"color": [
0.5,
0.25,
1.0
],
"highlight": [
0.5,
0.25,
1.0
]
}
},
"Plugins": {
"characters_duplicate.unlock_characters": {
"enabled": true
}
},
"Port": 43210,
"Region Pings": {
"af-south-1": 312.64150000000154,
"ap-northeast-1": 153.12689879999954,
"ap-northeast-2": 165.05455279999813,
"ap-south-1": 44.22486380000026,
"ap-southeast-1": 88.89644679999981,
"ap-southeast-2": 177.04750000000047,
"ca-central-1": 239.786500000001,
"eu-central-1": 161.11233520000104,
"eu-north-1": 179.9086999999986,
"eu-south-1": 146.85989999999904,
"eu-west-1": 177.47380000000135,
"eu-west-2": 176.71720000000235,
"eu-west-3": 163.49899299999828,
"me-south-1": 76.81473880000011,
"sa-east-1": 348.776400000002,
"us-east-1": 235.8861999999995,
"us-east-2": 250.7388999999982,
"us-west-1": 266.3696999999985,
"us-west-2": 279.6805000000013
},
"Show Tutorial": false,
"Signed In Last Session": false,
"Team Game Max Players": 20,
"Team Tournament Playlists": {},
"launchCount": 82,
"lc14173": 1,
"lc14292": 1
}
{"Achievements": {"Boom Goes the Dynamite": {"Complete": false}, "Boxer": {"Complete": false}, "Dual Wielding": {"Complete": false}, "Flawless Victory": {"Complete": false}, "Free Loader": {"Complete": true}, "Gold Miner": {"Complete": false}, "Got the Moves": {"Complete": false}, "In Control": {"Complete": false}, "Last Stand God": {"Complete": false}, "Last Stand Master": {"Complete": false}, "Last Stand Wizard": {"Complete": false}, "Mine Games": {"Complete": false}, "Off You Go Then": {"Complete": false}, "Onslaught God": {"Complete": false}, "Onslaught Master": {"Complete": false}, "Onslaught Training Victory": {"Complete": false}, "Onslaught Wizard": {"Complete": false}, "Precision Bombing": {"Complete": false}, "Pro Boxer": {"Complete": false}, "Pro Football Shutout": {"Complete": false}, "Pro Football Victory": {"Complete": false}, "Pro Onslaught Victory": {"Complete": false}, "Pro Runaround Victory": {"Complete": false}, "Rookie Football Shutout": {"Complete": false}, "Rookie Football Victory": {"Complete": false}, "Rookie Onslaught Victory": {"Complete": false}, "Runaround God": {"Complete": false}, "Runaround Master": {"Complete": false}, "Runaround Wizard": {"Complete": false}, "Sharing is Caring": {"Complete": false}, "Stayin' Alive": {"Complete": false}, "Super Mega Punch": {"Complete": false}, "Super Punch": {"Complete": false}, "TNT Terror": {"Complete": false}, "Team Player": {"Complete": false}, "The Great Wall": {"Complete": false}, "The Wall": {"Complete": false}, "Uber Football Shutout": {"Complete": false}, "Uber Football Victory": {"Complete": false}, "Uber Onslaught Victory": {"Complete": false}, "Uber Runaround Victory": {"Complete": false}}, "Auto Account State": "Server", "Auto Balance Teams": true, "Campaigns": {}, "Default Player Profiles": {"Client Input Device #1": "__account__", "Client Input Device #10": "__account__", "Client Input Device #2": "__account__", "Client Input Device #3": "__account__", "Client Input Device #4": "__account__", "Client Input Device #5": "__account__", "Client Input Device #6": "__account__", "Client Input Device #7": "__account__", "Client Input Device #8": "AARAV SINGH", "Client Input Device #9": "__account__"}, "Free-for-All Max Players": 20, "Free-for-All Playlist Randomize": true, "Free-for-All Playlist Selection": "__default__", "Free-for-All Playlists": {}, "Idle Exit Minutes": null, "Local Account Name": "Server751316", "PSTR": 0, "Player Profiles": {"__account__": {"character": "Spaz", "color": [0.5, 0.25, 1.0], "highlight": [0.5, 0.25, 1.0]}}, "Plugins": {"characters_duplicate.unlock_characters": {"enabled": true}, "importcustomcharacters.HeySmoothy": {"enabled": true}}, "Port": 43210, "Region Pings": {"af-south-1": 307.74070000000006, "ap-northeast-1": 154.2659999999998, "ap-northeast-2": 158.4915999999996, "ap-south-1": 40.25631320000015, "ap-southeast-1": 86.4678368, "ap-southeast-2": 174.49279999999945, "ca-central-1": 236.5851000000001, "eu-central-1": 152.09510000000037, "eu-north-1": 212.78989999999976, "eu-south-1": 144.31680000000034, "eu-west-1": 178.33469999999974, "eu-west-2": 161.02659999999958, "eu-west-3": 170.33000000000075, "me-south-1": 74.62674959999978, "sa-east-1": 335.5498000000008, "us-east-1": 247.49200000000116, "us-east-2": 252.68529999999956, "us-west-1": 265.23389999999927, "us-west-2": 287.52839999999935}, "Show Tutorial": false, "Signed In Last Session": false, "Team Game Max Players": 20, "Team Tournament Playlists": {}, "launchCount": 92, "lc14173": 1, "lc14292": 1}

View file

@ -106,9 +106,10 @@ def kick(arguments):
def end(arguments):
if arguments == [] or arguments == ['']:
activity = _ba.get_foreground_host_activity()
activity.end_game()
try:
_ba.get_foreground_host_activity().end_game()
except:
pass

View file

@ -0,0 +1,60 @@
# ba_meta require api 6
from __future__ import annotations
from typing import TYPE_CHECKING
import ba,_ba
from bastd.actor.playerspaz import PlayerSpaz
from bastd.actor.scoreboard import Scoreboard
if TYPE_CHECKING:
from typing import Any, Type, List, Dict, Tuple, Union, Sequence, Optional
import os,json
from bastd.actor.spazappearance import *
def registercharacter(name,char):
t = Appearance(name.split(".")[0])
t.color_texture = char['color_texture']
t.color_mask_texture = char['color_mask']
t.default_color = (0.6, 0.6, 0.6)
t.default_highlight = (0, 1, 0)
t.icon_texture = char['icon_texture']
t.icon_mask_texture = char['icon_mask_texture']
t.head_model = char['head']
t.torso_model = char['torso']
t.pelvis_model = char['pelvis']
t.upper_arm_model = char['upper_arm']
t.forearm_model = char['forearm']
t.hand_model = char['hand']
t.upper_leg_model = char['upper_leg']
t.lower_leg_model = char['lower_leg']
t.toes_model = char['toes_model']
t.jump_sounds = char['jump_sounds']
t.attack_sounds = char['attack_sounds']
t.impact_sounds = char['impact_sounds']
t.death_sounds = char['death_sounds']
t.pickup_sounds = char['pickup_sounds']
t.fall_sounds = char['fall_sounds']
t.style = char['style']
# ba_meta export plugin
class HeySmoothy(ba.Plugin):
def __init__(self):
path=os.path.join(_ba.env()["python_directory_user"],"CustomCharacters" + os.sep)
if not os.path.isdir(path):
os.makedirs(path)
files=os.listdir(path)
for file in files:
with open(path+file, 'r') as f:
character = json.load(f)
registercharacter(file,character)

View file

@ -9,11 +9,24 @@ custom = {}
data_path = os.path.join(_ba.env()['python_directory_user'],"playersData" + os.sep)
# ============== player data =======================
def get_info(id):
with open(data_path+'profiles.json', 'r') as f:
profile = json.load(f)
return profile[id]
return None
def get_profiles():
with open(data_path+'profiles.json', 'r') as f:
profiles = json.load(f)
return profiles
def commit_profiles(profiles):
with open(data_path+'profiles.json', 'r') as f:
json.dump(profiles,f,indent=4)
def add_profile(id,display_string,allprofiles,currentname):
f=open(data_path+"profiles.json","r")
@ -23,6 +36,10 @@ def add_profile(id,display_string,allprofiles,currentname):
profiles[id]['display_string']=[display_string]
profiles[id]['profiles']=allprofiles
profiles[id]['name']=currentname
profiles[id]['isBan']=False,
profiles[id]['isMuted']=False,
profiles[id]['totaltimeplayer']=0,
profiles[id]['lastseen']=0,
f=open(data_path+"profiles.json","w")
json.dump(profiles,f,indent=4)
@ -49,9 +66,34 @@ def update_profile(id,display_string=None,allprofiles=[],name=None):
json.dump(profiles,f,indent=4)
f.close()
def ban_player(id):
f=open(data_path+"profiles.json","r")
profiles=json.load(f.read())
f.close()
if id in profiles:
profiles[id]['isBan']=True
commit_profiles(profiles)
def mute(id):
profiles=get_profiles()
if id in profiles:
profiles[id]["isMuted"]=True
commit_profiles(profiles)
def unmute(id):
profiles=get_profiles()
if id in profiles:
profiles[id]["isMuted"]=False
commit_profiles(profiles)
#================ ROLES ==========================
def commit_roles(data):
global roles
if data == {}:

View file

@ -2,6 +2,10 @@
"pb-difsdf":{
"display_string":[],
"profiles":[],
"name":"something"
"name":"something",
"isBan":false,
"isMuted":false,
"lastseen":14677,
"totaltimeplayed":0,
}
}

View file

@ -29,7 +29,7 @@
1
],
"commands": [],
"ids": ["pb-IF4iVUc5Cg==", "pb-IF4TVWwZUQ==", "pb-IF42VUpaDg==", "pb-IF4LVU0KKQ==", "pb-IF4uVW8bMw=="]
"ids": ["pb-IF4iVUc5Cg==", "pb-IF4vNnMJ", "pb-IF4TVWwZUQ==", "pb-IF42VUpaDg==", "pb-IF4LVU0KKQ=="]
},
"smoothy": {
"tag": "smoothy", "tagcolor": [1,

View file

@ -1 +1,4 @@
# Released under the MIT License. See LICENSE for details.
currentclients=[]
cachedclients=[]

View file

@ -15,7 +15,7 @@
"textonmap": {
"top watermark": "Welcome to server \n ip 192.168.0.1",
"bottom left watermark": "join discord for fun",
"bottom left watermark": "Search Hey Smoothy on Youtube",
"center highlights": [
"message 1",
"message 2",

View file

@ -1,6 +1,6 @@
{
"pb-IF4VAk4a": {
"rank": 15,
"rank": 30,
"name": "pb-IF4VAk4a",
"scores": 0,
"total_damage": 0.0,
@ -12,19 +12,19 @@
"aid": "pb-IF4VAk4a"
},
"pb-IF4TVWwZUQ==": {
"rank": 2,
"rank": 3,
"name": "\ue030PC295588",
"scores": 470,
"scores": 546,
"total_damage": 0.0,
"kills": 1,
"deaths": 70,
"games": 42,
"kd": 0.014,
"avg_score": 11.19,
"deaths": 73,
"games": 47,
"kd": 0.013,
"avg_score": 11.617,
"aid": "pb-IF4TVWwZUQ=="
},
"pb-JiNJARBaXEFBVF9HFkNXXF1EF0ZaRlZE": {
"rank": 7,
"rank": 8,
"name": "\ue020HeySmoothy",
"scores": 208,
"total_damage": 0.0,
@ -36,7 +36,7 @@
"aid": "pb-JiNJARBaXEFBVF9HFkNXXF1EF0ZaRlZE"
},
"pb-IF4uVW8bMw==": {
"rank": 5,
"rank": 6,
"name": "\ue020BurnedMedusa35646",
"scores": 396,
"total_damage": 0.0,
@ -48,7 +48,7 @@
"aid": "pb-IF4uVW8bMw=="
},
"pb-IF4eVUooAw==": {
"rank": 10,
"rank": 14,
"name": "\ue030Android51971883",
"scores": 159,
"total_damage": 0.0,
@ -72,7 +72,7 @@
"aid": "pb-IF4iVUc5Cg=="
},
"pb-IF4rV0MoFA==": {
"rank": 8,
"rank": 10,
"name": "\ue030Android31875021",
"scores": 188,
"total_damage": 0.0,
@ -84,7 +84,7 @@
"aid": "pb-IF4rV0MoFA=="
},
"pb-IF43VU0aVQ==": {
"rank": 6,
"rank": 7,
"name": "\ue020HARSHALgaming8992",
"scores": 253,
"total_damage": 0.0,
@ -96,7 +96,7 @@
"aid": "pb-IF43VU0aVQ=="
},
"pb-IF4LVU0KKQ==": {
"rank": 4,
"rank": 5,
"name": "\ue020SHAMANT1111",
"scores": 434,
"total_damage": 0.0,
@ -108,7 +108,7 @@
"aid": "pb-IF4LVU0KKQ=="
},
"pb-IF4VVUgJVw==": {
"rank": 9,
"rank": 12,
"name": "\ue020WobblyLining33",
"scores": 182,
"total_damage": 0.0,
@ -120,7 +120,7 @@
"aid": "pb-IF4VVUgJVw=="
},
"pb-IF4gVU0BCg==": {
"rank": 14,
"rank": 26,
"name": "\ue020Dewanggaming",
"scores": 43,
"total_damage": 0.0,
@ -132,7 +132,7 @@
"aid": "pb-IF4gVU0BCg=="
},
"pb-IF4FVXkZDQ==": {
"rank": 11,
"rank": 15,
"name": "\ue020lllBOLTlll",
"scores": 151,
"total_damage": 0.0,
@ -144,7 +144,7 @@
"aid": "pb-IF4FVXkZDQ=="
},
"pb-IF42VUpaDg==": {
"rank": 3,
"rank": 4,
"name": "\ue020EasterlyArtillery29",
"scores": 468,
"total_damage": 0.0,
@ -156,7 +156,7 @@
"aid": "pb-IF42VUpaDg=="
},
"pb-IF4iVUNSIw==": {
"rank": 13,
"rank": 23,
"name": "default",
"scores": 56,
"total_damage": 0.0,
@ -168,7 +168,7 @@
"aid": "pb-IF4iVUNSIw=="
},
"pb-IF4PVGcSJw==": {
"rank": 12,
"rank": 21,
"name": "\ue030Android29104233",
"scores": 84,
"total_damage": 0.0,
@ -178,5 +178,221 @@
"kd": 0.777,
"avg_score": 42.0,
"aid": "pb-IF4PVGcSJw=="
},
"pb-IF4eVVMkMw==": {
"rank": 16,
"name": "\ue030Android52887552",
"scores": 101,
"total_damage": 0.0,
"kills": 0,
"deaths": 18,
"games": 6,
"kd": 0.0,
"avg_score": 16.833,
"aid": "pb-IF4eVVMkMw=="
},
"pb-IF4vNnMJ": {
"rank": 2,
"name": "\ue020XXRGEXX2",
"scores": 674,
"total_damage": 0.0,
"kills": 25,
"deaths": 15,
"games": 10,
"kd": 1.666,
"avg_score": 67.4,
"aid": "pb-IF4vNnMJ"
},
"pb-IF4qV3c8Hw==": {
"rank": 29,
"name": "\ue020kankeisan1284578554",
"scores": 0,
"total_damage": 0.0,
"kills": 0,
"deaths": 1,
"games": 1,
"kd": 0.0,
"avg_score": 0.0,
"aid": "pb-IF4qV3c8Hw=="
},
"pb-IF4mVHFcLQ==": {
"rank": 13,
"name": "\ue030Android39744744",
"scores": 174,
"total_damage": 0.0,
"kills": 9,
"deaths": 14,
"games": 5,
"kd": 0.642,
"avg_score": 34.8,
"aid": "pb-IF4mVHFcLQ=="
},
"pb-IF4PVVIeHw==": {
"rank": 33,
"name": "\ue020VoraceMan",
"scores": 0,
"total_damage": 0.0,
"kills": 0,
"deaths": 0,
"games": 1,
"kd": 0.0,
"avg_score": 0.0,
"aid": "pb-IF4PVVIeHw=="
},
"pb-IF4AVXAmPA==": {
"rank": 25,
"name": "\ue020ESZ\u4e5bOptimusOp\u4e44",
"scores": 56,
"total_damage": 0.0,
"kills": 0,
"deaths": 0,
"games": 2,
"kd": 0.0,
"avg_score": 28.0,
"aid": "pb-IF4AVXAmPA=="
},
"pb-IF4AVVEPNw==": {
"rank": 17,
"name": "\ue020StealthyFelicity14",
"scores": 96,
"total_damage": 0.0,
"kills": 0,
"deaths": 2,
"games": 1,
"kd": 0.0,
"avg_score": 96.0,
"aid": "pb-IF4AVVEPNw=="
},
"pb-IF4SVU4MFw==": {
"rank": 31,
"name": "\ue020K\u211da\u03c4o\u0eae",
"scores": 0,
"total_damage": 0.0,
"kills": 0,
"deaths": 0,
"games": 2,
"kd": 0.0,
"avg_score": 0.0,
"aid": "pb-IF4SVU4MFw=="
},
"pb-IF4DVEkPEg==": {
"rank": 9,
"name": "\ue020StormyCliff19",
"scores": 192,
"total_damage": 0.0,
"kills": 0,
"deaths": 7,
"games": 3,
"kd": 0.0,
"avg_score": 64.0,
"aid": "pb-IF4DVEkPEg=="
},
"pb-IF4TVVNeMg==": {
"rank": 22,
"name": "\ue030Android52880740",
"scores": 61,
"total_damage": 0.0,
"kills": 0,
"deaths": 1,
"games": 2,
"kd": 0.0,
"avg_score": 30.5,
"aid": "pb-IF4TVVNeMg=="
},
"pb-IF4yVUcgBg==": {
"rank": 18,
"name": "\ue020RagedRibik28",
"scores": 93,
"total_damage": 0.0,
"kills": 0,
"deaths": 1,
"games": 1,
"kd": 0.0,
"avg_score": 93.0,
"aid": "pb-IF4yVUcgBg=="
},
"pb-IF4IVUUJMg==": {
"rank": 19,
"name": "\ue030Android51464300",
"scores": 90,
"total_damage": 0.0,
"kills": 0,
"deaths": 0,
"games": 2,
"kd": 0.0,
"avg_score": 45.0,
"aid": "pb-IF4IVUUJMg=="
},
"pb-IF4tVUwGVA==": {
"rank": 11,
"name": "\ue030Android52246284",
"scores": 183,
"total_damage": 0.0,
"kills": 9,
"deaths": 13,
"games": 3,
"kd": 0.692,
"avg_score": 61.0,
"aid": "pb-IF4tVUwGVA=="
},
"pb-IF48NmQO": {
"rank": 27,
"name": "default",
"scores": 6,
"total_damage": 0.0,
"kills": 0,
"deaths": 1,
"games": 1,
"kd": 0.0,
"avg_score": 6.0,
"aid": "pb-IF48NmQO"
},
"pb-IF4UVUQaAw==": {
"rank": 20,
"name": "\ue020LikelyTour25",
"scores": 85,
"total_damage": 0.0,
"kills": 11,
"deaths": 8,
"games": 2,
"kd": 1.375,
"avg_score": 42.5,
"aid": "pb-IF4UVUQaAw=="
},
"pb-IF4wVRECLg==": {
"rank": 28,
"name": "\ue020gogugu",
"scores": 0,
"total_damage": 0.0,
"kills": 0,
"deaths": 1,
"games": 2,
"kd": 0.0,
"avg_score": 0.0,
"aid": "pb-IF4wVRECLg=="
},
"pb-JiNJARBcV0FDXV1DGU5ZXV1FEUFWRVJC": {
"rank": 32,
"name": "\ue020appyfizz510",
"scores": 0,
"total_damage": 0.0,
"kills": 0,
"deaths": 0,
"games": 1,
"kd": 0.0,
"avg_score": 0.0,
"aid": "pb-JiNJARBcV0FDXV1DGU5ZXV1FEUFWRVJC"
},
"pb-IF4OVVMsDQ==": {
"rank": 24,
"name": "\ue030Android52893090",
"scores": 56,
"total_damage": 0.0,
"kills": 0,
"deaths": 0,
"games": 2,
"kd": 0.0,
"avg_score": 28.0,
"aid": "pb-IF4OVVMsDQ=="
}
}

View file

@ -27,14 +27,22 @@
</tr>
<tr>
<td>2</td>
<td style="text-align:center">PC295588</td>
<td>470</td>
<td>1</td>
<td>70</td>
<td>42</td>
<td style="text-align:center">XXRGEXX2</td>
<td>674</td>
<td>25</td>
<td>15</td>
<td>10</td>
</tr>
<tr>
<td>3</td>
<td style="text-align:center">PC295588</td>
<td>546</td>
<td>1</td>
<td>73</td>
<td>47</td>
</tr>
<tr>
<td>4</td>
<td style="text-align:center">EasterlyArtillery29</td>
<td>468</td>
<td>25</td>
@ -42,7 +50,7 @@
<td>4</td>
</tr>
<tr>
<td>4</td>
<td>5</td>
<td style="text-align:center">SHAMANT1111</td>
<td>434</td>
<td>28</td>
@ -50,7 +58,7 @@
<td>6</td>
</tr>
<tr>
<td>5</td>
<td>6</td>
<td style="text-align:center">BurnedMedusa35646</td>
<td>396</td>
<td>31</td>
@ -58,7 +66,7 @@
<td>6</td>
</tr>
<tr>
<td>6</td>
<td>7</td>
<td style="text-align:center">HARSHALgaming8992</td>
<td>253</td>
<td>12</td>
@ -66,7 +74,7 @@
<td>6</td>
</tr>
<tr>
<td>7</td>
<td>8</td>
<td style="text-align:center">HeySmoothy</td>
<td>208</td>
<td>8</td>
@ -74,7 +82,15 @@
<td>9</td>
</tr>
<tr>
<td>8</td>
<td>9</td>
<td style="text-align:center">StormyCliff19</td>
<td>192</td>
<td>0</td>
<td>7</td>
<td>3</td>
</tr>
<tr>
<td>10</td>
<td style="text-align:center">Android31875021</td>
<td>188</td>
<td>12</td>
@ -82,7 +98,15 @@
<td>3</td>
</tr>
<tr>
<td>11</td>
<td style="text-align:center">Android52246284</td>
<td>183</td>
<td>9</td>
<td>13</td>
<td>3</td>
</tr>
<tr>
<td>12</td>
<td style="text-align:center">WobblyLining33</td>
<td>182</td>
<td>10</td>
@ -90,7 +114,15 @@
<td>4</td>
</tr>
<tr>
<td>10</td>
<td>13</td>
<td style="text-align:center">Android39744744</td>
<td>174</td>
<td>9</td>
<td>14</td>
<td>5</td>
</tr>
<tr>
<td>14</td>
<td style="text-align:center">Android51971883</td>
<td>159</td>
<td>15</td>
@ -98,7 +130,7 @@
<td>6</td>
</tr>
<tr>
<td>11</td>
<td>15</td>
<td style="text-align:center">lllBOLTlll</td>
<td>151</td>
<td>9</td>
@ -106,7 +138,47 @@
<td>3</td>
</tr>
<tr>
<td>12</td>
<td>16</td>
<td style="text-align:center">Android52887552</td>
<td>101</td>
<td>0</td>
<td>18</td>
<td>6</td>
</tr>
<tr>
<td>17</td>
<td style="text-align:center">StealthyFelicity14</td>
<td>96</td>
<td>0</td>
<td>2</td>
<td>1</td>
</tr>
<tr>
<td>18</td>
<td style="text-align:center">RagedRibik28</td>
<td>93</td>
<td>0</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>19</td>
<td style="text-align:center">Android51464300</td>
<td>90</td>
<td>0</td>
<td>0</td>
<td>2</td>
</tr>
<tr>
<td>20</td>
<td style="text-align:center">LikelyTour25</td>
<td>85</td>
<td>11</td>
<td>8</td>
<td>2</td>
</tr>
<tr>
<td>21</td>
<td style="text-align:center">Android29104233</td>
<td>84</td>
<td>7</td>
@ -114,7 +186,15 @@
<td>2</td>
</tr>
<tr>
<td>13</td>
<td>22</td>
<td style="text-align:center">Android52880740</td>
<td>61</td>
<td>0</td>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>23</td>
<td style="text-align:center">default</td>
<td>56</td>
<td>2</td>
@ -122,7 +202,23 @@
<td>1</td>
</tr>
<tr>
<td>14</td>
<td>24</td>
<td style="text-align:center">Android52893090</td>
<td>56</td>
<td>0</td>
<td>0</td>
<td>2</td>
</tr>
<tr>
<td>25</td>
<td style="text-align:center">ESZ乛OptimusOp乄</td>
<td>56</td>
<td>0</td>
<td>0</td>
<td>2</td>
</tr>
<tr>
<td>26</td>
<td style="text-align:center">Dewanggaming</td>
<td>43</td>
<td>3</td>
@ -130,13 +226,61 @@
<td>3</td>
</tr>
<tr>
<td>15</td>
<td>27</td>
<td style="text-align:center">default</td>
<td>6</td>
<td>0</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>28</td>
<td style="text-align:center">gogugu</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>29</td>
<td style="text-align:center">kankeisan1284578554</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>30</td>
<td style="text-align:center">pb-IF4VAk4a</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>18</td>
</tr>
<tr>
<td>31</td>
<td style="text-align:center">Kaτoຮ</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>2</td>
</tr>
<tr>
<td>32</td>
<td style="text-align:center">appyfizz510</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
</tr>
<tr>
<td>33</td>
<td style="text-align:center">VoraceMan</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
</tr>
</table>
</body>
</html>

60
dist/ba_root/mods/tools/servercheck.py vendored Normal file
View file

@ -0,0 +1,60 @@
# Released under the MIT License. See LICENSE for details.
# NOT COMPLETED YET
from serverData import serverdata
class ServerChecker:
def __init__():
run()
def run(self):
clients=roset.players
# check if some one joined the party
for client in clients:
if cleint.account_id not in serverdata.currentclients:
self.playerjoined(client)
# check if some one left the party
clients_id=[client.account_id for client in clients]
for player in serverdata.currentclients:
if player not in clients_id:
self.playerleft(player)
def playerjoined(self,client):
if client.account_id in serverdata.cachedclients:
serevrdata.currentclients[client_account_id]=serverdata.cachedclients[id]
playerData=pdata.get_info(client.account_id)
playerData["lastjoin"]=time.time()
if playerData ==None:
self.registernewplayer(cleint)
else if playerData['isBan']:
_ba.disconnect_client(client.client_id,9999)
else:
serverData.currentclients[client_account_id]=playerData
def playerleft(self,player):
serverdata.cachedclients[player]=serverdata.currentclients[player]
serverdata.currentclients.remove(player)
timeplayed=time.time()-serverdata.currentclients[player]['lastjoin']
serverdata.cachedclients[player]["totaltimeplayed"]+=timeplayed
pdata.update_profile(serverdata.cachedclients[player])

View file

@ -1 +0,0 @@
# Released under the MIT License. See LICENSE for details.