Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Compilar o agregar ChatExpanded(AYUDA)  (Visto 1303 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline akuamen78 Posteado: September 03, 2018, 08:48:38 PM

  • 0 puntos por ventas
  • *
  • Rank: Avanzado
  • Posts: 122
  • Gracias recibida: 1215
  • pe
Buenas abro este post de soporto para pedirles ayuda, si alguien me puede ayudar a compilar estos soucers a mi servidor. Gracias.
ChatExpanded.cpp

Spoiler for Hiden:
#include "StdAfx.h"
#include "ChatExpanded.h"
#include "Import.h"
#include "TMemory.h"
#include <atlstr.h>
#include "ToolKit.h"
#include "Defines.h"
// ----------------------------------------------------------------------------------------------

ChatExpanded   gChatExpanded;
// ----------------------------------------------------------------------------------------------

Naked(FixSysMsg1)
{
   __asm
   {
      cmp dword ptr ss:[ebp+0x10], 3
      je _true
      call NewCall
      jmp FixSysMsg1_FALSE
      _true:
      pop eax
      jmp FixSysMsg1_TRUE
   }
}
// ----------------------------------------------------------------------------------------------

Naked(FixSysMsg2)
{
   __asm
   {
      cmp dword ptr ss:[ebp+0x10], 3
      je _true
      call NewCall
      jmp FixSysMsg2_FALSE
      _true:
      pop eax
      jmp FixSysMsg2_TRUE
   }
}
// ----------------------------------------------------------------------------------------------

Naked(FixSysMsg3)
{
   __asm
   {
      cmp dword ptr ss:[ebp+0x10], 3
      je _true
      call NewCall
      jmp FixSysMsg3_FALSE
      _true:
      pop eax
      jmp FixSysMsg3_TRUE
   }
}
// ----------------------------------------------------------------------------------------------

void ChatExpanded::Load()
{
   this->IsActive = true;
   SetOp((LPVOID)oShowChatMessage_Call, (LPVOID)this->ShowChatMessage, ASM::CALL);
   SetOp((LPVOID)FixSysMsg1_Hook, FixSysMsg1, ASM::JMP);
   SetOp((LPVOID)FixSysMsg2_Hook, FixSysMsg2, ASM::JMP);
   SetOp((LPVOID)FixSysMsg3_Hook, FixSysMsg3, ASM::JMP);
}
// ----------------------------------------------------------------------------------------------

void ChatExpanded::SetInstance(LPVOID Instance)
{
   this->Instance         = Instance;
   this->PosYBuff         = this->GetPosY();
   this->HeightBuff      = this->GetHeight();
   this->MessageCountBuff   = this->GetMessageCount();
   this->MessageTypeBuff   = this->GetMessageType();
   this->ScrollPosBuff      = this->GetScrollPos();
}
// ----------------------------------------------------------------------------------------------

void ChatExpanded::Restore()
{
   this->SetPosY(this->PosYBuff);
   this->SetHeight(this->HeightBuff);
   this->SetMessageCount(this->MessageCountBuff);
   this->SetMessageType(this->MessageTypeBuff);
   this->SetScrollPos(this->ScrollPosBuff);
}
// ----------------------------------------------------------------------------------------------

void ChatExpanded::Switch()
{
   if( !gChatExpanded.IsActive )
   {
      SetOp((LPVOID)FixSysMsg1_Hook, FixSysMsg1, ASM::JMP);
      SetOp((LPVOID)FixSysMsg2_Hook, FixSysMsg2, ASM::JMP);
      SetOp((LPVOID)FixSysMsg3_Hook, FixSysMsg3, ASM::JMP);
      gChatExpanded.IsActive = true;
   }
   else
   {
      SetOp((LPVOID)FixSysMsg1_Hook, (LPVOID)oNewCall, ASM::CALL);
      SetOp((LPVOID)FixSysMsg2_Hook, (LPVOID)oNewCall, ASM::CALL);
      SetOp((LPVOID)FixSysMsg3_Hook, (LPVOID)oNewCall, ASM::CALL);
      gChatExpanded.IsActive = false;
   }
}
// ----------------------------------------------------------------------------------------------

bool ChatExpanded::ShowChatMessage(LPVOID This, LPVOID EDX)
{
   if( !gChatExpanded.IsActive )
   {
      return pShowChatMessage(This);
   }
   // ----
   gChatExpanded.SetInstance(This);
   gChatExpanded.SetPosY(172);
   gChatExpanded.SetHeight(100);
   gChatExpanded.SetMessageCount(4);
   pSetChatMessageType(This, 3);
   pShowChatMessage(This);
   gChatExpanded.Restore();
   return pShowChatMessage(This);
}
// ----------------------------------------------------------------------------------------------

ChatExpanded.h

Spoiler for Hiden:
#pragma once
// ----------------------------------------------------------------------------------------------

//#include "ProtocolDefine.h"
#include "Defines.h"
// ----------------------------------------------------------------------------------------------

#define oNewCall            0x009D00C5
#define oFixSysMsg1_Hook      0x00789767
#define oFixSysMsg1_TRUE      0x00789824
#define oFixSysMsg2_Hook      0x00789A63
#define oFixSysMsg2_TRUE      0x00789B5A
#define oFixSysMsg3_Hook      0x00789DAC
#define oFixSysMsg3_TRUE      0x00789E6F
const int NewCall            = oNewCall;
const int FixSysMsg1_Hook      = oFixSysMsg1_Hook;   
const int FixSysMsg1_FALSE      = oFixSysMsg1_Hook+5;
const int FixSysMsg1_TRUE      = oFixSysMsg1_TRUE;
const int FixSysMsg2_Hook      = oFixSysMsg2_Hook;
const int FixSysMsg2_FALSE      = oFixSysMsg2_Hook+5;
const int FixSysMsg2_TRUE      = oFixSysMsg2_TRUE;
const int FixSysMsg3_Hook      = oFixSysMsg3_Hook;
const int FixSysMsg3_FALSE      = oFixSysMsg3_Hook+5;
const int FixSysMsg3_TRUE      = oFixSysMsg3_TRUE;
// ----------------------------------------------------------------------------------------------

#define MAX_CHAT_TYPE   10
// ----------------------------------------------------------------------------------------------

namespace MUChatTypeName
{
   enum T
   {
      Default      = 0,
      TalkNormal   = 1,
      Info      = 2,
      SystemInfo   = 3,
      Warning      = 4,
      Party      = 5,
      Guild      = 6,
      Alliance   = 7,
      TalkGM      = 8,
      Gens      = 9,
   };
};
// ----------------------------------------------------------------------------------------------

struct MUChatType   //-> 24
{
/*+12*/   DWORD   Unknown12;
/*+16*/   DWORD   Unknown16;
/*+20*/   DWORD   Unknown20;
};
// ----------------------------------------------------------------------------------------------

class MUChat
{
/*+4*/      DWORD   Unknown4;
/*+12*/      DWORD   Unknown12;
/*+16*/      MUChatType ChatType[MAX_CHAT_TYPE];
/*+256*/   bool   IsActiveChatType[MAX_CHAT_TYPE];
/*+268*/   //SomeType LPVOID;
/*+292*/   DWORD   Unknown292;
/*+296*/   DWORD   WindowPosY;
/*+300*/   DWORD   Unknown300;
/*+304*/   DWORD   Unknown304;
/*+308*/   DWORD   Unknown308;
/*+312*/   DWORD   WindowHeight;
/*+316*/   DWORD   WindowLineCount;
/*+320*/   DWORD   MessageType;
/*+324*/   BYTE   Unknown324;
/*+328*/   DWORD   WindowScrollPos;
/*+336*/   float   Unknown336;
/*+340*/   DWORD   Unknown340;
/*+344*/   BYTE   Unknown344;
/*+345*/   BYTE   Unknown345;
/*+348*/   DWORD   Unknown348;
};
// ----------------------------------------------------------------------------------------------

class ChatExpanded
{
public:
   static bool _FC ShowChatMessage(LPVOID This, LPVOID EDX);
   // ----
   void   Load();
   // ----
   void   SetInstance(LPVOID Instance);   
   void   Restore();
   void   Switch();
   // ----
   void   SetPosY(DWORD PosY)            { *(DWORD*)((int)this->Instance + 296) = PosY; };
   DWORD   GetPosY()                  { return *(DWORD*)((int)this->Instance + 296); };
   void   SetHeight(DWORD Height)         { *(DWORD*)((int)this->Instance + 312) = Height; };
   DWORD   GetHeight()                  { return *(DWORD*)((int)this->Instance + 312); };
   void   SetMessageCount(DWORD Count)   { *(DWORD*)((int)this->Instance + 316) = Count; };
   DWORD   GetMessageCount()            { return *(DWORD*)((int)this->Instance + 316); };
   void   SetMessageType(DWORD Type)      { *(DWORD*)((int)this->Instance + 320) = Type; };
   DWORD   GetMessageType()            { return *(DWORD*)((int)this->Instance + 320); };
   void   SetScrollPos(DWORD Pos)         { *(DWORD*)((int)this->Instance + 328) = Pos; };
   DWORD   GetScrollPos()               { return *(DWORD*)((int)this->Instance + 328); };
   // ----
public:
   LPVOID   Instance;
   DWORD   PosYBuff;
   DWORD   HeightBuff;
   DWORD   MessageCountBuff;
   DWORD   MessageTypeBuff;
   DWORD   ScrollPosBuff;
   bool   IsActive;
   // ----
}; extern ChatExpanded gChatExpanded;
// ----------------------------------------------------------------------------------------------

Main.cpp

Spoiler for Hiden:
#include "ChatExpanded.h"

gChatExpanded.Load();


Gracias:


Offline caron22 #1 Posteado: September 04, 2018, 11:50:37 AM

  • C++ Coder
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 622
  • Gracias recibida: 6519
  • ar
Como estas? contame que es lo que hace este chat en la teoria?
Para que main es?
Tenes sources lado main?


Offline iramondias #2 Posteado: September 04, 2018, 12:26:31 PM

  • C++ Coder
  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 56
  • Gracias recibida: 71
  • br

Offline akuamen78 #3 Posteado: September 04, 2018, 08:45:33 PM

  • 0 puntos por ventas
  • *
  • Rank: Avanzado
  • Posts: 122
  • Gracias recibida: 1215
  • pe
Como estas? contame que es lo que hace este chat en la teoria?
Para que main es?
Tenes sources lado main?

@caron22 Disculpa te mande un MP sobre el problema que tengo espero puedas ayudarme. Gracias.


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
16 Replies
16050 Views
Last post August 03, 2023, 11:18:53 PM
by Ryzenn
14 Replies
7051 Views
Last post May 31, 2018, 08:11:23 PM
by Natzugen
0 Replies
687 Views
Last post March 26, 2020, 11:32:56 AM
by dark32
0 Replies
671 Views
Last post June 06, 2021, 09:05:16 PM
by thongd45
1 Replies
787 Views
Last post February 21, 2025, 03:00:09 PM
by JYachelini