Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Right Click Mouse  (Visto 69773 veces)

0 Miembros and 2 Guests are viewing this topic.

Offline 1732313 #240 Posteado: December 20, 2020, 03:37:19 PM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 64
  • Gracias recibida: 4
  • ru
1.05 offset plz!!! Season 4 Muemu.


Offline tilmur #241 Posteado: December 22, 2020, 06:44:04 AM | Modificado: December 31, 2020, 07:06:09 AM by tilmur

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 11
  • Gracias recibida: 4
  • es
¿Alguien sabe el offset del pChaosBoxState para la 1.04d? El que está creo que es para la 1.04e...

#define pChaosBoxState *(BYTE*)(*(DWORD*)(0x98670C4) + 0xC8) <-- ?????

El offset está bien, pero tenía que cambiar algunas funciones para hacerlo funcionar correctamente.

Si tenéis 1.04D con z-team os posteo todo el código que estoy usando, con el fix de la Chaos Machine, el fix de las armas en DL/RF, el fix para no equipar/desequipar alas o Uniria en Icarus y el fix para que no desaparezcan items si desequipáis algo con el inventario lleno.

Voy a seguir el mismo esquema que dejó @Llalex para que quede más ordenado:

Main

stdafx.h
Agregar al final:

Code: [Select]
//Click Derecho
#define MOVE_ITEM 1

Import.h
Agregar al final:

Code: [Select]
//Click Derecho
#define pChaosBoxState *(BYTE*)(*(DWORD*)(0x98670C4) + 0xC8)

post_item.cpp
Buscar "PostItem::PostItem ()" y agregar debajo de "Hook();"

Code: [Select]
	//Click Derecho
#if(MOVE_ITEM)
last_tickcount_moveitem_ = 0;
#endif

Buscar "void PostItem::Hook()" y agregar al final dentro de la función:

Code: [Select]
	//Click Derecho
#if(MOVE_ITEM)
SetOp((LPVOID)(0x0083B7E4), (LPVOID)Equipments, ASM::JMP); //1.04D->0x0083B7E4 1.04E -> 0x0083B7E4 + 0x150
#endif

