Noticias:

SMF - Just Installed!

Menú principal

Source CustomButton Season 6

Publicado por Dakosmu, Mar 27, 2025, 02:36 AM

Tema anterior - Siguiente tema

Dakosmu

Source CustomButton Season 6


stdafx.h
#define    Botom_New        1


CustomButton.cpp

#include "stdafx.h"
#include "Interface.h"
#include "Protocol.h"
#include "CustomButton.h"
//#include "NewInterface.h"
//#include "Clearinv.h"
#include "NewOffsets.h"
#include "SEASON3B.h"
#include "Defines.h"
#include "CustomFont.h"
#include <Windows.h>
#include <Shellapi.h>
#include "Protect.h"
#include "Defines2.h"
#include "User.h"
#include "PrintPlayer.h"
#include "CNewUIWindowsClient.h"

cButton gButton;


void cButton::Draw()

{
    if (this->InfoReset != 0)
    {
        pSetCursorFocus = true;


        float MainWidth = 230.0;
        float MainHeight = 130.0;
        float StartBody = 90.0;
        float StartY = 90.0;
        float StartX = 206 + (0);
        float MainCenter = StartX + (MainWidth / 3);
        float ButtonX = MainCenter - (float)(29.0 / 2);

        gInterface.DrawGUI(eCONFIRM_MAIN, StartX, StartY + (float)2.0);
        gInterface.DrawGUI(eVip_TITLE, StartX, StartY);
        StartY = gInterface.DrawRepeatGUI(eVip_FRAME, StartX, StartY + (float)5.0, 5);
        gInterface.DrawGUI(eVip_FOOTER, StartX, StartY);


        gInterface.DrawFormat(eGold, (int)StartX + 10, (int)StartBody + 10, 210, 3, "Reset Info");

        gInterface.DrawFormat(eGold, (int)StartX + 10, (int)StartBody + 40, 210, 3, "Desea resetear su personaje?");

        gInterface.DrawFormat(eGold, (int)StartX + 10, (int)StartBody + 55, 210, 3, "Usted tendra %d  Reset", ViewReset + 1);

        gInterface.DrawButton(eCONFIRM_BTN_OK, (int)StartX + 40 - (0), (int)StartBody + 70, 0, 0);

        if (gInterface.IsWorkZone7(eCONFIRM_BTN_OK))
        {
            int ScaleY = 30;
            // ----
            if (IsPress(1))
            {
                ChatSend("/reset");
                *(BYTE*)0x8793386 = 0;
                *(BYTE*)0x8793384 = 0;
                this->InfoReset = 0;
                ScaleY = 60;
            }
            // ----
            gInterface.DrawButton(eCONFIRM_BTN_OK, (int)StartX + 40 - (0), (int)StartBody + 70, 0, ScaleY);
        }

        gInterface.DrawButton(eCONFIRM_BTN_CANCEL, (int)StartX + 140 - (0), (int)StartBody + 70, 0, 0);

        if (gInterface.IsWorkZone7(eCONFIRM_BTN_CANCEL))
        {
            int ScaleY = 30;
            // ----
            if (IsPress(1))
            {
                *(BYTE*)0x8793386 = 0;
                *(BYTE*)0x8793384 = 0;
                this->InfoReset = 0;
                ScaleY = 60;
            }
            // ----
            gInterface.DrawButton(eCONFIRM_BTN_CANCEL, (int)StartX + 140 - ( 0), (int)StartBody + 70, 0, ScaleY);
        }
    }
}

