Slither.io-bot: [Suggestions] Two mouse buttons - disable/enable bot - "Fast Boost"

Created on 4 May 2016  路  45Comments  路  Source: ErmiyaEskandary/Slither.io-bot

Hello

  1. Please restore the auto startup play game.
  2. Replace or add options: "Defense mode - bot turns around in a perfect circle"
    do not turn in a perfect circle always head protrudes - better add "auto distance" from others (and prevents collisions).
  3. To facilitate enable fast switching bot disable / enable the right mouse button - not key "T" (replace - key / button).
  4. "Fast Boost" - Always possible under the left mouse button (independently / regardless - bot enabled).
  5. Save / Remember selected skin + options.

I'm sorry for my language english is not good. Thank you in advance if possible to change the.
Thank you for your work. Regards. GL&HF ;)

important

Most helpful comment

@K00sKlust @FliiFe @Evanito @chancity Why doesn't this work for right click bot toggle ?

document.oldMouseDown =  document.onmousedown;
document.onmousedown = function(e) {
    document.oldMouseDown(e);
    e = e || window.event;
    // "Right click" to toggle bot in addition to the letter "T"
    if (e.which == 3){
        if (window.isBotRunning) {
            window.stopBot();
            window.isBotEnabled = false;
        } else {
            window.launchBot(5);
            window.isBotEnabled = true;
        }
    }

};

All 45 comments

better add "auto distance" from others (and prevents collisions).

Enemy avoidance being worked on

Please restore the auto startup play game.

Not possible for a reason I can't remember @Evanito ?

bot turns around in a perfect circle" do not turn in a perfect circle always head protrudes

Sorry - mistake. Changing...

To facilitate enable fast switching bot disable / enable the right mouse button - not key "Y" (replace - key / button).

Who agrees ? Thumbs up or thumbs down

Save / Remember selected skin + options.

Options are remembered. "Remember selected skin" - @Evanito @FliiFe ?

"Fast Boost" - Always possible under the left mouse button (independently / regardless - bot enabled).

You can boost using space regardless of if the bot is enabled or not. Is this what you mean or did I understand you wrong ?

To facilitate enable fast switching bot disable / enable the right mouse button - not key "Y" (replace - key / button).

We can use both. Also, the current key is "T", not "Y".

Save / Remember selected skin + options.

Selected skin is saved for me. Can you confirm @ErmiyaEskandary @Evanito ? Options are also saved using localStorage

Selected skin is saved for me. Can you confirm @ErmiyaEskandary @Evanito ?

I can check soon but not right now :(

To facilitate enable fast switching bot disable / enable the right mouse button - not key "Y" (replace - key / button).
We can use both.

@FliiFe Do you think it would be good to use both ? Doesn't make a difference for me :|

Selected skin is saved for me. Can you confirm @ErmiyaEskandary @Evanito ?
I can check soon but not right now :(

Already know does not remember additional "non standard" skin Plugin: slither.io Slithere.com v2.9.2.

Also, the current key is "T", not "Y".

Yes. I am sorry my mistake spell.

Please restore the auto startup play game.
Not possible for a reason I can't remember @Evanito ?

I am waiting for a response may however possible to quickly return to the game?

To facilitate enable fast switching bot disable / enable the right mouse button - not key "T" (replace - key / button).
We can use both.
@FliiFe Do you think it would be good to use both ? Doesn't make a difference for me :|

Faster reaction response and switching when (enable / disable - bot button mouse and control mouse non bot - if do not bot) the right button on the mouse - orginal the game is the mouse. Would be nice ;)

(Point 2) ....

bot turns around in a perfect circle" do not turn in a perfect circle always head protrudes

This option is good if you want to lure us to surround Circle and of surprise and quickly jump on the " Quick Boost" before him

"Fast Boost" - Always possible under the left mouse button (independently / regardless - bot enabled).
You can boost using space regardless of if the bot is enabled or not. Is this what you mean or did I understand you wrong ?

When turned on the bot does not work manual option: "Fast Boost".
Please add option on left mouse button.

Thank you for your attention and help.
Regards;)

@Seple I think I misunderstood your request.

orginal the game is the mouse

Original game doesn't have a bot...

@FliiFe Naturally, I just want to help improve rapid reaction ;)

@Seple Can you explain clearly what is your request ? I know it is about rapid reaction, but what is it concretely ? I'm confused :confused:

in other words: "bot will help but not replace human thinking..."

@Seple But what is your request ? Is changing the enable/disable key what you want ?

When turned on the bot does not work manual option: "Fast Boost".
Please add option on left mouse button.

Are you saying space doesn't work when the bot is on ?

I make two moves at once to set the direction and executes the commands such cases fast reaction every millisecond counts...
I can not exactly explain Sorry :/

@FliiFe What @Seple is saying is that clicking the left mouse button is quicker than clicking T

@Seple Is that what you are saying ? Your request is to add in the right mouse button as a toggle for enabling/disabling the bot ?

To facilitate enable fast switching bot disable / enable the right mouse button

@FliiFe What @Seple is saying is that clicking the left mouse button is quicker than clicking T