Buscar "void PostItem::PostItemToWorldChatChannelImp" y reemplazarla en su totalidad:
Code: [Select]
void PostItem::PostItemToWorldChatChannelImp ( void * item_data ) {
    // check window, not allow for shop, inventory, warehouse, etc
    if ( gInterface.CheckWindow ( Trade ) ||
            gInterface.CheckWindow ( Warehouse ) ||
            gInterface.CheckWindow ( Shop ) ||
            gInterface.CheckWindow ( Store ) ||
            gInterface.CheckWindow ( OtherStore ) ||
            gInterface.CheckWindow ( CashShop ) ||
            gInterface.CheckWindow ( ExpandWarehouse ) )
{
        return;
    }

    if ( GetTickCount() <= gPostItem.last_tickcount_post_ + 3000 )
{
return;
}

    if ( GetKeyState ( VK_RBUTTON ) & 0x8000 && GetKeyState ( VK_CONTROL ) & 0x8000 )
{
        PMSG_POSTITEM iMsg = { '\0' };
        strcpy_s ( iMsg.chatmsg, ( char* ) pCurrentViewingItemName );
        memcpy_s ( &iMsg.chatid[0], 10, ( char* ) oUserObjectStruct_, 10 );
        memcpy_s ( &iMsg.item_data[0], 107, item_data, 107 );
        iMsg.h.set( ( BYTE* )&iMsg, 0x78, sizeof ( iMsg ) );
        gProtocol.DataSend ( ( BYTE* ) &iMsg, iMsg.h.size );
        gPostItem.last_tickcount_post_ = GetTickCount();
    }
//Click Derecho
#if(MOVE_ITEM)
else if (GetKeyState(VK_RBUTTON) & 0x8000 && GetTickCount() >= gPostItem.last_tickcount_moveitem_ + 250)
{
ObjectItem * lItem = (ObjectItem*)item_data;

if (lItem->ItemID < 0) { return; }

PMSG_ITEM_MOVE_RECV pMsg = { 0 };

pMsg.h.set( ( BYTE* )&pMsg, 0x79, 0x01, sizeof ( pMsg ) );
pMsg.Target = -1;

if (gInterface.CheckWindow(ChaosBox) && gInterface.CheckWindow(Inventory))
{
if ((pCursorX > 460))
{
pMsg.sFlag = 0;
pMsg.tFlag = 3;
pMsg.Target = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12;
}
else if (gInterface.CheckWindow(ExpandInventory) && pCursorX > 260)
{
pMsg.sFlag = 0;
pMsg.tFlag = 3;
pMsg.Target = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12 + 64;
if (pCursorY > 130)
pMsg.Source += 32;
}
else {
pMsg.sFlag = 3;
pMsg.tFlag = 0;
pMsg.Target = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8;
}
}
else
{
float v1 = 0;
if (gInterface.CheckWindow(Character))
v1 = *(float*)(0x00D24E88);
if ((pCursorX > 460 - v1))
{
pMsg.sFlag = 0;
pMsg.tFlag = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12;

}
else if (gInterface.CheckWindow(ExpandInventory) && pCursorX > 260 - v1)
{
pMsg.sFlag = 0;
pMsg.tFlag = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12 + 64;
if (pCursorY > 130)
pMsg.Source += 32;
}
pMsg.Target = 0;
}

gProtocol.DataSend ( ( BYTE* ) &pMsg, pMsg.h.size );
gPostItem.last_tickcount_moveitem_ = GetTickCount();
}
#endif

Agregar al final de "post_item.cpp"

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
void __declspec (naked) PostItem::Equipments() {
static DWORD mem = 0;
_asm {
mov eax, dword ptr ds : [ebp - 04]
mov mem, eax
}
RemoveEquipment((void *)mem);
_asm {
mov esp, ebp
pop ebp
ret 0004
}
}

void PostItem::RemoveEquipment(void * item_data) {
// check window, not allow for shop, inventory, warehouse, etc
if (gInterface.CheckWindow(Trade) ||
gInterface.CheckWindow(Warehouse) ||
gInterface.CheckWindow(Shop) ||
gInterface.CheckWindow(Store) ||
gInterface.CheckWindow(OtherStore) ||
gInterface.CheckWindow(CashShop) ||
gInterface.CheckWindow(ExpandWarehouse)) {
return;
}
if (GetKeyState(VK_RBUTTON) & 0x8000 && GetTickCount() >= gPostItem.last_tickcount_moveitem_ + 250)
{
ObjectItem * lItem = (ObjectItem*)item_data;

if (lItem->ItemID < 0) { return; }

PMSG_ITEM_MOVE_RECV pMsg = { 0 };

pMsg.h.set((LPBYTE)&pMsg, 0x79, 0x01, sizeof (pMsg));

pMsg.sFlag = 0;
pMsg.tFlag = 0;
pMsg.Source = lItem->PosX;
pMsg.Target = 0;

gProtocol.DataSend((BYTE*)&pMsg, pMsg.h.size);

gPostItem.last_tickcount_moveitem_ = GetTickCount();
}
}
#endif

"post_item.h"
Agregar debajo de "int PostItemColor;"

Code: [Select]
	//Click Derecho
#if(MOVE_ITEM)
static void Equipments();
static void RemoveEquipment(void * item_data);
#endif

Agregar debajo de "char * draw_character_head_chat_text_base_address_;"

Code: [Select]
	//Click Derecho
#if(MOVE_ITEM)
DWORD last_tickcount_moveitem_;
#endif

"Protocol.cpp"
Buscar "case 0xF3:" y agregar a dentro de este case:

Code: [Select]
				//Click Derecho
#if(MOVE_ITEM)
case 0xEE:
{
SetChaosBoxState((PMSG_SET_CHAOSBOX_STATE*)Data);
}
break;
#endif

Agregar al final de "Protocol.cpp"

Code: [Select]
//Click Derecho

#if(MOVE_ITEM)
void SetChaosBoxState(PMSG_SET_CHAOSBOX_STATE* Data){
pChaosBoxState = Data->state;
return;
}
#endif

"Protocol.h"
Buscar "struct PMSG_POSTITEM" y agregar debajo:

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
struct PMSG_ITEM_MOVE_RECV
{
//PBMSG_HEAD h;
PBMSG_HEAD2 h;
BYTE sFlag;
BYTE tFlag;
BYTE Source;
BYTE Target;
};

struct PMSG_SET_CHAOSBOX_STATE
{
//PBMSG_HEAD header; // C1:32
PBMSG_HEAD2 header; // C1:32
BYTE state;
};
#endif

Agregar al final de "Protocol.h":

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
void SetChaosBoxState(PMSG_SET_CHAOSBOX_STATE* Data);
#endif

Game Server

stdafx.h
Agregar al final:

Code: [Select]
//Click Derecho
#define MOVE_ITEM 1

Protocol.cpp
Agregar al final:

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
//BYTE InventoryCheckInsertItem(int aIndex, WORD item) // OK
BYTE InventoryCheckInsertItem(int aIndex, CItem item) // OK
{


//CItem item;
int w,h,iwidth,iheight;
BYTE blank = 0;

if(item.GetSize((int &)iwidth,(int &)iheight)==0)
{
LogAdd(lMsg.Get(527),__FILE__,__LINE__);
return -1;
}

        // Fix Click Derecho - No desequipar cosas con el inventario lleno
if (!CheckInventoryEmptySpace(&gObj[aIndex], iheight, iwidth))
{
return -1;
}

for(h = 0; h < MAX_INVENTORY_H; h++) //24
{
for(w = 0; w < 8; w++)
{
if(*(BYTE*)(gObj[aIndex].pInventoryMap+h*8+w) == 255)
{
blank = gObjInventoryRectCheck(aIndex,w,h,iwidth,iheight);

if(blank == 254)
{
goto GOTO_EndFunc;
}

if(blank != 255)
{
return blank;
}
}
}
}
GOTO_EndFunc:
return -1;
}

//bool IsLuckyItem(int item_num)
//{
// if( (item_num >= GET_ITEM(7,62) && item_num <= GET_ITEM(7,72))
// || (item_num >= GET_ITEM(8,62) && item_num <= GET_ITEM(8,72))
// || (item_num >= GET_ITEM(9,62) && item_num <= GET_ITEM(9,72))
// || (item_num >= GET_ITEM(10,62) && item_num <= GET_ITEM(10,72))
// || (item_num >= GET_ITEM(11,62) && item_num <= GET_ITEM(11,72))
// )
// {
// return true;
// }
// return false;
//}


void CGMoveItemProc(PMSG_MOVEITEM* aRecv, short aIndex)
{
int iwidth, iheight;

if (OBJMAX_RANGE(aIndex) == 0) { return; }


LPOBJ lpObj = &gObj[aIndex];

if (aRecv->Target == -1) { return; }


if (aRecv->tFlag == 3 && aRecv->sFlag == 0 && lpObj->pInventory[aRecv->Source].IsItem()) //check input item
{
//if (IsLuckyItem(lpObj->pInventory[aRecv->Source].m_Index))
if (g_LuckyItemManager.IsLuckyItemEquipment(lpObj->pInventory[aRecv->Source].m_Type))
{
return;
}

BYTE btItemType = 0;
btItemType |= (lpObj->pInventory[aRecv->Source].m_Type & 0x1E00) >> 5;

if ((btItemType + 2) == lpObj->pInventory[aRecv->Source].m_ItemOptionEx)
{
return;
}
}

//PMSG_ITEM_MOVE_RECV pMsg = { 0 };
PMSG_INVENTORYITEMMOVE pMsg = { 0 };

//pMsg.TargetSlot = -1;
pMsg.target_item_num = -1;

if (aRecv->tFlag == 3 && aRecv->sFlag == 0) //move Inv -> ChaosBox
{
                // Fix Click Derecho - No mover Fenrir azul/negro/dorado en la ChaosBox
if (!lpObj->pInventory[aRecv->Source].IsItem() || ((lpObj->pInventory[aRecv->Source].m_Type == ITEMGET(13,37)) && (lpObj->pInventory[aRecv->Source].m_NewOption > 0)))
return; //no item
int p = 0, c = 0, d = 0, w = 0, h = 0, n = 0;
int Target = -1;
int TargetMap[CHAOS_BOX_SIZE] = { '\0' };

for (n = 0; n < CHAOS_BOX_SIZE; n++)
{
if (lpObj->pChaosBox[n].IsItem())
{
CItem ItemInfo = lpObj->pChaosBox[n];

if(ItemInfo.GetSize((int&)w,(int&)h)==0)
{
LogAdd(lMsg.Get(527),__FILE__,__LINE__);
return;
}

for (c = 0; c < w; c++)
{
for (d = 0; d < h; d++)
{
p = c + d * 8 + n;
if (p < CHAOS_BOX_SIZE)
{
TargetMap[p] = 1;
}
}
}
}
}

for (n = 0; n < CHAOS_BOX_SIZE; n++)
{
if (!TargetMap[n])
{
Target = n;

CItem item = lpObj->pInventory[aRecv->Source];

if(item.GetSize((int&)w,(int&)h)==0)
{
LogAdd(lMsg.Get(527),__FILE__,__LINE__);
return;
}

for (c = 0; c < w; c++)
{
for (d = 0; d < h; d++)
{
p = c + d * 8 + n;
if (p >= CHAOS_BOX_SIZE || TargetMap[p] || (n % 8) + c > 7) //   8) = 8
                        {   
Target = -1;
}
}
}
if (Target != -1)
break;
}
}
if (Target != -1)
{
pMsg.target_item_num = Target;
ItemByteConvert(pMsg.sItemInfo, lpObj->pInventory[aRecv->Source]);
}
else
{
return; //no more empty slot to add.
}
}
else if (aRecv->tFlag == 0 && aRecv->sFlag == 3) //move ChaosBox -> Inv
{
if (!lpObj->pChaosBox[aRecv->Source].IsItem())
return; //no item

ItemByteConvert(pMsg.sItemInfo, lpObj->pChaosBox[aRecv->Source]);

int Target = InventoryCheckInsertItem(aIndex, lpObj->pChaosBox[aRecv->Source]);
//int Target = gObjInventoryInsertItem(aIndex, lpObj->pChaosBox[aRecv->Source]);

//if (Target == 0xFF)
if (Target == -1)
{
return;
}

pMsg.target_item_num = Target;
}
else if (aRecv->tFlag == 0 && aRecv->sFlag == 0) //equip/unequip item
{
if (!lpObj->pInventory[aRecv->Source].IsItem())
return;

ItemByteConvert(pMsg.sItemInfo, lpObj->pInventory[aRecv->Source]);

if (aRecv->Source > 11) { //wear equipment case
CItem ItemInfo = lpObj->pInventory[aRecv->Source];

LPITEM_ATTRIBUTE lpItemAttr = GetItemAttr(ItemInfo.m_Type);

//pMsg.target_item_num = ItemInfo.GetDetailItemType();
pMsg.target_item_num = lpItemAttr->ItemSlot;
if (pMsg.target_item_num == 0
&& lpObj->pInventory[0].IsItem() //slot 0 already has item
&& !lpObj->pInventory[1].IsItem() //slot 1 is empty
&& lpObj->pInventory[aRecv->Source].m_Type < ITEMGET(3, 0)) //sword,spear, maces item
pMsg.target_item_num = 1;
else if (pMsg.target_item_num == 10
&& lpObj->pInventory[10].IsItem() //slot 10 already has item
&& !lpObj->pInventory[11].IsItem()) //slot 11 empty
pMsg.target_item_num = 11;
else if (lpObj->pInventory[lpItemAttr->ItemSlot].IsItem()){
return; //already has item this slot

if (!gObjIsItemPut(lpObj, &ItemInfo, pMsg.target_item_num))
return;
}
}
else { //unequipment case
int Target = InventoryCheckInsertItem(aIndex, lpObj->pInventory[aRecv->Source]);
//int Target = gObjInventoryInsertItem(aIndex, lpObj->pInventory[aRecv->Source]);

//if (Target == 0xFF)
if (Target == -1)
{
return;
}

pMsg.target_item_num = Target;
}
}
else {
return; //invalid case
}

pMsg.sFlag = aRecv->sFlag;
pMsg.tFlag = aRecv->tFlag;
pMsg.source_item_num = aRecv->Source;

//this->CGItemMoveRecv(&pMsg, aIndex);
CGInventoryItemMove(&pMsg, aIndex);

if (aRecv->tFlag == 0 && aRecv->sFlag == 3)
{
GCUserChaosBoxSend(lpObj, 0);

//update chaosBox by new packet????
PMSG_SET_CHAOSBOX_STATE pMsg = { 0 };

pMsg.header.set((LPBYTE)&pMsg, 0xF3, 0xEE, sizeof(pMsg));

pMsg.state = 0; //0 = allow mix || 2 = disable mix

DataSend(aIndex, (LPBYTE)&pMsg, pMsg.header.size);
}
else if ((aRecv->tFlag == 3 && aRecv->sFlag == 0) || (aRecv->tFlag == 0 && aRecv->sFlag == 0))
{
if (!lpObj->pInventory[aRecv->Source].IsItem())
{
GCInventoryItemDeleteSend(aIndex, aRecv->Source, aRecv->sFlag);
}
}


return;
}
#endif

En Protocol.cpp buscar "GCPostItemProc((PMSG_POST_ITEM_RECV*)aRecv,aIndex);" y agregar debajo de su "break":

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
case 0x79:
CGMoveItemProc((PMSG_MOVEITEM*)aRecv, aIndex);
break;
#endif

Protocol.h
Buscar "void GCPostItemProc(PMSG_POST_ITEM_RECV* lpMsg, int aIndex );" y agregar a continuación:

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
struct PMSG_MOVEITEM
{
//PBMSG_HEAD h;
PBMSG_HEAD2 h;
BYTE sFlag;
BYTE tFlag;
BYTE Source;
BYTE Target;
};

struct PMSG_SET_CHAOSBOX_STATE
{
//PBMSG_HEAD header; // C1:32
PBMSG_HEAD2 header; // C1:32
BYTE state;
};
#endif

Buscar "void CGInventoryEquipment(_tagPMSG_REQ_INVENTORY_EQUIPMENT_ITEM * lpMsg, int iIndex);" y agregar a continuación:

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
void CGMoveItemProc(PMSG_MOVEITEM* aRecv, short aIndex);
//BYTE InventoryCheckInsertItem(int aIndex, WORD item);
BYTE InventoryCheckInsertItem(int aIndex, CItem item);
#endif

User.cpp
Dentro de la función "BOOL gObjIsItemPut(LPOBJ lpObj, CItem * lpItem, int pos )" buscar la línea de código "if(lpObj->Class == CLASS_DARKLORD)" y reemplazarlo por lo siguiente:

Code: [Select]
if(lpObj->Class == CLASS_DARKLORD)
{
if((lpItem->m_Type>>9) == 2)
{
if(lpItem->m_Part != pos)
{
return false;
}
}
// Fix Click Derecho - Solo escudos/cuervo en el DL como segunda arma
else if ((lpItem->m_Type != MuItem::miHELPER_DARK_RAVEN && lpItem->GetDetailItemType() != MuItemType::mitSHIELD) && pos == 1)
{
return false;
}
}

Dentro de la misma función "BOOL gObjIsItemPut(LPOBJ lpObj, CItem * lpItem, int pos )" buscar la condición "if(lpObj->Class == CLASS_WIZARD)" y reemplazar por:

Code: [Select]
if(lpObj->Class == CLASS_WIZARD)
{
if((lpItem->m_Type>>9) == 5)
{
if(lpItem->m_Part != pos)
{
return false;
}
}
// Fix Click Derecho - Solo escudos en el SM como segunda arma
else if (lpItem->GetDetailItemType() != MuItemType::mitSHIELD && pos == 1)
{
return false;
}
}

Buscar la linea "if(lpItem->m_Part != pos)" y agregar en la linea de arriba:

Code: [Select]
// Fix Click Derecho Armas RF
if(lpObj->Class == CLASS_MONK)
{
if(pos == 0 || pos == 1)
{
if(lpObj->pInventory[0].IsItem() == 1)
{
if ((lpItem->GetDetailItemType() == MuItemType::mitGloves) && (lpObj->pInventory[0].GetDetailItemType() != MuItemType::mitGloves) ||
(lpItem->GetDetailItemType() != MuItemType::mitGloves && lpObj->pInventory[0].GetDetailItemType() == MuItemType::mitGloves))
{
return false;
}
}
if(lpObj->pInventory[1].IsItem() == 1)
{
if ((lpItem->GetDetailItemType() == MuItemType::mitGloves) && (lpObj->pInventory[1].GetDetailItemType() != MuItemType::mitGloves) ||
(lpItem->GetDetailItemType() != MuItemType::mitGloves && lpObj->pInventory[1].GetDetailItemType() == MuItemType::mitGloves))
{
return false;
}
}
}
}

Seguimos en la función "BOOL gObjIsItemPut(LPOBJ lpObj, CItem * lpItem, int pos )", buscamos la línea "else if(lpItem->m_Type == ITEMGET(13,2))" y reemplazamos toda la condición por:

Code: [Select]
else if(lpItem->m_Type == ITEMGET(13,2))
{
// Fix Click Derecho - No equipar Uniria en Icarus
//if(lpObj->MapNumber == 7 || lpObj->Level < lpItem->m_RequireLevel)
if(lpObj->MapNumber == 7 || lpObj->MapNumber == 10 || lpObj->Level < lpItem->m_RequireLevel)
{
return false;
}
}

zzzitem.cpp

Dentro de la función "int CItem::GetDetailItemType()" hay que comprobar que todos los claw para RF están seteados aquí en el bloque de la condición if que tenga como "return" el valor "12":

Yo lo puse así, pero debéis incluir los valores de vuestros claw:
Code: [Select]
// Fix Click Derecho
//if( this->m_Type >= MuItem::miGROUP_SWORD_START+32 && this->m_Type <= MuItem::miGROUP_SWORD_START+35 )
if( (this->m_Type >= MuItem::miGROUP_SWORD_START+32 && this->m_Type <= MuItem::miGROUP_SWORD_START+35) ||
(this->m_Type >= MuItem::miGROUP_SWORD_START+40 && this->m_Type <= MuItem::miGROUP_SWORD_START+41) )
{
return MuItemType::mitGloves;
}

Espero que os ayude. :)