void cButton::ButtonCustom()
{
    if (gInterface.CheckWindow(CashShop)
        || gInterface.CheckWindow(SkillTree)
        || gInterface.CheckWindow(FullMap)
        || gInterface.CheckWindow(MoveList)
        || gInterface.CheckWindow(ExpandInventory)
        || gInterface.CheckWindow(Store)
        || gInterface.CheckWindow(Inventory)
        || gInterface.CheckWindow(Party)
        || gInterface.CheckWindow(Trade)
        || gInterface.CheckWindow(Warehouse)
        || gInterface.CheckWindow(GensInfo)
        || gInterface.CheckWindow(Guild)
        || gInterface.CheckWindow(NPC_Dialog)
        || gInterface.CheckWindow(NPC_Julia)
        || gInterface.CheckWindow(NPC_Titus)
        || gInterface.CheckWindow(OtherStore)
        || gInterface.CheckWindow(PetInfo)
        || gInterface.CheckWindow(Shop)
        || gInterface.CheckWindow(SkillTree)
        || gInterface.CheckWindow(FriendList)
        || gInterface.CheckWindow(FastMenu)
        || gInterface.CheckWindow(MuHelper)
        || gInterface.CheckWindow(Quest)
        || gInterface.CheckWindow(Lugard)
        || gInterface.CheckWindow(Jerint)
        || gInterface.CheckWindow(GoldenArcher1)
        || gInterface.CheckWindow(GoldenArcher2)
        || gInterface.CheckWindow(NPC_Duel)
        || gInterface.CheckWindow(NPC_Devin)
        || gInterface.CheckWindow(GuardNPC)
        || gInterface.CheckWindow(SeniorNPC)
        || gInterface.CheckWindow(GuardNPC2)
        || gInterface.CheckWindow(CastleGateSwitch)
        || gInterface.CheckWindow(CatapultNPC)
        || gInterface.CheckWindow(CreateGuild)
        || gInterface.CheckWindow(ExpandWarehouse)
        || gInterface.CheckWindow(Character)
        || gInterface.CheckWindow(ChatWindow)
        || gInterface.CheckWindow(CommandWindow))
    {
        return;
    }


    /*if (gProtect.m_MainInfo.ButtonReset == 1)
    {*/


        if (gProtect.m_MainInfo.CustomInterfaceType == 0 || gProtect.m_MainInfo.CustomInterfaceType == 4)
        {
            float Active_x = (MAX_WIN_WIDTH / 2) + 160 + (0);
            float Active_y = 410;

            if (pCheckMouseOver(Active_x, Active_y, 110.0, 20.0))
            {
                nInterface.ActiveLockMouse = GetTickCount() + 500;
            }

            RenderBitmap(531027, Active_x, Active_y, 85, 15, 0.0, 0.0, 0.8785000443, 0.6409999728, 1, 1, 0.0); //textura, x,y,largo,ancho,

            gInterface.DrawText(eWhite, Active_x + 10, Active_y + 2, 60, 3, "Reset");


            if (pCheckInMouse(Active_x + 5, Active_y, 50.0, 20.0) && IsRelease(VK_LBUTTON)) //
            {
                this->SendRequestReset(1);
                gButton.InfoReset = 1;

            }

            if (IsWorkZone(Active_x + 5, Active_y, 50.0, 20.0, false))
            {
                pSetCursorFocus = true;
            }
        }

        if (gProtect.m_MainInfo.CustomInterfaceType == 3)
        {
            float Active_x = (MAX_WIN_WIDTH / 2) + 160 + (0);
            float Active_y = 390;

            if (pCheckMouseOver(Active_x, Active_y, 110.0, 20.0))
            {
                nInterface.ActiveLockMouse = GetTickCount() + 500;
            }

            RenderBitmap(531027, Active_x, Active_y, 85, 15, 0.0, 0.0, 0.8785000443, 0.6409999728, 1, 1, 0.0); //textura, x,y,largo,ancho,

            gInterface.DrawText(eWhite, Active_x + 10, Active_y + 2, 60, 3, "Reset");


            if (pCheckInMouse(Active_x + 5, Active_y, 50.0, 20.0) && IsRelease(VK_LBUTTON)) //
            {
                this->SendRequestReset(1);
                gButton.InfoReset = 1;

            }

            if (IsWorkZone(Active_x + 5, Active_y, 50.0, 20.0, false))
            {
                pSetCursorFocus = true;
            }
        }

        if (gProtect.m_MainInfo.CustomInterfaceType == 1 || gProtect.m_MainInfo.CustomInterfaceType == 2)
        {
            float Active_x = (MAX_WIN_WIDTH / 2) - 200 + ( 0);
            float Active_y = 410;

            if (pCheckMouseOver(Active_x, Active_y, 110.0, 20.0))
            {
                nInterface.ActiveLockMouse = GetTickCount() + 500;
            }

            RenderBitmap(531027, Active_x, Active_y, 85, 15, 0.0, 0.0, 0.8785000443, 0.6409999728, 1, 1, 0.0); //textura, x,y,largo,ancho,

            gInterface.DrawText(eWhite, Active_x + 10, Active_y + 2, 60, 3, "Reset");


            if (pCheckInMouse(Active_x + 5, Active_y, 50.0, 20.0) && IsRelease(VK_LBUTTON)) //
            {
                this->SendRequestReset(1);
                gButton.InfoReset = 1;

            }

            if (IsWorkZone(Active_x + 5, Active_y, 50.0, 20.0, false))
            {
                pSetCursorFocus = true;
            }

        }

    /*}*/

    //if (gProtect.m_MainInfo.ButtonMaster == 1)
    //{
        if (gProtect.m_MainInfo.CustomInterfaceType == 0 || gProtect.m_MainInfo.CustomInterfaceType == 4)
        {
            float Active_x1 = (MAX_WIN_WIDTH / 2) + 240 + (0);
            float Active_y1 = 410;

            if (pCheckMouseOver(Active_x1, Active_y1, 110.0, 20.0))
            {
                nInterface.ActiveLockMouse = GetTickCount() + 500;
            }
            RenderBitmap(531027, Active_x1, Active_y1, 85, 15, 0.0, 0.0, 0.8785000443, 0.6409999728, 1, 1, 0.0); //textura, x,y,largo,ancho,

            gInterface.DrawText(eWhite, Active_x1 + 10, Active_y1 + 2, 60, 3, "Master Reset");


            if (pCheckInMouse(Active_x1, Active_y1, 50.0, 20.0) && IsRelease(VK_LBUTTON)) //
            {
                this->SendRequestReset(1);
                ChatSend("/mreset");

            }

            if (IsWorkZone(Active_x1, Active_y1, 50.0, 20.0, false))
            {
                pSetCursorFocus = true;
            }
        }

        if (gProtect.m_MainInfo.CustomInterfaceType == 3)
        {
            float Active_x1 = (MAX_WIN_WIDTH / 2) + 240 + ( 0);
            float Active_y1 = 390;

            if (pCheckMouseOver(Active_x1, Active_y1, 110.0, 20.0))
            {
                nInterface.ActiveLockMouse = GetTickCount() + 500;
            }
            RenderBitmap(531027, Active_x1, Active_y1, 85, 15, 0.0, 0.0, 0.8785000443, 0.6409999728, 1, 1, 0.0); //textura, x,y,largo,ancho,

            gInterface.DrawText(eWhite, Active_x1 + 10, Active_y1 + 2, 60, 3, "Master Reset");


            if (pCheckInMouse(Active_x1, Active_y1, 50.0, 20.0) && IsRelease(VK_LBUTTON)) //
            {
                this->SendRequestReset(1);
                ChatSend("/mreset");

            }

            if (IsWorkZone(Active_x1, Active_y1, 50.0, 20.0, false))
            {
                pSetCursorFocus = true;
            }
        }

        if (gProtect.m_MainInfo.CustomInterfaceType == 1 || gProtect.m_MainInfo.CustomInterfaceType == 2)
        {
            float Active_x1 = (MAX_WIN_WIDTH / 2) - 200 + (0);
            float Active_y1 = 390;

            if (pCheckMouseOver(Active_x1, Active_y1, 110.0, 20.0))
            {
                nInterface.ActiveLockMouse = GetTickCount() + 500;
            }

            RenderBitmap(531027, Active_x1, Active_y1, 85, 15, 0.0, 0.0, 0.8785000443, 0.6409999728, 1, 1, 0.0); //textura, x,y,largo,ancho,

            gInterface.DrawText(eWhite, Active_x1 + 10, Active_y1 + 2, 60, 3, "Master Reset");


            if (pCheckInMouse(Active_x1, Active_y1, 50.0, 20.0) && IsRelease(VK_LBUTTON)) //
            {
                this->SendRequestReset(1);
                ChatSend("/mreset");

            }

            if (IsWorkZone(Active_x1, Active_y1, 50.0, 20.0, false))
            {
                pSetCursorFocus = true;
            }

        }

    }
