WhatsApp Discord
Source 5.2 BASE - Página 2 - Source Mu - Mu Server Files
 

Noticias:

SMF - Just Installed!

Menú principal

Source 5.2 BASE

Publicado por Dakosmu, Dic 22, 2025, 08:44 AM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Dakosmu

void CGMItemMng::OpenFile(char* FileName)
{
   char filename[256];
   sprintf_s(filename, ".\\Data\\Local\\%s\\ItemList.xml", g_strSelectedML.c_str());
   pugi::xml_document file;
   pugi::xml_parse_result res = file.load_file(filename);

   if (res.status != pugi::status_ok)
   {
      return;
   }

   

   pugi::xml_node ItemList = file.child("ItemList");
   int index = 0;
   for (pugi::xml_node Section = ItemList.child("Section"); Section; Section = Section.next_sibling())
   {
      for (pugi::xml_node Item = Section.child("Item"); Item; Item = Item.next_sibling())
      {
         

         
         Script_Item info ;

         std::string text_name = Item.attribute("Name").as_string();
         strcpy_s(info.Name, text_name.c_str());
         info.Type = Section.attribute("Index").as_int();
         info.m_byItemSlot = Item.attribute("Slot").as_int();
         info.Index = Item.attribute("Index").as_int();
         info.m_wSkillIndex = Item.attribute("SkillIndex").as_int();
         info.TwoHand = Item.attribute("TwoHand").as_int();
         info.Width = Item.attribute("Width").as_int();
         info.Height = Item.attribute("Height").as_int();
         info.Drop = Item.attribute("Drop").as_int();
         info.PowerATTK = Item.attribute("CombatPower").as_int();
         info.RequireLevel = Item.attribute("ReqLevel").as_int();
         info.DamageMin = Item.attribute("DamageMin").as_int();
         info.DamageMax = Item.attribute("DamageMax").as_int();
         info.WeaponSpeed = Item.attribute("AttackSpeed").as_int();
         info.Durability = Item.attribute("Durability").as_int();
         info.MagicDur = Item.attribute("MagicDurability").as_int();
         info.MagicPower = Item.attribute("MagicPower").as_int();
         info.RequireStrength = Item.attribute("ReqStrength").as_int();
         info.RequireDexterity = Item.attribute("ReqDexterity").as_int();
         info.RequireEnergy = Item.attribute("ReqEnergy").as_int();
         info.RequireVitality = Item.attribute("ReqVitality").as_int();
         info.RequireCharisma = Item.attribute("ReqCommand").as_int();
         info.AttType = Item.attribute("SetAttrib").as_int();
         info.RequireClass[0] = Item.attribute("DarkWizard").as_int();
         info.RequireClass[1] = Item.attribute("DarkKnight").as_int();
         info.RequireClass[2] = Item.attribute("FairyElf").as_int();
         info.RequireClass[3] = Item.attribute("MagicGladiator").as_int();
         info.RequireClass[4] = Item.attribute("DarkLord").as_int();
         info.RequireClass[5] = Item.attribute("Summoner").as_int();
         info.RequireClass[6] = Item.attribute("RageFighter").as_int();
         info.RequireClass[7] = Item.attribute("GrowLancer").as_int();
         info.RequireClass[8] = Item.attribute("RuneWizard").as_int();
         info.RequireClass[9] = Item.attribute("Slayer").as_int();
         info.RequireClass[10] = Item.attribute("GunCrusher").as_int();
         info.RequireClass[11] = Item.attribute("LightWizard").as_int();
         info.RequireClass[12] = Item.attribute("LemuriaMage").as_int();
         info.RequireClass[13] = Item.attribute("IllusionKnight").as_int();
         info.RequireClass[14] = Item.attribute("DarkWizard").as_int();
     
         info.Type = Item.attribute("Type").as_int();
         info.Drop = Item.attribute("Dump").as_int();
         info.Trade = Item.attribute("Transaction").as_int();
         info.StorePersonal = Item.attribute("PersonalStore").as_int();
         info.WhareHouse = Item.attribute("StoreWarehouse").as_int();
         info.SellNpc = Item.attribute("SellToNPC").as_int();
         info.Expensive = Item.attribute("ExpensiveItem").as_int();
         info.Repair = Item.attribute("Repair").as_int();
         info.Kind1 = Item.attribute("KindA").as_int();
         info.Kind2 = Item.attribute("KindB").as_int();
         info.Overlap = Item.attribute("Overlap").as_int();
         info.MasteryGrade = Item.attribute("MasteryGrade").as_int();

         std::string ModelPath = Item.attribute("ModelPath").as_string();
         strcpy_s(info.ModelPath, ModelPath.c_str());
         std::string ModelFile = Item.attribute("ModelFile").as_string();
         strcpy_s(info.ModelFile, ModelFile.c_str());
         ItemMemory[index] = info;
      }
     

     
   }

   return;
}
Modified the item loading method to directly use the latest item files from IGC-Network. Thanks to IGC.ItemList.xml
Bon Dia