Offline KhongGianOL #242 Posteado: January 09, 2021, 08:49:36 AM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 246
  • Gracias recibida: 719
  • vn
¿Alguien sabe el offset del pChaosBoxState para la 1.04d? El que está creo que es para la 1.04e...

#define pChaosBoxState *(BYTE*)(*(DWORD*)(0x98670C4) + 0xC8) <-- ?????

El offset está bien, pero tenía que cambiar algunas funciones para hacerlo funcionar correctamente.

Si tenéis 1.04D con z-team os posteo todo el código que estoy usando, con el fix de la Chaos Machine, el fix de las armas en DL/RF, el fix para no equipar/desequipar alas o Uniria en Icarus y el fix para que no desaparezcan items si desequipáis algo con el inventario lleno.

Voy a seguir el mismo esquema que dejó @Llalex para que quede más ordenado:

Main

stdafx.h
Agregar al final:

Code: [Select]
//Click Derecho
#define MOVE_ITEM 1

Import.h
Agregar al final:

Code: [Select]
//Click Derecho
#define pChaosBoxState *(BYTE*)(*(DWORD*)(0x98670C4) + 0xC8)

post_item.cpp
Buscar "PostItem::PostItem ()" y agregar debajo de "Hook();"

Code: [Select]
	//Click Derecho
#if(MOVE_ITEM)
last_tickcount_moveitem_ = 0;
#endif

Buscar "void PostItem::Hook()" y agregar al final dentro de la función:

Code: [Select]
	//Click Derecho
#if(MOVE_ITEM)
SetOp((LPVOID)(0x0083B7E4), (LPVOID)Equipments, ASM::JMP); //1.04D->0x0083B7E4 1.04E -> 0x0083B7E4 + 0x150
#endif

