Page 2 of 2

Posted: Tue Jul 15, 2003 9:32 pm
by EqMule
I finally managed to get all in by placing the commands between macro and endmacro in the commandlist...

Code: Select all

{"/macro",		"Macro"},
		[b]{"/selectitem",	"SelectItem"},
		{"/buyitem",	"BuyItem"},[/b]
		{"/memspell",	"MemSpell"},
		{"/loadspells",	"LoadSpells"},
		{"/endmacro",	"EndMacro"},
and I set my project->settings->Link-Output->Base address for eqlib to 0x03000000

now it finally works... hope you solve it. Im using VS 6.0 btw, in VS NET the base address is allready set to 0x030000000 in the proj file...

Posted: Tue Jul 15, 2003 11:12 pm
by Kint
pwn, thank you eqmule, it works great now.

Posted: Wed Jul 16, 2003 5:06 am
by dont_know_at_all
Fixed the right way in CVS and on the downloads page.

Remove or comment out this line:
{"/gotoxy", "GotoXY"},

As-of-yet-unimplemented functions turn into list ending entries since the function is NULL. Quite a bitch to find...

/SellItem here we go...

Posted: Sat Jul 19, 2003 11:31 pm
by EqMule
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:

Code: Select all

sellitem=004e8d17

Posted: Thu Sep 04, 2003 2:37 pm
by Draekz
Hmm quick question! Not sure if this is directly implemented yet, but if not, is it up to date? or will it work with latest release? noticed last post date was july 20th so just wondered whats going on with this :)

I just need a working /sellitem command or something to sell unstackable items (fine steel for example).

Anyway, thanks for any info regarding this!

Take care

Draekz

Posted: Thu Sep 04, 2003 3:04 pm
by EqMule
uhm, I think this has been in since the end of july... it works fine after patch as well, just need to check you are running the latest zip/cvs...

the command works as follows
1. /selectitem "something" sefl
2. /sellitem 1

or /sellitem 20 or whatever if you want to sell more than 1 item from a stack...