Dakosmu

bool CMoveCommandData::Create(const std::string& filename)
{

   char filepatm[256];
   sprintf_s(filepatm, ".\\Data\\Local\\%s\\MoveReq.xml", g_strSelectedML.c_str());
   pugi::xml_document file;
   pugi::xml_parse_result res = file.load_file(filepatm);

   if (res.status != pugi::status_ok)
   {
      return false;
   }



   pugi::xml_node WarpSettings = file.child("WarpSettings");
   int index = 0;
   for (pugi::xml_node Warp = WarpSettings.child("Warp"); Warp; Warp = Warp.next_sibling())
   {
      MOVEINFODATA* pMoveInfoData = new MOVEINFODATA;
      std::string ServerName = Warp.attribute("ServerName").as_string();
      strcpy_s(pMoveInfoData->_ReqInfo.szSubMapName, ServerName.c_str());

      std::string ClientName = Warp.attribute("ClientName").as_string();
      strcpy_s(pMoveInfoData->_ReqInfo.szMainMapName, ClientName.c_str());

      pMoveInfoData->_ReqInfo.index = Warp.attribute("Index").as_int();
      pMoveInfoData->_ReqInfo.iReqLevel = Warp.attribute("MinLevel").as_int();
      pMoveInfoData->_ReqInfo.m_iReqMaxLevel = Warp.attribute("MaxLevel").as_int();
      pMoveInfoData->_ReqInfo.iReqZen = Warp.attribute("ReqMoney").as_int();
      pMoveInfoData->_ReqInfo.iGateNum = Warp.attribute("GateNumber").as_int();
      pMoveInfoData->_ReqInfo.ReqVipLevel = Warp.attribute("ReqVipLevel").as_int();
      pMoveInfoData->_ReqInfo.DifficultyOrder = Warp.attribute("DifficultyOrder").as_int();
      pMoveInfoData->_ReqInfo.AlphabetOrder = Warp.attribute("AlphabetOrder").as_int();
      pMoveInfoData->_ReqInfo.MonsterClassification = Warp.attribute("MonsterClassification").as_int();
      m_listMoveInfoData.push_back(pMoveInfoData);
   }
   return true;
}
Modify MoveReq.xml to use Moveeq.bmd in preparation for later packaging.
Bon Dia

Dakosmu

bool CB_DangKyInGame::RequsetDKTK()
{
   char szID[MAX_ID_SIZE + 1] = { 0, };
   char szPass[MAX_PASSWORD_SIZE + 1] = { 0, };
   char szSno[7 + 1] = { 0, };
   char szSDT[11 + 1] = { 0, };

   this->CInputData[Account]->GetText(szID, MAX_ID_SIZE + 1);
   this->CInputData[Pass]->GetText(szPass, MAX_PASSWORD_SIZE + 1);
   this->CInputData[Snonumber]->GetText(szSno, 7 + 1);
   this->CInputData[Phone]->GetText(szSDT, 11 + 1);

   if (this->TimeSendRegTK > GetTickCount())
   {
      gInterface->OpenMessageBox("Error", "Realizar la acción más despacio !!");
      return 0;
   }
   if (strlen(szID) < 1)
   {
      gInterface->OpenMessageBox("Error", "Por favor, ingrese la cuenta");
      return 0;
   }
   if (strlen(szPass) < 1)
   {
      gInterface->OpenMessageBox("Error", "Por favor, ingrese la contraseña");
      return 0;
   }
   if (strlen(szSno) < 7)
   {
      gInterface->OpenMessageBox("Error", "Por favor, ingrese los 7 números de seguridad");
      return 0;
   }
   if (strlen(szSDT) < 11)
   {
      gInterface->OpenMessageBox("Error", "Por favor, ingrese el número de teléfono");
      return 0;
   }

   if (!CheckChuoiKyTuDacBiet(szID) || !CheckChuoiKyTuDacBiet(szPass))
   {
      gInterface->OpenMessageBox("Error", "La cuenta no puede contener caracteres especiales");
      return 0;
   }
   //==Send GS
   PMSG_REGISTER_MAIN_SEND pMsg;
   pMsg.header.set(0xD3, 0x05, sizeof(pMsg));
   pMsg.TypeSend = 0x01;

   memcpy(&pMsg.account, szID, sizeof(pMsg.account));
   memcpy(&pMsg.password, szPass, sizeof(pMsg.password));
   memcpy(&pMsg.numcode, szSno, sizeof(pMsg.numcode));
   memcpy(&pMsg.sodienthoai, szSDT, sizeof(pMsg.sodienthoai));

   DataSend((LPBYTE)&pMsg, pMsg.header.size);

   gInterface->vCaptcha = gInterface->generateCaptcha(4); //tao lai Captcha
   this->TimeSendRegTK = GetTickCount() + 5000;

   return 1;
}
Bon Dia