Buscar "void PostItem::PostItemToWorldChatChannelImp" y reemplazarla en su totalidad:
Code: [Select]
void PostItem::PostItemToWorldChatChannelImp ( void * item_data ) {
    // check window, not allow for shop, inventory, warehouse, etc
    if ( gInterface.CheckWindow ( Trade ) ||
            gInterface.CheckWindow ( Warehouse ) ||
            gInterface.CheckWindow ( Shop ) ||
            gInterface.CheckWindow ( Store ) ||
            gInterface.CheckWindow ( OtherStore ) ||
            gInterface.CheckWindow ( CashShop ) ||
            gInterface.CheckWindow ( ExpandWarehouse ) )
{
        return;
    }

    if ( GetTickCount() <= gPostItem.last_tickcount_post_ + 3000 )
{
return;
}

    if ( GetKeyState ( VK_RBUTTON ) & 0x8000 && GetKeyState ( VK_CONTROL ) & 0x8000 )
{
        PMSG_POSTITEM iMsg = { '\0' };
        strcpy_s ( iMsg.chatmsg, ( char* ) pCurrentViewingItemName );
        memcpy_s ( &iMsg.chatid[0], 10, ( char* ) oUserObjectStruct_, 10 );
        memcpy_s ( &iMsg.item_data[0], 107, item_data, 107 );
        iMsg.h.set( ( BYTE* )&iMsg, 0x78, sizeof ( iMsg ) );
        gProtocol.DataSend ( ( BYTE* ) &iMsg, iMsg.h.size );
        gPostItem.last_tickcount_post_ = GetTickCount();
    }
//Click Derecho
#if(MOVE_ITEM)
else if (GetKeyState(VK_RBUTTON) & 0x8000 && GetTickCount() >= gPostItem.last_tickcount_moveitem_ + 250)
{
ObjectItem * lItem = (ObjectItem*)item_data;

if (lItem->ItemID < 0) { return; }

PMSG_ITEM_MOVE_RECV pMsg = { 0 };

pMsg.h.set( ( BYTE* )&pMsg, 0x79, 0x01, sizeof ( pMsg ) );
pMsg.Target = -1;

if (gInterface.CheckWindow(ChaosBox) && gInterface.CheckWindow(Inventory))
{
if ((pCursorX > 460))
{
pMsg.sFlag = 0;
pMsg.tFlag = 3;
pMsg.Target = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12;
}
else if (gInterface.CheckWindow(ExpandInventory) && pCursorX > 260)
{
pMsg.sFlag = 0;
pMsg.tFlag = 3;
pMsg.Target = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12 + 64;
if (pCursorY > 130)
pMsg.Source += 32;
}
else {
pMsg.sFlag = 3;
pMsg.tFlag = 0;
pMsg.Target = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8;
}
}
else
{
float v1 = 0;
if (gInterface.CheckWindow(Character))
v1 = *(float*)(0x00D24E88);
if ((pCursorX > 460 - v1))
{
pMsg.sFlag = 0;
pMsg.tFlag = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12;

}
else if (gInterface.CheckWindow(ExpandInventory) && pCursorX > 260 - v1)
{
pMsg.sFlag = 0;
pMsg.tFlag = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12 + 64;
if (pCursorY > 130)
pMsg.Source += 32;
}
pMsg.Target = 0;
}

gProtocol.DataSend ( ( BYTE* ) &pMsg, pMsg.h.size );
gPostItem.last_tickcount_moveitem_ = GetTickCount();
}
#endif

Agregar al final de "post_item.cpp"

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
void __declspec (naked) PostItem::Equipments() {
static DWORD mem = 0;
_asm {
mov eax, dword ptr ds : [ebp - 04]
mov mem, eax
}
RemoveEquipment((void *)mem);
_asm {
mov esp, ebp
pop ebp
ret 0004
}
}

void PostItem::RemoveEquipment(void * item_data) {
// check window, not allow for shop, inventory, warehouse, etc
if (gInterface.CheckWindow(Trade) ||
gInterface.CheckWindow(Warehouse) ||
gInterface.CheckWindow(Shop) ||
gInterface.CheckWindow(Store) ||
gInterface.CheckWindow(OtherStore) ||
gInterface.CheckWindow(CashShop) ||
gInterface.CheckWindow(ExpandWarehouse)) {
return;
}
if (GetKeyState(VK_RBUTTON) & 0x8000 && GetTickCount() >= gPostItem.last_tickcount_moveitem_ + 250)
{
ObjectItem * lItem = (ObjectItem*)item_data;

if (lItem->ItemID < 0) { return; }

PMSG_ITEM_MOVE_RECV pMsg = { 0 };

pMsg.h.set((LPBYTE)&pMsg, 0x79, 0x01, sizeof (pMsg));

pMsg.sFlag = 0;
pMsg.tFlag = 0;
pMsg.Source = lItem->PosX;
pMsg.Target = 0;

gProtocol.DataSend((BYTE*)&pMsg, pMsg.h.size);

gPostItem.last_tickcount_moveitem_ = GetTickCount();
}
}
#endif

"post_item.h"
Agregar debajo de "int PostItemColor;"

Code: [Select]
	//Click Derecho
#if(MOVE_ITEM)
static void Equipments();
static void RemoveEquipment(void * item_data);
#endif

Agregar debajo de "char * draw_character_head_chat_text_base_address_;"

Code: [Select]
	//Click Derecho
#if(MOVE_ITEM)
DWORD last_tickcount_moveitem_;
#endif

"Protocol.cpp"
Buscar "case 0xF3:" y agregar a dentro de este case:

Code: [Select]
				//Click Derecho
#if(MOVE_ITEM)
case 0xEE:
{
SetChaosBoxState((PMSG_SET_CHAOSBOX_STATE*)Data);
}
break;
#endif

Agregar al final de "Protocol.cpp"

Code: [Select]
//Click Derecho

#if(MOVE_ITEM)
void SetChaosBoxState(PMSG_SET_CHAOSBOX_STATE* Data){
pChaosBoxState = Data->state;
return;
}
#endif

"Protocol.h"
Buscar "struct PMSG_POSTITEM" y agregar debajo:

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
struct PMSG_ITEM_MOVE_RECV
{
//PBMSG_HEAD h;
PBMSG_HEAD2 h;
BYTE sFlag;
BYTE tFlag;
BYTE Source;
BYTE Target;
};

struct PMSG_SET_CHAOSBOX_STATE
{
//PBMSG_HEAD header; // C1:32
PBMSG_HEAD2 header; // C1:32
BYTE state;
};
#endif

Agregar al final de "Protocol.h":

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
void SetChaosBoxState(PMSG_SET_CHAOSBOX_STATE* Data);
#endif

Game Server

stdafx.h
Agregar al final:

Code: [Select]
//Click Derecho
#define MOVE_ITEM 1

Protocol.cpp
Agregar al final:

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
//BYTE InventoryCheckInsertItem(int aIndex, WORD item) // OK
BYTE InventoryCheckInsertItem(int aIndex, CItem item) // OK
{


//CItem item;
int w,h,iwidth,iheight;
BYTE blank = 0;

if(item.GetSize((int &)iwidth,(int &)iheight)==0)
{
LogAdd(lMsg.Get(527),__FILE__,__LINE__);
return -1;
}

        // Fix Click Derecho - No desequipar cosas con el inventario lleno
if (!CheckInventoryEmptySpace(&gObj[aIndex], iheight, iwidth))
{
return -1;
}

for(h = 0; h < MAX_INVENTORY_H; h++) //24
{
for(w = 0; w < 8; w++)
{
if(*(BYTE*)(gObj[aIndex].pInventoryMap+h*8+w) == 255)
{
blank = gObjInventoryRectCheck(aIndex,w,h,iwidth,iheight);

if(blank == 254)
{
goto GOTO_EndFunc;
}

if(blank != 255)
{
return blank;
}
}
}
}
GOTO_EndFunc:
return -1;
}

//bool IsLuckyItem(int item_num)
//{
// if( (item_num >= GET_ITEM(7,62) && item_num <= GET_ITEM(7,72))
// || (item_num >= GET_ITEM(8,62) && item_num <= GET_ITEM(8,72))
// || (item_num >= GET_ITEM(9,62) && item_num <= GET_ITEM(9,72))
// || (item_num >= GET_ITEM(10,62) && item_num <= GET_ITEM(10,72))
// || (item_num >= GET_ITEM(11,62) && item_num <= GET_ITEM(11,72))
// )
// {
// return true;
// }
// return false;
//}


void CGMoveItemProc(PMSG_MOVEITEM* aRecv, short aIndex)
{
int iwidth, iheight;

if (OBJMAX_RANGE(aIndex) == 0) { return; }


LPOBJ lpObj = &gObj[aIndex];

if (aRecv->Target == -1) { return; }


if (aRecv->tFlag == 3 && aRecv->sFlag == 0 && lpObj->pInventory[aRecv->Source].IsItem()) //check input item
{
//if (IsLuckyItem(lpObj->pInventory[aRecv->Source].m_Index))
if (g_LuckyItemManager.IsLuckyItemEquipment(lpObj->pInventory[aRecv->Source].m_Type))
{
return;
}

BYTE btItemType = 0;
btItemType |= (lpObj->pInventory[aRecv->Source].m_Type & 0x1E00) >> 5;

if ((btItemType + 2) == lpObj->pInventory[aRecv->Source].m_ItemOptionEx)
{
return;
}
}

//PMSG_ITEM_MOVE_RECV pMsg = { 0 };
PMSG_INVENTORYITEMMOVE pMsg = { 0 };

//pMsg.TargetSlot = -1;
pMsg.target_item_num = -1;

if (aRecv->tFlag == 3 && aRecv->sFlag == 0) //move Inv -> ChaosBox
{
                // Fix Click Derecho - No mover Fenrir azul/negro/dorado en la ChaosBox
if (!lpObj->pInventory[aRecv->Source].IsItem() || ((lpObj->pInventory[aRecv->Source].m_Type == ITEMGET(13,37)) && (lpObj->pInventory[aRecv->Source].m_NewOption > 0)))
return; //no item
int p = 0, c = 0, d = 0, w = 0, h = 0, n = 0;
int Target = -1;
int TargetMap[CHAOS_BOX_SIZE] = { '\0' };

for (n = 0; n < CHAOS_BOX_SIZE; n++)
{
if (lpObj->pChaosBox[n].IsItem())
{
CItem ItemInfo = lpObj->pChaosBox[n];

if(ItemInfo.GetSize((int&)w,(int&)h)==0)
{
LogAdd(lMsg.Get(527),__FILE__,__LINE__);
return;
}

for (c = 0; c < w; c++)
{
for (d = 0; d < h; d++)
{
p = c + d * 8 + n;
if (p < CHAOS_BOX_SIZE)
{
TargetMap[p] = 1;
}
}
}
}
}

for (n = 0; n < CHAOS_BOX_SIZE; n++)
{
if (!TargetMap[n])
{
Target = n;

CItem item = lpObj->pInventory[aRecv->Source];

if(item.GetSize((int&)w,(int&)h)==0)
{
LogAdd(lMsg.Get(527),__FILE__,__LINE__);
return;
}

for (c = 0; c < w; c++)
{
for (d = 0; d < h; d++)
{
p = c + d * 8 + n;
if (p >= CHAOS_BOX_SIZE || TargetMap[p] || (n % 8) + c > 7) //   8) = 8
                        {   
Target = -1;
}
}
}
if (Target != -1)
break;
}
}
if (Target != -1)
{
pMsg.target_item_num = Target;
ItemByteConvert(pMsg.sItemInfo, lpObj->pInventory[aRecv->Source]);
}
else
{
return; //no more empty slot to add.
}
}
else if (aRecv->tFlag == 0 && aRecv->sFlag == 3) //move ChaosBox -> Inv
{
if (!lpObj->pChaosBox[aRecv->Source].IsItem())
return; //no item

ItemByteConvert(pMsg.sItemInfo, lpObj->pChaosBox[aRecv->Source]);

int Target = InventoryCheckInsertItem(aIndex, lpObj->pChaosBox[aRecv->Source]);
//int Target = gObjInventoryInsertItem(aIndex, lpObj->pChaosBox[aRecv->Source]);

//if (Target == 0xFF)
if (Target == -1)
{
return;
}

pMsg.target_item_num = Target;
}
else if (aRecv->tFlag == 0 && aRecv->sFlag == 0) //equip/unequip item
{
if (!lpObj->pInventory[aRecv->Source].IsItem())
return;

ItemByteConvert(pMsg.sItemInfo, lpObj->pInventory[aRecv->Source]);

if (aRecv->Source > 11) { //wear equipment case
CItem ItemInfo = lpObj->pInventory[aRecv->Source];

LPITEM_ATTRIBUTE lpItemAttr = GetItemAttr(ItemInfo.m_Type);

//pMsg.target_item_num = ItemInfo.GetDetailItemType();
pMsg.target_item_num = lpItemAttr->ItemSlot;
if (pMsg.target_item_num == 0
&& lpObj->pInventory[0].IsItem() //slot 0 already has item
&& !lpObj->pInventory[1].IsItem() //slot 1 is empty
&& lpObj->pInventory[aRecv->Source].m_Type < ITEMGET(3, 0)) //sword,spear, maces item
pMsg.target_item_num = 1;
else if (pMsg.target_item_num == 10
&& lpObj->pInventory[10].IsItem() //slot 10 already has item
&& !lpObj->pInventory[11].IsItem()) //slot 11 empty
pMsg.target_item_num = 11;
else if (lpObj->pInventory[lpItemAttr->ItemSlot].IsItem()){
return; //already has item this slot

if (!gObjIsItemPut(lpObj, &ItemInfo, pMsg.target_item_num))
return;
}
}
else { //unequipment case
int Target = InventoryCheckInsertItem(aIndex, lpObj->pInventory[aRecv->Source]);
//int Target = gObjInventoryInsertItem(aIndex, lpObj->pInventory[aRecv->Source]);

//if (Target == 0xFF)
if (Target == -1)
{
return;
}

pMsg.target_item_num = Target;
}
}
else {
return; //invalid case
}

pMsg.sFlag = aRecv->sFlag;
pMsg.tFlag = aRecv->tFlag;
pMsg.source_item_num = aRecv->Source;

//this->CGItemMoveRecv(&pMsg, aIndex);
CGInventoryItemMove(&pMsg, aIndex);

if (aRecv->tFlag == 0 && aRecv->sFlag == 3)
{
GCUserChaosBoxSend(lpObj, 0);

//update chaosBox by new packet????
PMSG_SET_CHAOSBOX_STATE pMsg = { 0 };

pMsg.header.set((LPBYTE)&pMsg, 0xF3, 0xEE, sizeof(pMsg));

pMsg.state = 0; //0 = allow mix || 2 = disable mix

DataSend(aIndex, (LPBYTE)&pMsg, pMsg.header.size);
}
else if ((aRecv->tFlag == 3 && aRecv->sFlag == 0) || (aRecv->tFlag == 0 && aRecv->sFlag == 0))
{
if (!lpObj->pInventory[aRecv->Source].IsItem())
{
GCInventoryItemDeleteSend(aIndex, aRecv->Source, aRecv->sFlag);
}
}


return;
}
#endif

En Protocol.cpp buscar "GCPostItemProc((PMSG_POST_ITEM_RECV*)aRecv,aIndex);" y agregar debajo de su "break":

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
case 0x79:
CGMoveItemProc((PMSG_MOVEITEM*)aRecv, aIndex);
break;
#endif

Protocol.h
Buscar "void GCPostItemProc(PMSG_POST_ITEM_RECV* lpMsg, int aIndex );" y agregar a continuación:

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
struct PMSG_MOVEITEM
{
//PBMSG_HEAD h;
PBMSG_HEAD2 h;
BYTE sFlag;
BYTE tFlag;
BYTE Source;
BYTE Target;
};

struct PMSG_SET_CHAOSBOX_STATE
{
//PBMSG_HEAD header; // C1:32
PBMSG_HEAD2 header; // C1:32
BYTE state;
};
#endif

Buscar "void CGInventoryEquipment(_tagPMSG_REQ_INVENTORY_EQUIPMENT_ITEM * lpMsg, int iIndex);" y agregar a continuación:

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
void CGMoveItemProc(PMSG_MOVEITEM* aRecv, short aIndex);
//BYTE InventoryCheckInsertItem(int aIndex, WORD item);
BYTE InventoryCheckInsertItem(int aIndex, CItem item);
#endif

User.cpp
Dentro de la función "BOOL gObjIsItemPut(LPOBJ lpObj, CItem * lpItem, int pos )" buscar la línea de código "if(lpObj->Class == CLASS_DARKLORD)" y reemplazarlo por lo siguiente:

Code: [Select]
if(lpObj->Class == CLASS_DARKLORD)
{
if((lpItem->m_Type>>9) == 2)
{
if(lpItem->m_Part != pos)
{
return false;
}
}
// Fix Click Derecho - Solo escudos/cuervo en el DL como segunda arma
else if ((lpItem->m_Type != MuItem::miHELPER_DARK_RAVEN && lpItem->GetDetailItemType() != MuItemType::mitSHIELD) && pos == 1)
{
return false;
}
}

Dentro de la misma función "BOOL gObjIsItemPut(LPOBJ lpObj, CItem * lpItem, int pos )" buscar la condición "if(lpObj->Class == CLASS_WIZARD)" y reemplazar por:

Code: [Select]
if(lpObj->Class == CLASS_WIZARD)
{
if((lpItem->m_Type>>9) == 5)
{
if(lpItem->m_Part != pos)
{
return false;
}
}
// Fix Click Derecho - Solo escudos en el SM como segunda arma
else if (lpItem->GetDetailItemType() != MuItemType::mitSHIELD && pos == 1)
{
return false;
}
}

Buscar la linea "if(lpItem->m_Part != pos)" y agregar en la linea de arriba:

Code: [Select]
// Fix Click Derecho Armas RF
if(lpObj->Class == CLASS_MONK)
{
if(pos == 0 || pos == 1)
{
if(lpObj->pInventory[0].IsItem() == 1)
{
if ((lpItem->GetDetailItemType() == MuItemType::mitGloves) && (lpObj->pInventory[0].GetDetailItemType() != MuItemType::mitGloves) ||
(lpItem->GetDetailItemType() != MuItemType::mitGloves && lpObj->pInventory[0].GetDetailItemType() == MuItemType::mitGloves))
{
return false;
}
}
if(lpObj->pInventory[1].IsItem() == 1)
{
if ((lpItem->GetDetailItemType() == MuItemType::mitGloves) && (lpObj->pInventory[1].GetDetailItemType() != MuItemType::mitGloves) ||
(lpItem->GetDetailItemType() != MuItemType::mitGloves && lpObj->pInventory[1].GetDetailItemType() == MuItemType::mitGloves))
{
return false;
}
}
}
}

Seguimos en la función "BOOL gObjIsItemPut(LPOBJ lpObj, CItem * lpItem, int pos )", buscamos la línea "else if(lpItem->m_Type == ITEMGET(13,2))" y reemplazamos toda la condición por:

Code: [Select]
else if(lpItem->m_Type == ITEMGET(13,2))
{
// Fix Click Derecho - No equipar Uniria en Icarus
//if(lpObj->MapNumber == 7 || lpObj->Level < lpItem->m_RequireLevel)
if(lpObj->MapNumber == 7 || lpObj->MapNumber == 10 || lpObj->Level < lpItem->m_RequireLevel)
{
return false;
}
}

zzzitem.cpp

Dentro de la función "int CItem::GetDetailItemType()" hay que comprobar que todos los claw para RF están seteados aquí en el bloque de la condición if que tenga como "return" el valor "12":

Yo lo puse así, pero debéis incluir los valores de vuestros claw:
Code: [Select]
// Fix Click Derecho
//if( this->m_Type >= MuItem::miGROUP_SWORD_START+32 && this->m_Type <= MuItem::miGROUP_SWORD_START+35 )
if( (this->m_Type >= MuItem::miGROUP_SWORD_START+32 && this->m_Type <= MuItem::miGROUP_SWORD_START+35) ||
(this->m_Type >= MuItem::miGROUP_SWORD_START+40 && this->m_Type <= MuItem::miGROUP_SWORD_START+41) )
{
return MuItemType::mitGloves;
}

Espero que os ayude. :)

