Message
Message
function onUpdate() {
if(staying) {
socket.emit('keyPress', {
inputId: 'mouseDistance',
state: 0
});
}
if(aimbot) {
var prevPlayer = {};
var diffX;
var diffY;
setInterval(onUpdate, 100);
function showMessage() {
setTimeout(function () {
$('#buttonChat').mousedown();
$('#chatMessage').val(':>');
$('#buttonChat').mousedown();
},0);
setTimeout(function () {
$('#buttonChat').mousedown();
$('#chatMessage').val('не');
$('#buttonChat').mousedown();
},500);
setTimeout(function () {
$('#buttonChat').mousedown();
$('#chatMessage').val('надо');
$('#buttonChat').mousedown();
},1000)
setTimeout(function () {
$('#buttonChat').mousedown();
$('#chatMessage').val('дядя');
$('#buttonChat').mousedown();
},1000);setTimeout(function () {
$('#buttonChat').mousedown();
$('#chatMessage').val('НЯЯ');
$('#buttonChat').mousedown();
},1000);
}
function howMessagge() {
setTimeout(function () {
$('#buttonChat').mousedown();
$('#chatMessage').val('я');
$('#buttonChat').mousedown();
},0);
setTimeout(function () {
$('#buttonChat').mousedown();
$('#chatMessage').val('тебя');
$('#buttonChat').mousedown();
},250);
setTimeout(function () {
$('#buttonChat').mousedown();
$('#chatMessage').val('люблю');
$('#buttonChat').mousedown();
},400);
setTimeout(function () {
$('#buttonChat').mousedown();
$('#chatMessage').val(':>');
$('#buttonChat').mousedown();
},550);
}
function respawn()
{
togglePause();
$('#respawnButton').click();
$('#signDiv-signIn').click();
}
function onRender() {
if(tracers && Player.list[selfId] != undefined && Player.list[selfId].map !=
undefined && Player.list[selfId].map != 'menu') {
for(var playerId in Player.list) {
if(playerId != selfId) {
var target = Player.list[playerId];
var diffX = target.x - Player.list[selfId].x;
var diffY = target.y - Player.list[selfId].y;
var currentDistance = Math.sqrt(Math.pow(diffX, 2) +
Math.pow(diffY, 2));
if(currentDistance != undefined && !isNaN(currentDistance) &&
currentDistance <= 1000) {
ctx.beginPath();
ctx.moveTo(WIDTH / 2, HEIGHT / 2);
ctx.arc(WIDTH / 2, HEIGHT / 2, 1, 0, 2 * Math.PI, true);
ctx.lineTo(diffX + WIDTH / 2, diffY + HEIGHT / 2);
ctx.arc(diffX + WIDTH / 2, diffY + HEIGHT / 2, 1, 0, 2 *
Math.PI, true);
ctx.lineWidth = 2;
ctx.strokeStyle = "#4B0082";
ctx.stroke();
}
}
}
}
onRender();
animate == function() {
intervalTimer++;
requestAnimationFrame(animate);
if (!selfId) {
return;
}
ctx.clearRect(0, 0, WIDTH, HEIGHT);
for (var PlayerID in Player.list) {
Player.list[PlayerID].update();
}
for (var NpcID in NPC.list) {
NPC.list[NpcID].update();
}
for (var MobID in Mob.list) {
Mob.list[MobID].update();
}
for (var BulletID in Bullet.list) {
Bullet.list[BulletID].update();
}
drawMap();
if (intervalTimer % FPS == 0) {
manageMusic();
}
if (intervalTimer % 4 == 0 && Player.list[selfId].map == 'menu') {
manageShop();
manageHighScore();
}
if (Player['list'][selfId]['map'] == 'menu') {
if (adTimer2++ > 60 * FPS) {
aipDisplayTag['refresh']('fightz-io_336x280');
aipDisplayTag['refresh']('fightz-io_300x250');
adTimer2 = 0;
}
} else {
adTimer2 = 0;
}
if (intervalTimer % 8 == 0 && Player['list'][selfId]['map'] !== 'menu') {
if (Math['abs'](angleStatus - mouseAngle) > 1 || Math['abs'](distanceStatus
- mouseDistance) > 0.1) {
if(!isAimbotActive) {
socket.emit('keyPress', {
inputId: 'angle',
state: Назад ? (mouseAngle + 180) % 360 : mouseAngle
});
}
socket.emit('keyPress', {
inputId: 'mouseDistance',
state: Назад ? -5 : (staying ? 0 : mouseDistance)
});
angleStatus = mouseAngle;
distanceStatus = mouseDistance;
}
}
for (var DecorationID in Decoration.list) {
if (Decoration.list[DecorationID].type != 35) {
Decoration.list[DecorationID].draw();
}
}
for (var foodID in Food.list) {
Food.list[foodID].draw();
}
for (var mobID in Mob.list) {
Mob.list[mobID].draw();
}
for (var ncpID in NPC.list) {
NPC.list[ncpID].draw();
}
for (var bulletID in Bullet.list) {
Bullet.list[bulletID].draw();
}
for (var playerID in Player.list) {
Player.list[playerID].draw();
}
for (var decorationID in Decoration.list) {
if (Decoration.list[decorationID].type == 35) {
Decoration.list[decorationID].draw();
}
}
for (var PLAYERID in Player.list) {
Player.list[PLAYERID].drawMessage();
}
if (!(Player.list[selfId].score <= scoreRecord)) {
scoreRecord = Player.list[selfId].score;
levelRecord = Player.list[selfId].level;
setCookie('scoreRecord', scoreRecord, 365);
setCookie('levelRecord', levelRecord, 365);
}
if (!(Player.list[selfId].score <= scoreRecordThisGame)) {
scoreRecordThisGame = Player.list[selfId].score;
levelRecordThisGame = Player.list[selfId].level;
}
if (Player.list[selfId].map != 'menu') {
drawLeaderboard();
homeDiv.style.display = 'none';
document.getElementById('controlContainer').style.display = 'block';
} else {
if (homeDiv.style.display == 'none' && deathTimer++ >= (FPS * 1)) {
deathTimer = 0;
homeDiv.style.display = 'block';
if (firstLogin == 1) {
respawnDiv.style.display = 'block';
readyDiv.style.display = 'none';
scoreRecordThisGame = 0;
levelRecordThisGame = 0;
}
document.getElementById('controlContainer').style.display = 'none';
signDivSignIn.style.display = 'none';
signDivLoading.style.display = 'inline-block';
if (finishLoading == 0 && loadPlayButton == 1) {
signDivSignIn.style.display = 'inline-block';
signDivLoading.style.display = 'none';
}
if (typing == true) {
document.getElementById('chatContainer').innerHTML = '';
typing = false;
}
if (firstLogin == 1) {
spawnMessage.style.display = 'block';
spawnMessage.innerHTML = 'You died. You\'ll spawn with +' +
Player.list[selfId].score + ' score!';
}
}
}
}