CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
TristonStuart

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: TristonStuart/ShellShockersHack
Path: blob/master/ss_map.js
Views: 327
1
// This Is A File Containing UnCompressed / Obfuscated Functions from ShellShockers and the function location in newer versions with Obfuscated funcitons
2
// Found By : TDStuart
3
4
// Add Player
5
// Obfuscated :
6
function Ci(e) {
7
e.id == l && (S = e.id);
8
var t = new ht(e,gr);
9
t.id == l && (Pr = t,
10
(Er = t).ws = ws,
11
Li()),
12
t.playing || t.actor.removeFromPlay(),
13
Sr[e.id] = t,
14
Ii()
15
}
16
// UnObfuscated :
17
function addPlayer(playerData) {
18
var player = new Player(playerData);
19
if (player.id == meId) {
20
me = player;
21
me.ws = ws;
22
updateAmmoUi();
23
}
24
if (!player.playing) player.actor.removeFromPlay();
25
players[playerData.id] = player;
26
rebuildPlayerList();
27
}
28
29
30
// Remove Player
31
// Obfuscated :
32
function Ri(e) {
33
var t = Sr[e];
34
e != l ? t && (t.actor.remove(),
35
delete Sr[e],
36
Ii()) : console.log("Tried to remove ME")
37
}
38
// UnObfuscated :
39
function removePlayer(playerId) {
40
var player = players[playerId];
41
if (playerId == meId) {
42
console.log("Tried to remove ME");
43
return;
44
}
45
if (player) {
46
player.actor.remove();
47
delete players[playerId];
48
rebuildPlayerList();
49
}
50
}
51
52
53
// Rebuild Player List
54
// Obfuscated :
55
function Ii() { // Rebuild Player List
56
for (var e = [], t = 0; t < Sr.length; t++)
57
Sr[t] && e.push(t);
58
if (kr) {
59
var r = function() {
60
for (var e = [0, 0, 0], t = 0; t < playerLimit; t++) {
61
var r = Sr[t];
62
r && (e[r.team] += r.score)
63
}
64
var i = 0;
65
return e[1] > e[2] ? i = 1 : e[2] > e[1] && (i = 2),
66
{
67
score: e,
68
leader: i
69
}
70
}();
71
r.leader > 0 && (Oi = r.leader),
72
r.score[Oi] += 1e5,
73
e.sort((function(e, t) {
74
return Sr[t].score + r.score[Sr[t].team] - (Sr[e].score + r.score[Sr[e].team])
75
}
76
))
77
} else
78
e.sort((function(e, t) {
79
return Sr[t].score - Sr[e].score
80
}
81
));
82
var i = document.getElementById("playerList").children;
83
for (t = 0; t < e.length; t++) {
84
var n = Sr[e[t]]
85
, o = i[t]
86
, a = o.children[0]
87
, s = a.children[0]
88
, y = a.children[1]
89
, c = o.children[1];
90
if (s.classList.add("playerSlot--name"),
91
y.classList.add("playerSlot--score"),
92
c.classList.add("playerSlot--icons"),
93
o.style.display = "block",
94
s.innerText = n.name,
95
n.id != l) {
96
o.addEventListener("click", function(e, t) {
97
return function() {
98
var r = {
99
playerId: e,
100
uniqueId: t,
101
isGameOwner: A,
102
muted: Sr[e].muted,
103
playerName: Sr[e].name,
104
muteFunc: function() {
105
Di(this.playerId, this.uniqueId)
106
},
107
bootFunc: function() {
108
wi(this.playerId, this.uniqueId)
109
}
110
};
111
vueApp.showPlayerActionsPopup(r)
112
}
113
}(n.id, n.uniqueId), !1),
114
o.style.pointerEvents = "all",
115
o.style.cursor = "pointer"
116
}
117
y.innerText = n.score,
118
a.classList.add("playerSlot--name-score");
119
let r = "playerSlot--name-score"
120
, h = "playerSlot-player-is-me"
121
, u = "playerSlot-player-is-them";
122
n.id == l ? a.className = `${r} ${h} ${Ie.meClass[n.team]}` : a.className = `${r} ${u} ${Ie.themClass[n.team]}`,
123
c.innerText = "";
124
const d = document.createElement("i")
125
, p = document.createElement("i");
126
d.className = "fas fa-egg hidden",
127
p.className = "fas fa-ban hidden",
128
n.upgradeProductId && n.upgradeProductId > 0 && d.classList.remove("hidden"),
129
n.muted && p.classList.remove("hidden"),
130
c.appendChild(d),
131
c.appendChild(p)
132
}
133
for (; t < playerLimit; )
134
i[t].style.display = "none",
135
t++
136
}
137
// Unobfuscated :
138
function rebuildPlayerList() {
139
var playerIdxs = [];
140
for (var i = 0; i < players.length; i++) {
141
if (players[i]) {
142
playerIdxs.push(i);
143
}
144
}
145
if (gameType == GameType.teams) {
146
var teams = getTeamScores();
147
if (teams.leader > 0) lastLeadingTeam = teams.leader;
148
teams.score[lastLeadingTeam] += 1e5;
149
playerIdxs.sort(function(a, b) {
150
return players[b].score + teams.score[players[b].team] - (players[a].score + teams.score[players[a].team]);
151
});
152
} else {
153
playerIdxs.sort(function(a, b) {
154
return players[b].score - players[a].score;
155
});
156
}
157
var list = document.getElementById("playerList").children;
158
var i;
159
for (i = 0; i < playerIdxs.length; i++) {
160
var player = players[playerIdxs[i]];
161
list[i].style.display = "block";
162
list[i].children[0].innerText = player.name;
163
list[i].children[1].innerText = player.score;
164
if (players[playerIdxs[i]].id == meId) {
165
list[i].className = "thisPlayer";
166
list[i].style.background = teamColors.meBackground[player.team];
167
} else {
168
list[i].className = "otherPlayer";
169
list[i].style.background = teamColors.themBackground[player.team];
170
list[i].style.color = teamColors.text[player.team];
171
}
172
}
173
while (i < 18) {
174
list[i].style.display = "none";
175
i++;
176
}
177
}
178
179