Hello, all this decoders are used for version 1.04D right?

Be kind, for everyone you meet is fighting their hard battle

Offline tilmur #243 Posteado: January 09, 2021, 08:02:40 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 11
  • Gracias recibida: 4
  • es
Hello, all this decoders are used for version 1.04D right?

Yes, I use this code with z-team files.


Offline KhongGianOL #244 Posteado: January 11, 2021, 01:57:18 AM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 246
  • Gracias recibida: 719
  • vn
Be kind, for everyone you meet is fighting their hard battle

Offline 1732313 #245 Posteado: January 11, 2021, 03:26:15 AM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 64
  • Gracias recibida: 4
  • ru

Offline KhongGianOL #246 Posteado: January 11, 2021, 10:20:29 AM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 246
  • Gracias recibida: 719
  • vn
SS4 MUEMU hay SS4 version ? or version IGCN, SCF....ZTEAM

Be kind, for everyone you meet is fighting their hard battle

Offline 1732313 #247 Posteado: January 11, 2021, 10:58:50 AM | Modificado: January 11, 2021, 11:01:17 AM by 1732313

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 64
  • Gracias recibida: 4
  • ru
SS4 MUEMU hay SS4 version ? or version IGCN, SCF....ZTEAM
Hello. MUEMU SS 4 plz need offsets.


Offline SaintZeus #248 Posteado: January 29, 2021, 10:20:25 AM | Modificado: January 29, 2021, 10:22:48 AM by SaintZeus

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 509
  • Gracias recibida: 3282
  • ar
Hay un problema, al tener el baul abierto y tener items en el baul expandido, si haces click derecho sobre donde apareceria el baul expandido, podes sacar los items:



Offline JavixFer #249 Posteado: January 31, 2021, 09:57:33 AM

  • +1 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 507
  • Gracias recibida: 4893
  • bo
Hay un problema, al tener el baul abierto y tener items en el baul expandido, si haces click derecho sobre donde apareceria el baul expandido, podes sacar los items:


Alguien tiene este fix?


Offline SaintZeus #250 Posteado: March 05, 2021, 10:29:51 PM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 509
  • Gracias recibida: 3282
  • ar
Hay un problema, al tener el baul abierto y tener items en el baul expandido, si haces click derecho sobre donde apareceria el baul expandido, podes sacar los items:


UP  tiros


Offline T-LEGENDARY #251 Posteado: March 13, 2021, 09:31:23 PM

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 764
  • Gracias recibida: 11898
  • br
PLEASE SOME ONE MAKE A CORRECT TUTORIAL TO  [ Right Click Mouse ] , HAVE A TAKUMI SOURCE BUT I DON'T KNOW WHERE IS , HELP IN PRIVATE SOME ONE PLASEEEEEEEEEEEEEEEEEE


Offline SaintZeus #252 Posteado: March 27, 2021, 06:10:20 PM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 509
  • Gracias recibida: 3282
  • ar
Hay un problema, al tener el baul abierto y tener items en el baul expandido, si haces click derecho sobre donde apareceria el baul expandido, podes sacar los items:


UP


Offline vcore30 #253 Posteado: April 24, 2021, 05:23:56 AM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 97
  • Gracias recibida: 906
  • ru
¿Alguien sabe el offset del pChaosBoxState para la 1.04d? El que está creo que es para la 1.04e...

#define pChaosBoxState *(BYTE*)(*(DWORD*)(0x98670C4) + 0xC8) <-- ?????

El offset está bien, pero tenía que cambiar algunas funciones para hacerlo funcionar correctamente.

Si tenéis 1.04D con z-team os posteo todo el código que estoy usando, con el fix de la Chaos Machine, el fix de las armas en DL/RF, el fix para no equipar/desequipar alas o Uniria en Icarus y el fix para que no desaparezcan items si desequipáis algo con el inventario lleno.

Voy a seguir el mismo esquema que dejó @Llalex para que quede más ordenado:

Main

stdafx.h
Agregar al final:

Code: [Select]
//Click Derecho
#define MOVE_ITEM 1

Import.h
Agregar al final:

Code: [Select]
//Click Derecho
#define pChaosBoxState *(BYTE*)(*(DWORD*)(0x98670C4) + 0xC8)

post_item.cpp
Buscar "PostItem::PostItem ()" y agregar debajo de "Hook();"

Code: [Select]
	//Click Derecho
#if(MOVE_ITEM)
last_tickcount_moveitem_ = 0;
#endif

Buscar "void PostItem::Hook()" y agregar al final dentro de la función:

Code: [Select]
	//Click Derecho
#if(MOVE_ITEM)
SetOp((LPVOID)(0x0083B7E4), (LPVOID)Equipments, ASM::JMP); //1.04D->0x0083B7E4 1.04E -> 0x0083B7E4 + 0x150
#endif