//}

void cButton::SendRequestReset(int value)
{
    SDHP_COMMAND_RESET_SEND pMsg;
    pMsg.header.set(0xFB, 0xD7, sizeof(pMsg));
    DataSend((LPBYTE)&pMsg, pMsg.header.size);
    /*SDHP_COMMAND_RESET_SEND pMsg;
    pMsg.header.set(0x0F, 0x00, sizeof(pMsg));
    DataSend((LPBYTE)&pMsg, pMsg.header.size);*/
}

bool cButton::IsOnWindow()
{
    return *(HWND*)0x0E8C578 == GetForegroundWindow();
}

bool cButton::IsWorkZone(float x, float y, float w, float h, bool mode)
{
    if (mode)
        return IsOnWindow() && *(int*)0x879340C >= x && *(int*)0x879340C <= x + w && *(int*)0x8793410 >= y && *(int*)0x8793410 <= y + h;
    return *(int*)0x879340C >= x && *(int*)0x879340C <= x + w && *(int*)0x8793410 >= y && *(int*)0x8793410 <= y + h;
}

CustomButton.h

#pragma once
#define ChatSend                ((int(__cdecl*)(LPCSTR Text)) 0x005BDE40)

struct SDHP_COMMAND_RESET_SEND
{
    PSBMSG_HEAD header; // C1:0F:00
    WORD index;
    char account[11];
    char name[11];
};


class cButton
{
public:
    void        Draw();
    void        ButtonCustom();
    void        SendRequestReset(int value);
    bool IsWorkZone(float, float, float, float, bool mode = false);
    bool IsOnWindow();
    int InfoReset;

};


extern cButton gButton;



Interface.cpp

Dentro de void Interface::Work()

#if(Botom_New)
    gButton.Draw();
    gButton.ButtonCustom();
#endif


Descargar
You require the following to view this post content:
  • You require a post count of at least 1, you need another 1 posts.
Bon Dia

🡱 🡳