Dakosmu

#18


CB_DangKyInGame.cpp:

#include "StdAfx.h"
#include "CB_DangKyInGame.h"
#include "NewUISystem.h"
#include "CBInterface.h"
#include "CharacterManager.h"
#include "Util.h"
#include "Protocol.h"
#include "NewUIBase.h"
#include "ZzzInterface.h"
#include "UIMng.h"
#include "TextClien.h"
using namespace SEASON3B;

// Definiciones de índices para los textos
enum RGIG_TEXT_INDEX {
    RGIG_TITLE = 0,                    // "Registro de Cuenta"
    RGIG_ACCOUNT_LABEL = 1,           // "cuenta"
    RGIG_PASSWORD_LABEL = 2,          // "Clave"
    RGIG_CAPTCHA_CODE_LABEL = 3,      // "Captshap codigo"
    RGIG_ACCOUNT_RULES_NOTICE = 6,    // Mensaje de reglas de cuenta
    RGIG_CONFIRM_BUTTON = 8,          // Botón Confirmar
    RGIG_ERROR_TITLE = 9,             // Título de error
    RGIG_INCORRECT_CAPTCHA = 10,      // Captcha incorrecto
    RGIG_PLEASE_WAIT = 11,            // Esperar X segundos
    RGIG_ACCOUNT_MIN_LENGTH = 12,     // Cuenta mínimo 4 caracteres
    RGIG_PASSWORD_MIN_LENGTH = 13,    // Contraseña mínimo 6 caracteres
    RGIG_EXACTLY_7_DIGITS = 14,       // Exactamente 7 dígitos
    RGIG_PHONE_LENGTH_REQUIREMENT = 15, // Teléfono 10-11 dígitos
    RGIG_ACCOUNT_PASSWORD_CHARS_ONLY = 16, // Solo letras y números
    RGIG_RESULT_TITLE = 17,           // Título de resultado
    RGIG_REGISTRATION_SUCCESS = 18,   // Registro exitoso
    RGIG_ACCOUNT_ALREADY_EXISTS = 19, // Cuenta ya existe
    RGIG_INVALID_INFORMATION = 20     // Información inválida
};

CB_DangKyInGame* CB_DangKyInGame::Instance()
{
    static CB_DangKyInGame s_Instance;
    return &s_Instance;
}

CB_DangKyInGame::CB_DangKyInGame()
{
    this->Clear();
}

CB_DangKyInGame::~CB_DangKyInGame()
{
    for (int i = 0; i < TYPE_INPUT_DKTK::eMaxINPUT; i++)
    {
        SAFE_DELETE(CInputData[i]);
    }
    SAFE_DELETE(CInputCaptCha);
}

void CB_DangKyInGame::Clear()
{
    for (int i = 0; i < TYPE_INPUT_DKTK::eMaxINPUT; i++)
    {
        CInputData[i] = NULL;
    }
    CInputCaptCha = NULL;
    this->TimeSendRegTK = GetTickCount();
    this->OpenDKTK = false;
}

bool CheckChuoiKyTuDacBiet(const std::string& str)
{
    for (char ch : str)
    {
        if (!isdigit(ch) && !(ch >= 'a' && ch <= 'z') && !(ch >= 'A' && ch <= 'Z'))
        {
            return false;
        }
    }
    return true;
}

