Ir para conteúdo

[Source] Tibia Dash v2.0


xdtibia16

Posts Recomendados

Ativar/desativar dash: F12.

Fechar janela: CTRL + F12.

Teclas do dash: WASD.

 

Download do arquivo: http://uploaded.net/file/c19rf5i8.

Scan do arquivo: https://www.virustotal.com/pt/file/0ce2b3fa6eec1caaab5b5cf3a87faf10783246187303440cbda05d9aa5c205fd/analysis/1394553890/.

 

Projeto em andamento: BOT configurado por arquivos de script (*.scp).

#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <conio.h>
#include <stdio.h>

class Dash
{
public:
    void verifyState();

    enum DASH
    {
        D_ACTIVE    = 0x1F,
        D_DESACTIVE = 0x0F
    } dashState;
} dash[MAX_PATH];

void Dash::verifyState()
{
    dashState = (dashState == D_ACTIVE ? D_DESACTIVE : D_ACTIVE);

    if (dashState == D_ACTIVE) {
        clrscr();
        printf("Dash ativado.\n\n");
    } else {
        clrscr();
        printf("Dash desativado.");
    }
}

class Tibia
{
public:
    HWND getClient();
} client[MAX_PATH];

HWND Tibia::getClient()
{
    return FindWindow("TibiaClient", NULL);
}

class Keyboard : public Tibia
{
public:
    void executeKey(Tibia *, WPARAM, int, int);
    void changeKeyType(int);
    SHORT WINAPI getVkKeyScan(int);

    enum KEY
    {
        VK_KEY1 = 0x01,
        VK_KEY2 = 0x02,
    } keyType[4];
} key[MAX_PATH];

void Keyboard::executeKey(Tibia *client, WPARAM key, int i = 0, int time = 0)
{
    if (i <= 1) {
        i = 1;
    }

    for (int j = 0; j < i; j++) {
        PostMessage(client->getClient(), WM_KEYDOWN, key, 0);
        PostMessage(client->getClient(), WM_KEYUP, key, 0);
        Sleep(time);
    }
}

void Keyboard::changeKeyType(int type)
{
    key->keyType[type] = (key->keyType[type] == VK_KEY1 ? VK_KEY2 : VK_KEY1);
}

SHORT WINAPI Keyboard::getVkKeyScan(int vKey)
{
    return GetAsyncKeyState(VkKeyScan(vKey));
}

int main(int argc, char *argv[])
{
    textcolor(WHITE);
    SetConsoleTitle("Tibia Dash");
    printf("Dash desativado.");

    while (!GetAsyncKeyState(VK_F12) || !GetAsyncKeyState(VK_CONTROL)) {
        if (GetAsyncKeyState(VK_F12)) {
            dash->verifyState();
        }

        if (dash->dashState == Dash:_ACTIVE && client->getClient()) {
            if (key->getVkKeyScan('w')) {
                key->changeKeyType(0);

                if (key->keyType[0] == Keyboard::VK_KEY2) {
                    key->executeKey(client, VK_BACK);
                    key->executeKey(client, VK_UP, 20, 1);
                    printf("VK_UP\n");
                }
            }
            else if (key->getVkKeyScan('s')) {
                key->changeKeyType(1);

                if (key->keyType[1] == Keyboard::VK_KEY2) {
                    key->executeKey(client, VK_BACK);
                    key->executeKey(client, VK_DOWN, 20, 1);
                    printf("VK_DOWN\n");
                }
            }
            else if (key->getVkKeyScan('d')) {
                key->changeKeyType(2);

                if (key->keyType[2] == Keyboard::VK_KEY2) {
                    key->executeKey(client, VK_BACK);
                    key->executeKey(client, VK_RIGHT, 20, 1);
                    printf("VK_RIGHT\n");
                }
            }
            else if (key->getVkKeyScan('a')) {
                key->changeKeyType(3);

                if (key->keyType[3] == Keyboard::VK_KEY2) {
                    key->executeKey(client, VK_BACK);
                    key->executeKey(client, VK_LEFT, 20, 1);
                    printf("VK_LEFT\n");
                }
            }
        }

        Sleep(1);
    }
}

Editado por Aluxes
Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...
  • 3 years later...
×
×
  • Criar Novo...