Node.js Bot menu

User Tag List

Thread: Node.js Bot

Results 1 to 3 of 3
  1. #1
    Satanbyte's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Node.js Bot

    Hello guy i search the thread with node.js bot,

    i've improve it for multi-screen ... i just want to share

    Node.js Bot
  2. #2
    jc0914's Avatar Member
    Reputation
    1
    Join Date
    Aug 2016
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    link?can you give me?

  3. #3
    Satanbyte's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No response i put this on this thread

    var robot = require("robot-js");
    var mouse = robot.Mouse();
    var keyboard = robot.Keyboard();

    mouse.autoDelay.max = 1;
    var debug = false;
    var targetColor = [0xF2361B,0xEF3519,0xEE4131,0xED4233,0xEE4031,0xCF8790,0xCF878F,0xD92411,0xDC2613 ,0xA24D53,0xA84547,0xB25C62,0xAB545B];
    var pixelColor = robot.Color();
    var i = 0;
    var k = 0;
    var data,r2,g2,b2,r1,g1,b1,s;
    var searchSize = debug ? .50 : .97;
    var step = 3;
    var window;
    var w2,h2;
    var img = robot.Image();

    function getWidow() {

    if (robot.Window.isAxEnabled())
    {
    var windows = robot.Window.getList(".*Overwatch.*");

    windows.map (function (w)
    {
    window = w;

    x2 = w.getClient().x;
    y2 = w.getClient().y;
    w2 = w.getClient().w;
    h2 = w.getClient().h;

    robot.Window.setActive( window );

    console.log('Overwatch window find at ' + x2 + ',' + y2 + ', size : ' + w2 + ',' + h2);

    w2 = w2 / 2;
    h2 = h2 / 2;
    });
    }
    }

    getWidow();

    if ( window ) {
    console.log('Start listen mouse Trigger');
    while(1) {
    s = robot.Mouse.getState();
    if( s[robot.BUTTON_MID] )
    bang();
    }
    }

    function bang()
    {
    robot.Screen.grabScreen(img, x2 + Math.round(searchSize * w2), y2 + Math.round(searchSize * h2), Math.round((1-searchSize) * w2), Math.round((1-searchSize) * h2));
    data = img.getData();
    for(i = 0; i < img.getLength(); i+=step)
    {
    if(similar((data[i] & 0x00FFFFFF).toString(16).toUpperCase(),15) )
    {
    keyboard.click(robot.KEY_N);
    return;
    }
    }
    return;
    }

    function similar (aneighbor, atolerance)
    {
    atolerance = atolerance || 10;
    r2 = parseInt(aneighbor.substr(0,2), 16);
    g2 = parseInt(aneighbor.substr(2,2), 16);
    b2 = parseInt(aneighbor.substr(4,2), 16);

    for(k = 0; k < targetColor.length; k++)
    {
    r1 = parseInt(targetColor[k].toString(16).toUpperCase().substr(0,2), 16);
    g1 = parseInt(targetColor[k].toString(16).toUpperCase().substr(2,2), 16);
    b1 = parseInt(targetColor[k].toString(16).toUpperCase().substr(4,2), 16);
    if (Math.abs(r1 - r2) <= atolerance && Math.abs(g1 - g2) <= atolerance && Math.abs(b1 - b2) <= atolerance)
    {
    return true;
    }
    }
    return false;
    }

Similar Threads

  1. Lazy bot mining flying farm - not picking nodes
    By HighDeath in forum WoW Bots Questions & Requests
    Replies: 12
    Last Post: 02-11-2016, 03:47 PM
  2. Bot standing AFK for 1 min after collecting node
    By xax in forum WoW Bots Questions & Requests
    Replies: 4
    Last Post: 03-26-2013, 03:49 AM
  3. New form of bot detection..... Rubber Band Nodes?
    By XGamerX in forum World of Warcraft General
    Replies: 24
    Last Post: 03-06-2013, 01:36 PM
  4. [Lazybot] How to reduce the number of mobs close by for bot to ignore node
    By Firstprice in forum WoW Bots Questions & Requests
    Replies: 1
    Last Post: 01-20-2012, 12:48 PM
  5. Replies: 6
    Last Post: 10-23-2011, 02:46 PM
All times are GMT -5. The time now is 01:41 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search