Features:
360 bot :snake will move around in 360 (SPACE TO ACTIVATE)
SkinChanger: change your skin for any u like and have fun
YOU CAN CHANGE ROTATION ANGLES AND SEND PACKET INTERVALS BY MODIFING THIS IN THE SCRIPT:
var sendPacketInterval = 100// minium 100 ms per packet, low value will dissconect you from the game
var angInc = 15; //angle inc
PHP Code:
/*
########################################################################################################################
THIS SCRIPT IS MADE BY ELMARCIA FROM EPVP: "http://www.elitepvpers.com/forum/members/3449101-elmarcia.html"
YOU CAN MODIFY IT IF U WANT AND USE AT YOUR OWN RISK
USAGE -> YOU HAVE TO COPY THE CODE AND PASTE IN YOUR BROWSER'S JAVASCRIPT CONSOLE THE FIRST TIME YOU ENTER THE GAME
THEN PRESS SPACE WHEN PLAYING TO ACTIVATE THE BOT.
IF SPACE NOT WORKING WHEN PLAYING PASTE THIS CODE AGAIN IN THE CONSOLE THAT SHOULD FIX IT FOR NEXT RUNS
function ff(c){
if(c.charCode == 32) {BotInit()}
}
window.addEventListener("keypress",ff)
IN GAME YOU COULD ALSO CHANGE SKIN LIKE THIS
setSkin2([1,5,8,9,1,3],2,1)
DETAILS EXPLAINED BELOW
##########################################################################################################################
*/
var botThread = null;
var checkThread = null;
var msgInte = null;
var angulo = 0;
var sendPacketInterval = 100// minium 100 ms per packet, low value will dissconect you from the game
var angInc = 15; //angle inc
var botWorking = false;
function do360()
{
if (ws == null) return;
angulo += angInc
if(angulo >= 251) angulo = 0; //not 360 max angle value 251..
q = new Uint8Array(1);
q[0] = angulo & 255;
ws.send(q.buffer); //send packet to server
}
function startBot()
{
angulo = sang;
console.log("Bot started");
/* If want to block mouse input remove comment
window.onmousemove = function(c) {
};
console.log("Mouse move blocked");
*/
botThread = setInterval(do360,sendPacketInterval)
checkThread = setInterval(check)
}
ws.onclose = function(b){ //rewrite onclose function
ws==this&&(playing=connected=!1);
stopBot() //stop sending packets
}
function stopBot(){
clearInterval(botThread);
clearInterval(checkThread);
console.log("Bot stoped");
/* If blocked input this should fix it for next run
window.onmousemove = function(c) {
(c = c || window.event) && "undefined" != typeof c.clientX && (xm = c.clientX - ww / 2, ym = c.clientY - hh / 2)
};
console.log("mouse input enabled");
*/
}
function check(){
if (ws == null) {
stopBot();
console.log("Bot closing");
}
}
function BotInit(){
botWorking = !botWorking;
if(botWorking){
msgInte = setInterval(showMsg("Started"),30); //Message working or not
setTimeout(stopMsg,1500)
startBot();
}else{
msgInte = setInterval(showMsg("Stoped"),30);
setTimeout(stopMsg,1500)
stopBot();
}
}
function showMsg(msg){
var mycanvas = mc.getContext("2d");
mycanvas.font="40px Verdana";
mycanvas.strokeStyle = "#90C098"
mycanvas.fillStyle = snake.csw
h = snake.xx + snake.fx
u = snake.yy + snake.fy
h = mww2 + (h - view_xx) * gsc
u = mhh2 + (u - view_yy) * gsc
mycanvas.fillText(msg, h, u + 32 + 11 * snake.sc * gsc)
}
function stopMsg(){
clearInterval(msgInte);
}
function ff(c){
if(c.charCode == 32) {BotInit()}
}
window.addEventListener("keypress",ff)
/*
[skinArray] should be something like this:
[color1,color2,color3,color4,...,colorN]
colors are from 0 to 16
so a valid one will be
[0,1,5,4,8,9]
also
will be valid something like this
[256,3] -> color is moded so no problem but won't get new color by this method
[hasAnt] if 0 -> No Anntena
if 1 -> Antenna nš 1
if 2 -> Antenna nš 2
[oneEye] if 0 -> two eyes
else -> one eye
[indexId] doesn't matter, but should be a value between max skins value if don't then an error will ocurr
Ex of ussage
setSkin2([5,10,13,15,4,9],2,1)
THIS SKIN IS ONLY VISIBLE BY YOU, OTHER PEOPLE WON'T SEE IT.
*/
function setSkin2(skinArray,hasAnt=0,oneEye=0,indexId = 0) {
/*
Modify to get custom antenna's bulbs
var cc = acbulb.getContext("2d");
g = cc.createRadialGradient(32, 32, 1, 32, 32, 31);
g.addColorStop(0, "rgba(0, 128, 128, 1)");
g.addColorStop(.5, "rgba(222, 3, 3, 1)");
g.addColorStop(.96, "rgba(157, 18, 18, 1)");
g.addColorStop(1, "rgba(0,0,0, 0)");
cc.fillStyle = g;
cc.fillRect(0, 0, 64, 64);
var ctx = null;
ctx = cdbulb2.getContext("2d");
ctx.fillStyle = "#ff5609";
ctx.fillRect(13, 10, 29, 64);
ctx.fillRect(13, 10, 58, 22);
ctx.fillRect(13, 54, 58, 22);
ctx = cdbulb.getContext("2d");
ctx.shadowColor = "#000000";
ctx.shadowBlur = 20;
ctx.drawImage(cdbulb2, 0, 0);
ctx.drawImage(cdbulb2, 0, 0);
*/
c = snake;
c.rcv = indexId;
c.er = 6;
c.pr = 3.5;
c.pma = 2.3;
c.ec = "#ffffff";
c.eca = .75;
c.ppa = 1;
c.ppc = "#000000";
c.antenna = 0;
c.one_eye = oneEye;
c.swell = 0;
if (hasAnt == 1) {
c.antenna = 1;
c.atba = 0;
c.atc1 = "#00688c"; //antena border color
c.atc2 = "#64c8e7"; //antena fill color
c.atwg = !0;
c.atia = .35;
c.abrot = !1;
var b = 8;
c.atx = new Float32Array(b);
c.aty = new Float32Array(b);
c.atvx = new Float32Array(b);
c.atvy = new Float32Array(b);
c.atax = new Float32Array(b);
c.atay = new Float32Array(b);
for (--b; 0 <= b; b--) c.atx[b] = c.xx, c.aty[b] = c.yy;
c.bulb = acbulb;
c.blbx = -10;
c.blby = -10;
c.blbw = 20;
c.blbh =
20;
c.bsc = 1;
c.blba = .75
} else if (hasAnt == 2) {
c.ec = "#ff5609";
c.eca = 1;
c.antenna = !0;
c.atba = 0;
c.atc1 = "#000000";
c.atc2 = "#5630d7";
c.atia = 1;
c.abrot = !0;
b = 9;
c.atx = new Float32Array(b);
c.aty = new Float32Array(b);
c.atvx = new Float32Array(b);
c.atvy = new Float32Array(b);
c.atax = new Float32Array(b);
c.atay = new Float32Array(b);
for (--b; 0 <= b; b--) c.atx[b] = c.xx, c.aty[b] = c.yy;
c.bulb = cdbulb;
c.blbx = -5;
c.blby = -10;
c.blbw = 20;
c.blbh = 20;
c.bsc = 1.6;
c.blba = 1
}
if (oneEye) {
c.one_eye = 1
c.ebi = jsebi
c.ebiw = 64
c.ebih = 64
c.ebisz = 29
c.epi = jsepi
c.epiw = 48
c.epih = 48
c.episz = 14
c.pma = 4
c.swell = .06
}
c.rbcs = skinArray;
c.cv = indexId;
snake = c;
}