void CB_DangKyInGame::OpenOnOff()
{
    if (GetTickCount() - gInterface->Data[eWindow_DangKyInGame].EventTick > 300)
    {
        gInterface->Data[eWindow_DangKyInGame].EventTick = GetTickCount();
        if (gInterface->Data[eWindow_DangKyInGame].OnShow)
        {
            gInterface->Data[eWindow_DangKyInGame].OnShow = 0;
            return;
        }
        gInterface->Data[eWindow_DangKyInGame].OnShow = 1;
    }
}

bool CB_DangKyInGame::RenderWindow(int X, int Y)
{
    if (!gInterface->Data[eWindow_DangKyInGame].OnShow || !gCB_DangKyInGame)
    {
        if (this->OpenDKTK)
        {
            this->Clear();
        }
        return 0;
    }

    this->OpenDKTK = true;
    float WindowW = 262;
    float WindowH = 250;


    static int mTextStatusIndices[] = {
        RGIG_ACCOUNT_LABEL,    // "cuenta"
        RGIG_PASSWORD_LABEL,   // "Clave"
        RGIG_TEXT_INDEX(4),    // 7 Secret Digits (índice 4)
        RGIG_TEXT_INDEX(5),    // Phone Number (índice 5)
        RGIG_CAPTCHA_CODE_LABEL // "Captshap codigo"
    };
   
    static int mInputType[] = {
        UIOPTION_NOLOCALIZEDCHARACTERS,
        UIOPTION_NOLOCALIZEDCHARACTERS,
        UIOPTION_NUMBERONLY,
        UIOPTION_NUMBERONLY
    };
   
    static int mMaxInput[] = {
        10,
        10,
        7,
        11
    };

    float StartX = (MAX_WIN_WIDTH / 2) - (WindowW / 2);
    float StartY = 150;
    gInterface->Data[eWindow_DangKyInGame].AllowMove = false;

    gInterface->gDrawWindowCustom(&StartX, &StartY, WindowW, WindowH, eWindow_DangKyInGame,
        gTextClien.TextClien_Rgig[RGIG_TITLE]);

    TextDraw(g_hFontBold, StartX, StartY + 50, 0xFFA200B8, 0x0, WindowW, 0, 3,
        gTextClien.TextClien_Rgig[RGIG_ACCOUNT_RULES_NOTICE]);

    float InputW = 110;
    float InputKhoangCach = 20;
    StartY += 30;

    for (int i = 0; i < TYPE_INPUT_DKTK::eMaxINPUT; i++)
    {
 
        TextDraw(g_hFontBold, StartX + 30, StartY + 50, 0xFFFFFFFF, 0x0, 100, 0, 1,
            gTextClien.TextClien_Rgig[mTextStatusIndices[i]]);
       
        gInterface->DrawBarForm((StartX + 120) - 3, (StartY + 50) - 3, InputW, 16, 0.0, 0.0, 0.0, 1.0);
       
        if (gInterface->RenderInputBox(StartX + 120, StartY + 50, InputW, 14, "",
            this->CInputData[i], (UIOPTIONS)mInputType[i], mMaxInput[i], (i == 1 ? TRUE : FALSE)))
        {
            this->CInputData[i]->SetTextColor(255, 255, 255, 255);
            this->CInputData[i]->SetBackColor(255, 0, 0, 0);

            if (this->CInputData[i + 1])
                this->CInputData[i]->SetTabTarget(this->CInputData[i + 1]);
        }
        StartY += InputKhoangCach;
    }

    // Captcha
    StartY += 20;
    float NTW = 70;
    TextDraw((HFONT)g_hFontBold, StartX + 40, StartY + 50, 0x62FF00FF, 0x0, 100, 0, 1,
        gTextClien.TextClien_Rgig[RGIG_CAPTCHA_CODE_LABEL]);
   
    float CaptChaX = StartX + 105;
    float CaptChaY = StartY + 45;
   
    if (!CInputCaptCha)
    {
        CInputCaptCha = new CUITextInputBox;
        CInputCaptCha->Init(gwinhandle->GethWnd(), CaptChaX, CaptChaY, 4);
        CInputCaptCha->SetBackColor(0, 0, 0, 0);
        CInputCaptCha->SetTextColor(255, 255, 157, 0);
        CInputCaptCha->SetFont((HFONT)g_hFont);
        CInputCaptCha->SetState(UISTATE_NORMAL);
        CInputCaptCha->SetOption(UIOPTION_NUMBERONLY);
        CInputCaptCha->SetPosition(CaptChaX, CaptChaY);
    }
    else
    {
        gInterface->RenderCaptchaNumber(CaptChaX, CaptChaY, CInputCaptCha, gInterface->vCaptcha.c_str());
    }
   
    StartY += 30;
   

    if (gInterface->DrawButton(StartX + 100, StartY + 45, 100, 12,
        gTextClien.TextClien_Rgig[RGIG_CONFIRM_BUTTON], 80, true))
    {
        char CGetTextCaptCha[5] = { 0, };
        this->CInputCaptCha->GetText(CGetTextCaptCha, MAX_ID_SIZE + 1);
        std::string CaptchaInput(CGetTextCaptCha);
       
        if (!gInterface->check_Captcha(gInterface->vCaptcha, CaptchaInput))
        {
            gInterface->OpenMessageBox(
                gTextClien.TextClien_Rgig[RGIG_ERROR_TITLE],
                gTextClien.TextClien_Rgig[RGIG_INCORRECT_CAPTCHA]
            );
        }
        else
        {
            this->RequsetDKTK();
        }
    }
   
    gInterface->DrawMessageBox();
    return 1;
}

