ok use what you learned from inserting /buyitem, this is the same thing, so im just posting the function that goes into EQLib_Commands.cpp
WHEN you have it compiled and mq is running first thing you need to do is remove your alias for sell... /alias /sell delete then this command will start working...
and NO its not possible to dupe with this code, please do not post about the stack of shit you got if you misuse it by selling more of an item than u have. (but If you do figure out a way to trick it, PM me :) )
Code: Select all
[color=green]// ***************************************************************************
// Function: sellitem
// Description: Our '/sellitem' command
// Usage: /sellitem Quantity#
// uses private: void __thiscall CMerchantWnd::RequestSellItem(int)
// will buy the specified quantity of the currently selected item
// ***************************************************************************[/color]
VOID SellItem(PSPAWNINFO pChar, PCHAR szLine)
{
bRunNextCommand = FALSE;
DWORD MerchTraderWnd = *EQADDR_CLASSMERCHWND;
PEQWINDOW pMerchWnd = (PEQWINDOW)*EQADDR_CLASSMERCHWND;
CHAR szBuffer[MAX_STRING] = {0};
CHAR szQty[MAX_STRING] = {0};
PCHARINFO pCharInfo = NULL;
DWORD Qty;
DebugSpew("/sellitem : yes the command works at least to this point");
if (!MerchTraderWnd || !cmdSellItem) return;
if (NULL == (pCharInfo = GetCharInfo())) return;
GetArg(szQty,szLine,1);
Qty = (DWORD)atoi(szQty);
if (Qty > 20 || Qty < 1) return;
__asm {
push ecx;
mov ecx, dword ptr [MerchTraderWnd];
push Qty;
call dword ptr [cmdSellItem];
pop ecx;
}
return;
}
offset in eqgame.ini under function locations is:

o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received

donations for this month's patches.
Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.