Buscar "void PostItem::PostItemToWorldChatChannelImp" y reemplazarla en su totalidad:
Code: [Select]
void PostItem::PostItemToWorldChatChannelImp ( void * item_data ) {
    // check window, not allow for shop, inventory, warehouse, etc
    if ( gInterface.CheckWindow ( Trade ) ||
            gInterface.CheckWindow ( Warehouse ) ||
            gInterface.CheckWindow ( Shop ) ||
            gInterface.CheckWindow ( Store ) ||
            gInterface.CheckWindow ( OtherStore ) ||
            gInterface.CheckWindow ( CashShop ) ||
            gInterface.CheckWindow ( ExpandWarehouse ) )
{
        return;
    }

    if ( GetTickCount() <= gPostItem.last_tickcount_post_ + 3000 )
{
return;
}

    if ( GetKeyState ( VK_RBUTTON ) & 0x8000 && GetKeyState ( VK_CONTROL ) & 0x8000 )
{
        PMSG_POSTITEM iMsg = { '\0' };
        strcpy_s ( iMsg.chatmsg, ( char* ) pCurrentViewingItemName );
        memcpy_s ( &iMsg.chatid[0], 10, ( char* ) oUserObjectStruct_, 10 );
        memcpy_s ( &iMsg.item_data[0], 107, item_data, 107 );
        iMsg.h.set( ( BYTE* )&iMsg, 0x78, sizeof ( iMsg ) );
        gProtocol.DataSend ( ( BYTE* ) &iMsg, iMsg.h.size );
        gPostItem.last_tickcount_post_ = GetTickCount();
    }
//Click Derecho
#if(MOVE_ITEM)
else if (GetKeyState(VK_RBUTTON) & 0x8000 && GetTickCount() >= gPostItem.last_tickcount_moveitem_ + 250)
{
ObjectItem * lItem = (ObjectItem*)item_data;

if (lItem->ItemID < 0) { return; }

PMSG_ITEM_MOVE_RECV pMsg = { 0 };

pMsg.h.set( ( BYTE* )&pMsg, 0x79, 0x01, sizeof ( pMsg ) );
pMsg.Target = -1;

if (gInterface.CheckWindow(ChaosBox) && gInterface.CheckWindow(Inventory))
{
if ((pCursorX > 460))
{
pMsg.sFlag = 0;
pMsg.tFlag = 3;
pMsg.Target = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12;
}
else if (gInterface.CheckWindow(ExpandInventory) && pCursorX > 260)
{
pMsg.sFlag = 0;
pMsg.tFlag = 3;
pMsg.Target = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12 + 64;
if (pCursorY > 130)
pMsg.Source += 32;
}
else {
pMsg.sFlag = 3;
pMsg.tFlag = 0;
pMsg.Target = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8;
}
}
else
{
float v1 = 0;
if (gInterface.CheckWindow(Character))
v1 = *(float*)(0x00D24E88);
if ((pCursorX > 460 - v1))
{
pMsg.sFlag = 0;
pMsg.tFlag = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12;

}
else if (gInterface.CheckWindow(ExpandInventory) && pCursorX > 260 - v1)
{
pMsg.sFlag = 0;
pMsg.tFlag = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12 + 64;
if (pCursorY > 130)
pMsg.Source += 32;
}
pMsg.Target = 0;
}

gProtocol.DataSend ( ( BYTE* ) &pMsg, pMsg.h.size );
gPostItem.last_tickcount_moveitem_ = GetTickCount();
}
#endif

Agregar al final de "post_item.cpp"

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
void __declspec (naked) PostItem::Equipments() {
static DWORD mem = 0;
_asm {
mov eax, dword ptr ds : [ebp - 04]
mov mem, eax
}
RemoveEquipment((void *)mem);
_asm {
mov esp, ebp
pop ebp
ret 0004
}
}

void PostItem::RemoveEquipment(void * item_data) {
// check window, not allow for shop, inventory, warehouse, etc
if (gInterface.CheckWindow(Trade) ||
gInterface.CheckWindow(Warehouse) ||
gInterface.CheckWindow(Shop) ||
gInterface.CheckWindow(Store) ||
gInterface.CheckWindow(OtherStore) ||
gInterface.CheckWindow(CashShop) ||
gInterface.CheckWindow(ExpandWarehouse)) {
return;
}
if (GetKeyState(VK_RBUTTON) & 0x8000 && GetTickCount() >= gPostItem.last_tickcount_moveitem_ + 250)
{
ObjectItem * lItem = (ObjectItem*)item_data;

if (lItem->ItemID < 0) { return; }

PMSG_ITEM_MOVE_RECV pMsg = { 0 };

pMsg.h.set((LPBYTE)&pMsg, 0x79, 0x01, sizeof (pMsg));

pMsg.sFlag = 0;
pMsg.tFlag = 0;
pMsg.Source = lItem->PosX;
pMsg.Target = 0;

gProtocol.DataSend((BYTE*)&pMsg, pMsg.h.size);

gPostItem.last_tickcount_moveitem_ = GetTickCount();
}
}
#endif

"post_item.h"
Agregar debajo de "int PostItemColor;"

Code: [Select]
	//Click Derecho
#if(MOVE_ITEM)
static void Equipments();
static void RemoveEquipment(void * item_data);
#endif

Agregar debajo de "char * draw_character_head_chat_text_base_address_;"

Code: [Select]
	//Click Derecho
#if(MOVE_ITEM)
DWORD last_tickcount_moveitem_;
#endif

"Protocol.cpp"
Buscar "case 0xF3:" y agregar a dentro de este case:

Code: [Select]
				//Click Derecho
#if(MOVE_ITEM)
case 0xEE:
{
SetChaosBoxState((PMSG_SET_CHAOSBOX_STATE*)Data);
}
break;
#endif

Agregar al final de "Protocol.cpp"

Code: [Select]
//Click Derecho

#if(MOVE_ITEM)
void SetChaosBoxState(PMSG_SET_CHAOSBOX_STATE* Data){
pChaosBoxState = Data->state;
return;
}
#endif

"Protocol.h"
Buscar "struct PMSG_POSTITEM" y agregar debajo:

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
struct PMSG_ITEM_MOVE_RECV
{
//PBMSG_HEAD h;
PBMSG_HEAD2 h;
BYTE sFlag;
BYTE tFlag;
BYTE Source;
BYTE Target;
};

struct PMSG_SET_CHAOSBOX_STATE
{
//PBMSG_HEAD header; // C1:32
PBMSG_HEAD2 header; // C1:32
BYTE state;
};
#endif

Agregar al final de "Protocol.h":

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
void SetChaosBoxState(PMSG_SET_CHAOSBOX_STATE* Data);
#endif

Game Server

stdafx.h
Agregar al final:

Code: [Select]
//Click Derecho
#define MOVE_ITEM 1

Protocol.cpp
Agregar al final:

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
//BYTE InventoryCheckInsertItem(int aIndex, WORD item) // OK
BYTE InventoryCheckInsertItem(int aIndex, CItem item) // OK
{


//CItem item;
int w,h,iwidth,iheight;
BYTE blank = 0;

if(item.GetSize((int &)iwidth,(int &)iheight)==0)
{
LogAdd(lMsg.Get(527),__FILE__,__LINE__);
return -1;
}

        // Fix Click Derecho - No desequipar cosas con el inventario lleno
if (!CheckInventoryEmptySpace(&gObj[aIndex], iheight, iwidth))
{
return -1;
}

for(h = 0; h < MAX_INVENTORY_H; h++) //24
{
for(w = 0; w < 8; w++)
{
if(*(BYTE*)(gObj[aIndex].pInventoryMap+h*8+w) == 255)
{
blank = gObjInventoryRectCheck(aIndex,w,h,iwidth,iheight);

if(blank == 254)
{
goto GOTO_EndFunc;
}

if(blank != 255)
{
return blank;
}
}
}
}
GOTO_EndFunc:
return -1;
}

//bool IsLuckyItem(int item_num)
//{
// if( (item_num >= GET_ITEM(7,62) && item_num <= GET_ITEM(7,72))
// || (item_num >= GET_ITEM(8,62) && item_num <= GET_ITEM(8,72))
// || (item_num >= GET_ITEM(9,62) && item_num <= GET_ITEM(9,72))
// || (item_num >= GET_ITEM(10,62) && item_num <= GET_ITEM(10,72))
// || (item_num >= GET_ITEM(11,62) && item_num <= GET_ITEM(11,72))
// )
// {
// return true;
// }
// return false;
//}


void CGMoveItemProc(PMSG_MOVEITEM* aRecv, short aIndex)
{
int iwidth, iheight;

if (OBJMAX_RANGE(aIndex) == 0) { return; }


LPOBJ lpObj = &gObj[aIndex];

if (aRecv->Target == -1) { return; }


if (aRecv->tFlag == 3 && aRecv->sFlag == 0 && lpObj->pInventory[aRecv->Source].IsItem()) //check input item
{
//if (IsLuckyItem(lpObj->pInventory[aRecv->Source].m_Index))
if (g_LuckyItemManager.IsLuckyItemEquipment(lpObj->pInventory[aRecv->Source].m_Type))
{
return;
}

BYTE btItemType = 0;
btItemType |= (lpObj->pInventory[aRecv->Source].m_Type & 0x1E00) >> 5;

if ((btItemType + 2) == lpObj->pInventory[aRecv->Source].m_ItemOptionEx)
{
return;
}
}

//PMSG_ITEM_MOVE_RECV pMsg = { 0 };
PMSG_INVENTORYITEMMOVE pMsg = { 0 };

//pMsg.TargetSlot = -1;
pMsg.target_item_num = -1;

if (aRecv->tFlag == 3 && aRecv->sFlag == 0) //move Inv -> ChaosBox
{
                // Fix Click Derecho - No mover Fenrir azul/negro/dorado en la ChaosBox
if (!lpObj->pInventory[aRecv->Source].IsItem() || ((lpObj->pInventory[aRecv->Source].m_Type == ITEMGET(13,37)) && (lpObj->pInventory[aRecv->Source].m_NewOption > 0)))
return; //no item
int p = 0, c = 0, d = 0, w = 0, h = 0, n = 0;
int Target = -1;
int TargetMap[CHAOS_BOX_SIZE] = { '\0' };

for (n = 0; n < CHAOS_BOX_SIZE; n++)
{
if (lpObj->pChaosBox[n].IsItem())
{
CItem ItemInfo = lpObj->pChaosBox[n];

if(ItemInfo.GetSize((int&)w,(int&)h)==0)
{
LogAdd(lMsg.Get(527),__FILE__,__LINE__);
return;
}

for (c = 0; c < w; c++)
{
for (d = 0; d < h; d++)
{
p = c + d * 8 + n;
if (p < CHAOS_BOX_SIZE)
{
TargetMap[p] = 1;
}
}
}
}
}

for (n = 0; n < CHAOS_BOX_SIZE; n++)
{
if (!TargetMap[n])
{
Target = n;

CItem item = lpObj->pInventory[aRecv->Source];

if(item.GetSize((int&)w,(int&)h)==0)
{
LogAdd(lMsg.Get(527),__FILE__,__LINE__);
return;
}

for (c = 0; c < w; c++)
{
for (d = 0; d < h; d++)
{
p = c + d * 8 + n;
if (p >= CHAOS_BOX_SIZE || TargetMap[p] || (n % 8) + c > 7) //   8) = 8
                        {   
Target = -1;
}
}
}
if (Target != -1)
break;
}
}
if (Target != -1)
{
pMsg.target_item_num = Target;
ItemByteConvert(pMsg.sItemInfo, lpObj->pInventory[aRecv->Source]);
}
else
{
return; //no more empty slot to add.
}
}
else if (aRecv->tFlag == 0 && aRecv->sFlag == 3) //move ChaosBox -> Inv
{
if (!lpObj->pChaosBox[aRecv->Source].IsItem())
return; //no item

ItemByteConvert(pMsg.sItemInfo, lpObj->pChaosBox[aRecv->Source]);

int Target = InventoryCheckInsertItem(aIndex, lpObj->pChaosBox[aRecv->Source]);
//int Target = gObjInventoryInsertItem(aIndex, lpObj->pChaosBox[aRecv->Source]);

//if (Target == 0xFF)
if (Target == -1)
{
return;
}

pMsg.target_item_num = Target;
}
else if (aRecv->tFlag == 0 && aRecv->sFlag == 0) //equip/unequip item
{
if (!lpObj->pInventory[aRecv->Source].IsItem())
return;

ItemByteConvert(pMsg.sItemInfo, lpObj->pInventory[aRecv->Source]);

if (aRecv->Source > 11) { //wear equipment case
CItem ItemInfo = lpObj->pInventory[aRecv->Source];

LPITEM_ATTRIBUTE lpItemAttr = GetItemAttr(ItemInfo.m_Type);

//pMsg.target_item_num = ItemInfo.GetDetailItemType();
pMsg.target_item_num = lpItemAttr->ItemSlot;
if (pMsg.target_item_num == 0
&& lpObj->pInventory[0].IsItem() //slot 0 already has item
&& !lpObj->pInventory[1].IsItem() //slot 1 is empty
&& lpObj->pInventory[aRecv->Source].m_Type < ITEMGET(3, 0)) //sword,spear, maces item
pMsg.target_item_num = 1;
else if (pMsg.target_item_num == 10
&& lpObj->pInventory[10].IsItem() //slot 10 already has item
&& !lpObj->pInventory[11].IsItem()) //slot 11 empty
pMsg.target_item_num = 11;
else if (lpObj->pInventory[lpItemAttr->ItemSlot].IsItem()){
return; //already has item this slot

if (!gObjIsItemPut(lpObj, &ItemInfo, pMsg.target_item_num))
return;
}
}
else { //unequipment case
int Target = InventoryCheckInsertItem(aIndex, lpObj->pInventory[aRecv->Source]);
//int Target = gObjInventoryInsertItem(aIndex, lpObj->pInventory[aRecv->Source]);

//if (Target == 0xFF)
if (Target == -1)
{
return;
}

pMsg.target_item_num = Target;
}
}
else {
return; //invalid case
}

pMsg.sFlag = aRecv->sFlag;
pMsg.tFlag = aRecv->tFlag;
pMsg.source_item_num = aRecv->Source;

//this->CGItemMoveRecv(&pMsg, aIndex);
CGInventoryItemMove(&pMsg, aIndex);

if (aRecv->tFlag == 0 && aRecv->sFlag == 3)
{
GCUserChaosBoxSend(lpObj, 0);

//update chaosBox by new packet????
PMSG_SET_CHAOSBOX_STATE pMsg = { 0 };

pMsg.header.set((LPBYTE)&pMsg, 0xF3, 0xEE, sizeof(pMsg));

pMsg.state = 0; //0 = allow mix || 2 = disable mix

DataSend(aIndex, (LPBYTE)&pMsg, pMsg.header.size);
}
else if ((aRecv->tFlag == 3 && aRecv->sFlag == 0) || (aRecv->tFlag == 0 && aRecv->sFlag == 0))
{
if (!lpObj->pInventory[aRecv->Source].IsItem())
{
GCInventoryItemDeleteSend(aIndex, aRecv->Source, aRecv->sFlag);
}
}


return;
}
#endif

En Protocol.cpp buscar "GCPostItemProc((PMSG_POST_ITEM_RECV*)aRecv,aIndex);" y agregar debajo de su "break":

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
case 0x79:
CGMoveItemProc((PMSG_MOVEITEM*)aRecv, aIndex);
break;
#endif

Protocol.h
Buscar "void GCPostItemProc(PMSG_POST_ITEM_RECV* lpMsg, int aIndex );" y agregar a continuación:

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
struct PMSG_MOVEITEM
{
//PBMSG_HEAD h;
PBMSG_HEAD2 h;
BYTE sFlag;
BYTE tFlag;
BYTE Source;
BYTE Target;
};

struct PMSG_SET_CHAOSBOX_STATE
{
//PBMSG_HEAD header; // C1:32
PBMSG_HEAD2 header; // C1:32
BYTE state;
};
#endif

Buscar "void CGInventoryEquipment(_tagPMSG_REQ_INVENTORY_EQUIPMENT_ITEM * lpMsg, int iIndex);" y agregar a continuación:

Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
void CGMoveItemProc(PMSG_MOVEITEM* aRecv, short aIndex);
//BYTE InventoryCheckInsertItem(int aIndex, WORD item);
BYTE InventoryCheckInsertItem(int aIndex, CItem item);
#endif

User.cpp
Dentro de la función "BOOL gObjIsItemPut(LPOBJ lpObj, CItem * lpItem, int pos )" buscar la línea de código "if(lpObj->Class == CLASS_DARKLORD)" y reemplazarlo por lo siguiente:

Code: [Select]
if(lpObj->Class == CLASS_DARKLORD)
{
if((lpItem->m_Type>>9) == 2)
{
if(lpItem->m_Part != pos)
{
return false;
}
}
// Fix Click Derecho - Solo escudos/cuervo en el DL como segunda arma
else if ((lpItem->m_Type != MuItem::miHELPER_DARK_RAVEN && lpItem->GetDetailItemType() != MuItemType::mitSHIELD) && pos == 1)
{
return false;
}
}

Dentro de la misma función "BOOL gObjIsItemPut(LPOBJ lpObj, CItem * lpItem, int pos )" buscar la condición "if(lpObj->Class == CLASS_WIZARD)" y reemplazar por:

Code: [Select]
if(lpObj->Class == CLASS_WIZARD)
{
if((lpItem->m_Type>>9) == 5)
{
if(lpItem->m_Part != pos)
{
return false;
}
}
// Fix Click Derecho - Solo escudos en el SM como segunda arma
else if (lpItem->GetDetailItemType() != MuItemType::mitSHIELD && pos == 1)
{
return false;
}
}

Buscar la linea "if(lpItem->m_Part != pos)" y agregar en la linea de arriba:

Code: [Select]
// Fix Click Derecho Armas RF
if(lpObj->Class == CLASS_MONK)
{
if(pos == 0 || pos == 1)
{
if(lpObj->pInventory[0].IsItem() == 1)
{
if ((lpItem->GetDetailItemType() == MuItemType::mitGloves) && (lpObj->pInventory[0].GetDetailItemType() != MuItemType::mitGloves) ||
(lpItem->GetDetailItemType() != MuItemType::mitGloves && lpObj->pInventory[0].GetDetailItemType() == MuItemType::mitGloves))
{
return false;
}
}
if(lpObj->pInventory[1].IsItem() == 1)
{
if ((lpItem->GetDetailItemType() == MuItemType::mitGloves) && (lpObj->pInventory[1].GetDetailItemType() != MuItemType::mitGloves) ||
(lpItem->GetDetailItemType() != MuItemType::mitGloves && lpObj->pInventory[1].GetDetailItemType() == MuItemType::mitGloves))
{
return false;
}
}
}
}

Seguimos en la función "BOOL gObjIsItemPut(LPOBJ lpObj, CItem * lpItem, int pos )", buscamos la línea "else if(lpItem->m_Type == ITEMGET(13,2))" y reemplazamos toda la condición por:

Code: [Select]
else if(lpItem->m_Type == ITEMGET(13,2))
{
// Fix Click Derecho - No equipar Uniria en Icarus
//if(lpObj->MapNumber == 7 || lpObj->Level < lpItem->m_RequireLevel)
if(lpObj->MapNumber == 7 || lpObj->MapNumber == 10 || lpObj->Level < lpItem->m_RequireLevel)
{
return false;
}
}

zzzitem.cpp

Dentro de la función "int CItem::GetDetailItemType()" hay que comprobar que todos los claw para RF están seteados aquí en el bloque de la condición if que tenga como "return" el valor "12":

Yo lo puse así, pero debéis incluir los valores de vuestros claw:
Code: [Select]
// Fix Click Derecho
//if( this->m_Type >= MuItem::miGROUP_SWORD_START+32 && this->m_Type <= MuItem::miGROUP_SWORD_START+35 )
if( (this->m_Type >= MuItem::miGROUP_SWORD_START+32 && this->m_Type <= MuItem::miGROUP_SWORD_START+35) ||
(this->m_Type >= MuItem::miGROUP_SWORD_START+40 && this->m_Type <= MuItem::miGROUP_SWORD_START+41) )
{
return MuItemType::mitGloves;
}

Espero que os ayude. :)