bool CB_DangKyInGame::RequsetDKTK()
{
    char szCaptcha[5] = { 0, };
   
    if (CInputCaptCha)
    {
        CInputCaptCha->GetText(szCaptcha, sizeof(szCaptcha));
    }

    std::string captchaInput(szCaptcha);
    if (!gInterface->check_Captcha(gInterface->vCaptcha, captchaInput))
    {
        gInterface->OpenMessageBox(
            gTextClien.TextClien_Rgig[RGIG_ERROR_TITLE],
            gTextClien.TextClien_Rgig[RGIG_INCORRECT_CAPTCHA]
        );

        gInterface->vCaptcha = gInterface->generateCaptcha(4);

        if (CInputCaptCha)
        {
            CInputCaptCha->SetText("");
        }

        return false;
    }

    char szID[MAX_ID_SIZE + 1] = { 0, };
    char szPass[MAX_PASSWORD_SIZE + 1] = { 0, };
    char szSno[7 + 1] = { 0, };
    char szSDT[11 + 1] = { 0, };

    if (CInputData[Account])
        CInputData[Account]->GetText(szID, MAX_ID_SIZE + 1);
    if (CInputData[Pass])
        CInputData[Pass]->GetText(szPass, MAX_PASSWORD_SIZE + 1);
    if (CInputData[Snonumber])
        CInputData[Snonumber]->GetText(szSno, 7 + 1);
    if (CInputData[Phone])
        CInputData[Phone]->GetText(szSDT, 11 + 1);

    DWORD currentTime = GetTickCount();
    if (this->TimeSendRegTK > currentTime)
    {
        DWORD waitTime = (this->TimeSendRegTK - currentTime) / 1000;
        char buffer[256];
        sprintf(buffer, gTextClien.TextClien_Rgig[RGIG_PLEASE_WAIT], waitTime);
        gInterface->OpenMessageBox(
            gTextClien.TextClien_Rgig[RGIG_ERROR_TITLE],
            buffer
        );
        return false;
    }

    if (strlen(szID) < 4)
    {
        gInterface->OpenMessageBox(
            gTextClien.TextClien_Rgig[RGIG_ERROR_TITLE],
            gTextClien.TextClien_Rgig[RGIG_ACCOUNT_MIN_LENGTH]
        );
        return false;
    }
   
    if (strlen(szPass) < 6)
    {
        gInterface->OpenMessageBox(
            gTextClien.TextClien_Rgig[RGIG_ERROR_TITLE],
            gTextClien.TextClien_Rgig[RGIG_PASSWORD_MIN_LENGTH]
        );
        return false;
    }
   
    if (strlen(szSno) != 7)
    {
        gInterface->OpenMessageBox(
            gTextClien.TextClien_Rgig[RGIG_ERROR_TITLE],
            gTextClien.TextClien_Rgig[RGIG_EXACTLY_7_DIGITS]
        );
        return false;
    }
   
    if (strlen(szSDT) < 10 || strlen(szSDT) > 11)
    {
        gInterface->OpenMessageBox(
            gTextClien.TextClien_Rgig[RGIG_ERROR_TITLE],
            gTextClien.TextClien_Rgig[RGIG_PHONE_LENGTH_REQUIREMENT]
        );
        return false;
    }

    auto IsValidAccountChar = [](char c) -> bool {
        return (c >= 'a' && c <= 'z') ||
               (c >= 'A' && c <= 'Z') ||
               (c >= '0' && c <= '9');
    };

    bool validAccount = true;
    bool validPassword = true;

    for (size_t i = 0; i < strlen(szID); i++)
    {
        if (!IsValidAccountChar(szID[i]))
        {
            validAccount = false;
            break;
        }
    }

    for (size_t i = 0; i < strlen(szPass); i++)
    {
        if (!IsValidAccountChar(szPass[i]))
        {
            validPassword = false;
            break;
        }
    }

    if (!validAccount || !validPassword)
    {
        gInterface->OpenMessageBox(
            gTextClien.TextClien_Rgig[RGIG_ERROR_TITLE],
            gTextClien.TextClien_Rgig[RGIG_ACCOUNT_PASSWORD_CHARS_ONLY]
        );
        return false;
    }

    PMSG_REGISTER_MAIN_SEND pMsg = { 0 };
    pMsg.header.set(0xD3, 0x05, sizeof(pMsg));
    pMsg.TypeSend = 0x01;

    strncpy_s(pMsg.account, sizeof(pMsg.account), szID, _TRUNCATE);
    strncpy_s(pMsg.password, sizeof(pMsg.password), szPass, _TRUNCATE);
    strncpy_s(pMsg.numcode, sizeof(pMsg.numcode), szSno, _TRUNCATE);
    strncpy_s(pMsg.sodienthoai, sizeof(pMsg.sodienthoai), szSDT, _TRUNCATE);

    pMsg.account[sizeof(pMsg.account) - 1] = '\0';
    pMsg.password[sizeof(pMsg.password) - 1] = '\0';
    pMsg.numcode[sizeof(pMsg.numcode) - 1] = '\0';
    pMsg.sodienthoai[sizeof(pMsg.sodienthoai) - 1] = '\0';

    DataSend((LPBYTE)&pMsg, pMsg.header.size);

    gInterface->vCaptcha = gInterface->generateCaptcha(4);

    if (CInputCaptCha)
    {
        CInputCaptCha->SetText("");
    }

    this->TimeSendRegTK = GetTickCount() + 5000;

    return true;
}

