lo tengo agregado debajo de esto alguien puede ayudarme
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 );
DataSend ( ( BYTE* ) &iMsg, iMsg.h.size );
gPostItem.last_tickcount_post_ = GetTickCount();
}
#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(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;
}
DataSend((BYTE*)&pMsg, pMsg.h.size);
gPostItem.last_tickcount_moveitem_ = GetTickCount();
}
#endif
si te sirve asi lo deje yo...
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' };
iMsg.h.set(0x78,sizeof(iMsg));
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 );
DataSend((BYTE*) &iMsg,iMsg.h.size);
//iMsg.header.set ( ( LPBYTE ) &iMsg, 0x78, sizeof ( iMsg ) );
//DataSend ( ( LPBYTE ) &iMsg, iMsg.header.size );
gPostItem.last_tickcount_post_ = GetTickCount();
}
#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(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;
}
DataSend((BYTE*)&pMsg, pMsg.h.size);
gPostItem.last_tickcount_moveitem_ = GetTickCount();
}
}
#endif
al final
#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(0x79, 0x01, sizeof(pMsg));
pMsg.sFlag = 0;
pMsg.tFlag = 0;
pMsg.Source = lItem->PosX;
pMsg.Target = 0;
DataSend((BYTE*)&pMsg, pMsg.h.size);
gPostItem.last_tickcount_moveitem_ = GetTickCount();
}
}
#endif