Hello. How can I add this code to GS ExTeam ??
i don't have in  Protocol.cpp      GCPostItemProc((PMSG_POST_ITEM_RECV*)aRecv,aIndex);

and case 0xF3

I only have code like this in Protocol.cpp

Code: [Select]
#if(CUSTOM_POSTITEM)
struct SDHP_POSTITEMINFO {
    struct PBMSG_HEAD h;
    unsigned short ServerCode;
    char Name[11];
    char Chat[60];
    char ItemData[107];
};

struct PMSG_POSTITEM {
    PBMSG_HEAD h;
    char chatid[10];    //  3
    char chatmsg[90];   //  D
    char item_data[107];
};

void SCFPostItemSend ( int aIndex, PMSG_POSTITEM* PostItem ) {
    SDHP_POSTITEMINFO pResult = { 0 };
    memcpy ( &pResult.Name[0], &PostItem->chatid[0], 10 );
    memcpy ( &pResult.Chat[0], &PostItem->chatmsg[0], 90 );
    memcpy ( &pResult.ItemData[0], &PostItem->item_data[0], 107 );
    pResult.ServerCode = gGameServerCode;
    pResult.h.set ( ( LPBYTE ) &pResult, 0x78, sizeof ( pResult ) );
DataSend (aIndex, (LPBYTE) &pResult, pResult.h.size );
}

void pPostItemProc ( PMSG_POSTITEM* aRecv, short aIndex ) {
    if ( OBJMAX_RANGE ( aIndex ) == 0 ) { return; }

    LPOBJ lpObj = &gObj[aIndex];
    int slen = strlen ( aRecv->chatmsg );

    if ( slen < 1 || slen > ( MAX_CHAT_LEN - 1 ) ) { return; }

PMSG_POSTITEM pMessage;
memcpy(pMessage.chatid, aRecv->chatid, 10);
memcpy(pMessage.chatmsg, aRecv->chatmsg, 90);
memcpy(pMessage.item_data, aRecv->item_data, 107);
pMessage.h.set((LPBYTE)&pMessage, 0x78, sizeof(PMSG_POSTITEM));
DataSendAll((LPBYTE)&pMessage, pMessage.h.size);
}
#endif


Offline KhongGianOL #254 Posteado: May 03, 2021, 12:40:02 PM | Modificado: May 03, 2021, 12:41:45 PM by KhongGianOL

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 246
  • Gracias recibida: 719
  • vn
For the scfmt version (specifically, I used the 3-in-1 source code of pravednik shared on tuservermu), an error like this appeared:

1. When wearing a panda transformation ring or any other transformation ring, the character carrying a weapon disappears and when he chooses to re-character, select the transformation ring. Client exits, GS notes TRACE: error. .. means the control structure when you STRUST function to it in the source code of CLient to GS heterogeneous ...

2 ... Selecting any item outside the character's equipment will exit the client (exiting main.exe) causes STRUST as in case 1.



Please right-click source code correctly for 1.04D

Be kind, for everyone you meet is fighting their hard battle

Offline KhongGianOL #255 Posteado: May 03, 2021, 12:54:10 PM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 246
  • Gracias recibida: 719
  • vn
@Llalex : Please share use 1.04D on source pravednik 3 in 1

Be kind, for everyone you meet is fighting their hard battle