void CB_DangKyInGame::RecvKQRegInGame(XULY_CGPACKET* lpMsg)
{
    int TypeKQNotice = lpMsg->ThaoTac;

    char szID[MAX_ID_SIZE + 1] = { 0, };
    this->CInputData[Account]->GetText(szID, MAX_ID_SIZE + 1);

    char szPass[MAX_PASSWORD_SIZE + 1] = { 0, };
    this->CInputData[Pass]->GetText(szPass, MAX_PASSWORD_SIZE + 1);

    switch (TypeKQNotice)
    {
    case CB_DangKyInGame::eDangKyThanhCong:
    {
        char buffer[256];
        sprintf(buffer, gTextClien.TextClien_Rgig[RGIG_REGISTRATION_SUCCESS], szID);
        gInterface->OpenMessageBox(
            gTextClien.TextClien_Rgig[RGIG_RESULT_TITLE],
            buffer
        );
        CUIMng& rUIMng = CUIMng::Instance();
        rUIMng.m_LoginWin.GetIDInputBox()->SetText(szID);
        rUIMng.m_LoginWin.GetPassInputBox()->SetText(szPass);
    }
    break;
   
    case CB_DangKyInGame::eTaiKhoanDaTonTai:
    {
        char buffer[256];
        sprintf(buffer, gTextClien.TextClien_Rgig[RGIG_ACCOUNT_ALREADY_EXISTS], szID);
        gInterface->OpenMessageBox(
            gTextClien.TextClien_Rgig[RGIG_RESULT_TITLE],
            buffer
        );
    }
    break;
       
    case CB_DangKyInGame::eDuLieuNhapKhongDung:
        gInterface->OpenMessageBox(
            gTextClien.TextClien_Rgig[RGIG_RESULT_TITLE],
            gTextClien.TextClien_Rgig[RGIG_INVALID_INFORMATION]
        );
        break;
       
    default:
        break;
    }
}


CB_DangKyInGame.h:


#pragma once
#include "Protocol.h"
class CUITextInputBox;