@Seple Is that what you are saying ? Your request is to add in the left mouse button as a toggle for enabling/disabling the bot ?

Yes ;)

To facilitate enable fast switching bot disable / enable the right mouse button

YES YES YES :D

Right mouse button as the left mouse button is used for "Fast Boost" if that's how you want to put it

So you want us to add in the right mouse button as a extra toggle for the bot ? Is that your only request?

When turned on the bot does not work manual option: "Fast Boost".

Space is fast boost - it doesn't work when the bot is on ?

It doesn't because of window.setAcceleration();

Please two mouse buttons;

  • disable / enable bot - the right mouse button.
  • "Fast Boost" - the left mouse button.

@Seple When the bot is off, holding down the left mouse button or pressing space activates boost

As for this :

disable / enable - the right mouse button

I'll work on it now

@Seple When the bot is off, holding down the left mouse button or pressing space activates boost

do not work

  • bot ON "speed - Boost" does not work :(

@Seple OK.

I'm working on it now

OK Thank you!!! and Thank you for understanding my lame English :)

Your are doing a great job of beer for you :D
Regards. GL&HF ;)

:+1:

When can i expect ?

@K00sKlust @FliiFe @Evanito @chancity Why doesn't this work for right click bot toggle ?

document.oldMouseDown =  document.onmousedown;
document.onmousedown = function(e) {
    document.oldMouseDown(e);
    e = e || window.event;
    // "Right click" to toggle bot in addition to the letter "T"
    if (e.which == 3){
        if (window.isBotRunning) {
            window.stopBot();
            window.isBotEnabled = false;
        } else {
            window.launchBot(5);
            window.isBotEnabled = true;
        }
    }

};

@ErmiyaEskandary Actually it does work for me with a minor adjustment.
I changed the document. to window. as following:

// Save the original slither.io onmousedown function so we can re enable it back later,
// although we probably wouldn't need it.
window.oldMouseDown =  window.onmousedown;
window.onmousedown = function(e) {
    window.oldMouseDown(e);

We also might have to check 'e.button == 2' for Opera and IE (scratch that, there is no tamper-/greasemonkey for IE).

@tjorim Ah - that's what I needed. I'll see if I can check for Opera as well.
Cheers :+1:

@ErmiyaEskandary I changed the code a bit and had a first attempt at manually enabling acceleration.
It's working now when the bot is disabled but when the bot is on, it's only accelarating for not even a second. I should probably check somewhere else in the code if something is disabling it again.

// Save the original slither.io onmousedown function so we can re enable it back later
window.oldMouseDown =  window.onmousedown;
window.onmousedown = function(e) {
    window.oldMouseDown(e);
    e = e || window.event;
    switch (e.which) {
        // "Left click" to manually speed up the slither
        case 1:
            if (window.playing) {
                window.setAcceleration(1);
                window.log('Manual boost...');
            }
            break;
        // "Right click" to toggle bot in addition to the letter "T"
        case 3:
            if (window.isBotRunning) {
                window.stopBot();
                window.isBotEnabled = false;
            } else {
                window.launchBot(5);
                window.isBotEnabled = true;
            }
            break;
    }
};

I think for Opera it is best to check both, but someone should first verify if it is needed.

Edit : crossed out a line ~ ErmiyaEskandary

@tjorim Why do we want to disable manual speed ? BTW, we can't check "e.which" for Opera. I'll commit soon.

@tjorim Do you have Opera ? Also, check your email. I invited you to Gitter :)

I thought it was needed so (when controlling the slither manually) it only accelerates when the left mouse button is pressed. But it looks like it automatically stops when the button is released, my bad :)

@tjorim :+1:

This should work on it's own :

// Save the original slither.io onmousedown function so we can re enable it back later
window.oldMouseDown =  window.onmousedown;
window.onmousedown = function(e) {
    window.oldMouseDown(e);
    e = e || window.event;
    switch (e.which) {
        // "Left click" to manually speed up the slither
        case 1:
            window.setAcceleration(1);
            window.log('Enabling manual speed...');
            break;
        // "Right click" to toggle bot in addition to the letter "T"
        case 3:
            if (window.isBotRunning) {
                window.stopBot();
                window.isBotEnabled = false;
            } else {
                window.launchBot(5);
                window.isBotEnabled = true;
            }
            break;
    }
};

@tjorim Do you have Opera ?

Yes indeed, I just updated my previous code.
Maybe we should check if the game is actually playing before enabling the acceleration.

I haven't installed Opera currently, I will install it and check my email in a minute.
Question: do you mind to type ```javascript before your code to enable syntax highlighting? Thanks in advance.

@tjorim Sure - syntax highlighting done.
To check if the game is running we can do

if (window.playing) {}

Does manual acceleration work when the bot is off ?

If it does, then we can also check if the bot is running or not :

if (window.playing && window.isBotRunning) {}

I'm testing to see if Opera works as it should do with e.which

Thank you very much <3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ChadSki picture ChadSki  路  4Comments

ChadSki picture ChadSki  路  7Comments

EatSnakes picture EatSnakes  路  3Comments

pllsner picture pllsner  路  9Comments

K00sKlust picture K00sKlust  路  10Comments