Offline vcore30 #256 Posteado: January 21, 2022, 07:41:33 AM | Modificado: January 21, 2022, 07:45:19 AM by vcore30

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 97
  • Gracias recibida: 906
  • ru
Help me guys. I am not an expert in programming.   I am adding the code as expected but the client is sending invalid data.


pMsg.sFlag = 0;     the data is correct
pMsg.tFlag = 0;     the data is correct
pMsg.Target = 0;   the data is correct

pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12;  data is not correct

 
Code: [Select]
gConsole.Output(cGREEN, "ChaosBox:    sFlag %d tFlag %d Target %d PosX %d PosY %d Source %d ",eMsg.sFlag,eMsg.tFlag,eMsg.Target,lItem->PosX,lItem->PosY,eMsg.Source);

i logged the data to the console    and this is what i get

PosX 0    PosY -1   Source 4 and 68

this is not correct data does not change no matter where in the inventory I click on the item

I would like to know how cell coordinates are written in     lItem->PosX  and   lItem->PosY


 
Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
else if (GetKeyState(VK_RBUTTON) & 0x8000 && GetTickCount() >= gPostItem.last_tickcount_moveitem_ + 250)
{
ObjectItem * lItem = (ObjectItem*)item_data;

if (lItem->ItemID < 0) { return; }

PMSG_ITEM_MOVE_RECV pMsg = { 0 };

pMsg.h.set( ( BYTE* )&pMsg, 0x79, 0x01, sizeof ( pMsg ) );
pMsg.Target = -1;

if (gInterface.CheckWindow(ChaosBox) && gInterface.CheckWindow(Inventory))
{
if ((pCursorX > 460))
{
pMsg.sFlag = 0;
pMsg.tFlag = 3;
pMsg.Target = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12;
}
else if (gInterface.CheckWindow(ExpandInventory) && pCursorX > 260)
{
pMsg.sFlag = 0;
pMsg.tFlag = 3;
pMsg.Target = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12 + 64;
if (pCursorY > 130)
pMsg.Source += 32;
}
else {
pMsg.sFlag = 3;
pMsg.tFlag = 0;
pMsg.Target = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8;
}
}
else
{
float v1 = 0;
if (gInterface.CheckWindow(Character))
v1 = *(float*)(0x00D24E88);
if ((pCursorX > 460 - v1))
{
pMsg.sFlag = 0;
pMsg.tFlag = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12;

}
else if (gInterface.CheckWindow(ExpandInventory) && pCursorX > 260 - v1)
{
pMsg.sFlag = 0;
pMsg.tFlag = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12 + 64;
if (pCursorY > 130)
pMsg.Source += 32;
}
pMsg.Target = 0;
}

gProtocol.DataSend ( ( BYTE* ) &pMsg, pMsg.h.size );
gPostItem.last_tickcount_moveitem_ = GetTickCount();
}
#endif


Offline LTP Team #257 Posteado: January 21, 2022, 08:15:19 AM

  • C++ Coder
  • 0 puntos por ventas
  • *
  • *
  • Rank: Liga mayor
  • Posts: 196
  • Gracias recibida: 3888
  • ru
Help me guys. I am not an expert in programming.   I am adding the code as expected but the client is sending invalid data.


pMsg.sFlag = 0;     the data is correct
pMsg.tFlag = 0;     the data is correct
pMsg.Target = 0;   the data is correct

pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12;  data is not correct

 
Code: [Select]
gConsole.Output(cGREEN, "ChaosBox:    sFlag %d tFlag %d Target %d PosX %d PosY %d Source %d ",eMsg.sFlag,eMsg.tFlag,eMsg.Target,lItem->PosX,lItem->PosY,eMsg.Source);

i logged the data to the console    and this is what i get

PosX 0    PosY -1   Source 4 and 68

this is not correct data does not change no matter where in the inventory I click on the item

I would like to know how cell coordinates are written in     lItem->PosX  and   lItem->PosY


 
Code: [Select]
//Click Derecho
#if(MOVE_ITEM)
else if (GetKeyState(VK_RBUTTON) & 0x8000 && GetTickCount() >= gPostItem.last_tickcount_moveitem_ + 250)
{
ObjectItem * lItem = (ObjectItem*)item_data;

if (lItem->ItemID < 0) { return; }

PMSG_ITEM_MOVE_RECV pMsg = { 0 };

pMsg.h.set( ( BYTE* )&pMsg, 0x79, 0x01, sizeof ( pMsg ) );
pMsg.Target = -1;

if (gInterface.CheckWindow(ChaosBox) && gInterface.CheckWindow(Inventory))
{
if ((pCursorX > 460))
{
pMsg.sFlag = 0;
pMsg.tFlag = 3;
pMsg.Target = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12;
}
else if (gInterface.CheckWindow(ExpandInventory) && pCursorX > 260)
{
pMsg.sFlag = 0;
pMsg.tFlag = 3;
pMsg.Target = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12 + 64;
if (pCursorY > 130)
pMsg.Source += 32;
}
else {
pMsg.sFlag = 3;
pMsg.tFlag = 0;
pMsg.Target = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8;
}
}
else
{
float v1 = 0;
if (gInterface.CheckWindow(Character))
v1 = *(float*)(0x00D24E88);
if ((pCursorX > 460 - v1))
{
pMsg.sFlag = 0;
pMsg.tFlag = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12;

}
else if (gInterface.CheckWindow(ExpandInventory) && pCursorX > 260 - v1)
{
pMsg.sFlag = 0;
pMsg.tFlag = 0;
pMsg.Source = lItem->PosX + lItem->PosY * 8 + 12 + 64;
if (pCursorY > 130)
pMsg.Source += 32;
}
pMsg.Target = 0;
}

gProtocol.DataSend ( ( BYTE* ) &pMsg, pMsg.h.size );
gPostItem.last_tickcount_moveitem_ = GetTickCount();
}
#endif

Maybe your ObjectItem struct is wrong


Offline vcore30 #258 Posteado: January 21, 2022, 09:11:56 AM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 97
  • Gracias recibida: 906
  • ru
Maybe your ObjectItem struct is wrong

I don't know if the structure is correct. I can't figure out where the values ​​in char PosX come from; charPosY;
I did not find a single piece of code that would write values ​​to these variables.

https://prnt.sc/26gxuca


Offline LTP Team #259 Posteado: January 21, 2022, 11:36:21 AM

  • C++ Coder
  • 0 puntos por ventas
  • *
  • *
  • Rank: Liga mayor
  • Posts: 196
  • Gracias recibida: 3888
  • ru
Maybe your ObjectItem struct is wrong

I don't know if the structure is correct. I can't figure out where the values ​​in char PosX come from; charPosY;
I did not find a single piece of code that would write values ​​to these variables.

https://prnt.sc/26gxuca

Writing to variables goes in main.exe
Запись в переменные идет в самом main.exe


Offline vcore30 #260 Posteado: January 21, 2022, 12:56:33 PM | Modificado: January 21, 2022, 01:00:56 PM by vcore30

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 97
  • Gracias recibida: 906
  • ru
Maybe your ObjectItem struct is wrong

I don't know if the structure is correct. I can't figure out where the values ​​in char PosX come from; charPosY;
I did not find a single piece of code that would write values ​​to these variables.

https://prnt.sc/26gxuca

Writing to variables goes in main.exe
Запись в переменные идет в самом main.exe

https://prnt.sc/26h135z

Added these lines from other sources now everything works.
Could you explain a little to me how main writes values ​​to these variables?.
I want to understand this and understand how it works.

Не могли бы вы мне немого объяснить как main записывает значения в эти переменные?.
Я хочу в этом разобраться и понимать как это работает.


Offline santiagolp3 #261 Posteado: May 14, 2022, 12:26:29 AM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 36
  • Gracias recibida: 6
  • pe
servira para season 8¿?


Offline SaintZeus #262 Posteado: July 04, 2022, 10:49:52 AM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 509
  • Gracias recibida: 3282
  • ar
Hay un problema, al tener el baul abierto y tener items en el baul expandido, si haces click derecho sobre donde apareceria el baul expandido, podes sacar los items:


Nadie logro reparar esto?


Offline nofeara #263 Posteado: July 16, 2022, 02:10:20 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 7
  • Gracias recibida: 1
  • ph
Hey can someone help add this on base muemu source file?..


Offline nofeara #264 Posteado: August 01, 2022, 12:04:39 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 7
  • Gracias recibida: 1
  • ph
Hey can someone help add this on base muemu source file?..

Many shared resources are already available.

but this source use louis not base there are required files that you can't find in base.


Offline spartacus #265 Posteado: August 04, 2022, 08:07:05 AM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 265
  • Gracias recibida: 127
  • cl
Es necesario tener custom postitem para usar esto?


Offline liron003 #266 Posteado: August 13, 2022, 11:56:21 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 5
  • Gracias recibida: 3
  • gb
get main close when i click on item on the chaos machine to the inventory any idea why ?


Offline T-LEGENDARY #267 Posteado: September 04, 2022, 10:16:05 AM | Modificado: September 04, 2022, 11:56:08 AM by T-LEGENDARY

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 764
  • Gracias recibida: 11898
  • br
Holas Gente El anticlick funciona perfecto pero hay un problemita que me pasa exactamente con el DarkLork
cuando presiono anticlik para ponerme el otro spcecter se pone en el otro lado solo me pasa con el anticlick aca un video informativo como lo soluciono Gracias noce si les pasa lo mismo :D  please

 


Alguien me ayuda.. !
 please



i have same problem some one help us  @Pyke


Offline sanlp #268 Posteado: January 05, 2023, 12:35:59 AM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 62
  • Gracias recibida: 10
  • ar
Alguien obtuvo los offsets para el season 4?


Offline dakosmu #269 Posteado: April 26, 2023, 10:14:24 PM

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 786
  • Gracias recibida: 12210
  • ve
@onlinezajzaj @comelon666 Up here is the guide

cuando sostienes el item con botón derecho... y lo llevas a un item que esta colocado y presionas botón izquierdo... el item se desaparece


puedes ayudarme

Dakosmu Colaborador

Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
19 Replies
5207 Views
Last post April 08, 2021, 01:45:40 AM
by xtestx
10 Replies
3155 Views
Last post December 23, 2020, 11:11:55 PM
by Ketamine
0 Replies
1031 Views
Last post October 18, 2022, 10:41:43 AM
by ziza
1 Replies
1451 Views
Last post February 02, 2023, 01:32:54 AM
by takumi12
4 Replies
1233 Views
Last post June 27, 2023, 11:01:18 PM
by crazyyXXTT