class CB_DangKyInGame
{
enum TYPE_INPUT_DKTK
{
Account,
Pass,
Snonumber,
Phone,
eMaxINPUT,
};

struct PMSG_REGISTER_MAIN_SEND
{
PSBMSG_HEAD header; // C1:D2:02
BYTE TypeSend;
char account[11];
char password[21];
char numcode[8];
char sodienthoai[14];
};
enum eRecvKetQua
{
eDangKyThanhCong = 1,
eTaiKhoanDaTonTai = 2,
eDuLieuNhapKhongDung = 3,
eDatLaiMatKhauThanhCong = 11,
eThongTinBaoMatKhongChinhXac = 12,
};
public:
CB_DangKyInGame();
~CB_DangKyInGame();
bool RenderWindow(int X, int Y);
void OpenOnOff();
bool RequsetDKTK();
void RecvKQRegInGame(XULY_CGPACKET* lpMsg);
void Clear();
static CB_DangKyInGame* Instance();

protected:
CUITextInputBox* CInputData[TYPE_INPUT_DKTK::eMaxINPUT];
CUITextInputBox* CInputCaptCha;
DWORD TimeSendRegTK;
bool OpenDKTK;
};

#define gCB_DangKyInGame (CB_DangKyInGame::Instance())


TextClien.h:

#ifndef _TextClien_H
#define _TextClien_H

class cTextClien
{
public:
void Load();

char TextClien_ThongTin[50][255];
char TextClien_Khac[50][255];
char TextClien_Rgig[50][255];

};
//===================================================

#define MENU_GAME_FILE "./Data/Custom/TextClien/TextClien.ini"


extern cTextClien gTextClien;

#endif

TextClien.cpp:

#include "StdAfx.h"
#include "TextClien.h"
#include "Util.h"
#include <stdlib.h>
#include "windows.h"
//#include "atlstr.h"
#include "Interface.h"
#include "stdio.h"
#include "./Utilities/Log/muConsoleDebug.h"

#include "zzzinventory.h"
#include "dsplaysound.h"
#include "CSItemOption.h"

cTextClien gTextClien;

void cTextClien::Load()
{
char strFileName[255];
memset(strFileName, 0, sizeof(strFileName));
sprintf(strFileName, "./Data/Custom/TextClien/TextClien_%s.ini", g_strSelectedML.c_str());

char GetFotText[35] = { 0 };
for (int st = 0; st < 50; st++)
{
wsprintf(GetFotText, "Mess%d", st);
GetPrivateProfileStringA("ThongTin", GetFotText, "Null", TextClien_ThongTin[st], sizeof(TextClien_ThongTin[st]), strFileName);
GetPrivateProfileStringA("Khac",   GetFotText, "Null", TextClien_Khac[st], sizeof(TextClien_Khac[st]), strFileName);
GetPrivateProfileStringA("Rgig", GetFotText, "Null", TextClien_Rgig[st], sizeof(TextClien_Rgig[st]), strFileName);
g_ConsoleDebug->Write(5, "[Load text clien: %d: %s]", st, TextClien_ThongTin[st]);
}



}

Por ultimo van a Cliente/Data/Custom/TextClien/TextClien_(su idioma).ini  y agregan esto:


[Rgig]
Mess0 = "Account Registration"
Mess1 = "Account:"
Mess2 = "Password:"
Mess3 = "Code:"
Mess4 = "7 Secret Digits:"
Mess5 = "Phone"
Mess6 = "The account can only use characters 0~9, a~z"
Mess7 = "Code:"
Mess8 = "Confirm"
Mess9 = "ERROR"
Mess10 = "Incorrect Captcha Code"
Mess11 = "Please wait %d seconds before trying again"
Mess12 = "The account must have at least 4 characters"
Mess13 = "The password must have at least 6 characters"
Mess14 = "You must enter exactly 7 security digits"
Mess15 = "The phone number must have 10-11 digits"
Mess16 = "The account and password can only contain letters and numbers"
Mess17 = "Result"
Mess18 = "Congratulations on the successful registration! \n ID: %s"
Mess19 = "ID: %s \n Already exists, please register a different account!"
Mess20 = "The entered information is not valid, please check again!"
Mess21   = ""
Mess22   = ""
Mess23   = ""
Mess24   = ""
Mess25   = ""
Mess26   = ""
Mess27   = ""
Mess28   = ""
Mess29   = ""
Mess30   = ""
Mess31   = ""
Mess32   = ""
Mess33   = ""
Mess34   = ""
Mess35   = ""
Mess36   = ""
Mess37   = ""
Mess38   = ""
Mess39   = ""
Mess40   = ""
Mess41   = ""
Mess42   = ""
Mess43   = ""
Mess44   = ""
Mess45   = ""
Mess46   = ""
Mess47   = ""
Mess48   = ""
Mess49   = ""

CitarLOS ARCHIVOS TEXCLIEN SI NO TIENEN EL DE SU IDIOMA CREARLOS RECUERDEN COLOCAR SU IDENTIFICADOR EJEMPLO:TexClien_Spn.ini    TexClien_Por.ini  etc....

Creditos Dexign
Bon Dia

Dakosmu





fix configuration for muun slot 237 if move the other maps muun dispair (desaparecer)

Regístrate para ver el enlace



user in item.xml files server slot 237 for muun second slot

use movement 13 in custompet Regístrate para ver el enlace files.
Bon Dia

Dakosmu

#20
Regístrate para ver el enlace

bool CMoveCommandData::Create(const std::string& filename)
{
    char filepath[256];
    sprintf_s(filepath, ".\\Data\\Local\\%s\\MoveReq.xml", g_strSelectedML.c_str());

    pugi::xml_document file;

    if (!file.load_file(filepath))
    {
        return false;
    }

    pugi::xml_node WarpSettings = file.child("WarpSettings");
    if (!WarpSettings)
    {
        return false;
    }
     

    for (pugi::xml_node Warp = WarpSettings.child("Warp"); Warp; Warp = Warp.next_sibling("Warp"))
    {
        MOVEINFODATA* pMoveInfoData = new MOVEINFODATA;

        memset(pMoveInfoData, 0, sizeof(MOVEINFODATA));

        pMoveInfoData->_ReqInfo.index = Warp.attribute("Index").as_int();

        strcpy_s(pMoveInfoData->_ReqInfo.szMainMapName,sizeof(pMoveInfoData->_ReqInfo.szMainMapName),  Warp.attribute("ClientName").as_string());

        strcpy_s(pMoveInfoData->_ReqInfo.szSubMapName, sizeof(pMoveInfoData->_ReqInfo.szSubMapName), Warp.attribute("ServerName").as_string());

        pMoveInfoData->_ReqInfo.iReqLevel = Warp.attribute("MinLevel").as_int();
        pMoveInfoData->_ReqInfo.m_iReqMaxLevel = Warp.attribute("MaxLevel").as_int();
        pMoveInfoData->_ReqInfo.iReqZen = Warp.attribute("ReqMoney").as_int();
        pMoveInfoData->_ReqInfo.iGateNum = Warp.attribute("GateNumber").as_int();

        // Inicialización de precaucion
        pMoveInfoData->_bCanMove = true;
        pMoveInfoData->_bStrife = false;
        pMoveInfoData->_bSelected = false;

        m_listMoveInfoData.push_back(pMoveInfoData);
    }

    return true;
}


Descargar
Regístrate para ver el enlace



Creditos
Matias  - Reyzen Gupo Zomi
Bon Dia

Dakosmu


void CPersonalShopTitleImp::Draw()
{
if (m_listShopTitleDrawObj.empty()) return;

if (!IsShowShopTitles()) return;

UpdatePosition();
RevisionPosition();

CHARACTER* pSelectedPlayer = nullptr;
bool bIsSelectingPurchase = false;

if (SelectedCharacter != -1 &&
g_pNewUISystem->IsVisible(SEASON3B::INTERFACE_COMMAND) &&
g_pCommandWindow->GetCurCommandType() == COMMAND_PURCHASE)
{
pSelectedPlayer = gmCharacters->GetCharacter(SelectedCharacter);
bIsSelectingPurchase = (pSelectedPlayer != nullptr);
}

for (auto& item : m_listShopTitleDrawObj)
{
CHARACTER* pChar = item.first;
CShopTitleDrawObj* pDrawObj = item.second;

if (!pChar || !pDrawObj) continue;

if (bIsSelectingPurchase && pChar == pSelectedPlayer)
{
pDrawObj->EnableHighlight(); // quangky fix hàm này làm text hoặc khung sáng lên
}
else
{
pDrawObj->DisableHighlight();
}

if (pDrawObj->IsVisible())
{
pDrawObj->Draw(pChar->PK);
}
}
}
Bon Dia

Dakosmu

INTERFACE MUDREAM AL 80%
[/size]
le falta terminar varias cosas pero no pienso trabajar mas esa interface ya que en particular no me gusta....




Nota: Para activarla van a maininfo y en lookandfell colocan 5


Regístrate para ver el enlace
Bon Dia

🡱 🡳
Real Time Web Analytics