Page 2 of 4

Posted: Wed Aug 25, 2004 5:13 pm
by El
Those are diff format outputs. For example,

Code: Select all

   case Text: 
      GetCXStr(pWnd->WindowText,DataTypeTemp,MAX_STRING); 
      Dest.Ptr=&DataTypeTemp[0]; 
      Dest.Type=pStringType; 
      return true; 
+   case NewText: 
+      strcpy(pWnd->WindowText->Text,Index); 
+      GetCXStr(pWnd->WindowText,DataTypeTemp,MAX_STRING); 
+      Dest.Ptr=&DataTypeTemp[0]; 
+      Dest.Type=pStringType; 
+      return true; 
   case Tooltip: 
      GetCXStr(pWnd->Tooltip,DataTypeTemp,MAX_STRING); 
      Dest.Ptr=&DataTypeTemp[0]; 
      Dest.Type=pStringType; 
      return true;
means add the lines that are marked with "+". Don't add the plus itself, just those specific lines. "-" means delete that line. Any other lines, not marked with + or - are for context only.

As for the macro.. I ran it once to see what changed. I noticed that it doesn't take my own initial prices into account when averaging. i.e. if you have 3 items priced at 5000, 4500, and 1800 where my price is the 5000, it will set the new price to 1799. Personally, I would make sure that my price was added into the figuring, and set the price at slightly less than 4500 instead of 1799.

Also, I think you need to weight the number of a specific item for sale. For example, I had over 400 small pieces of acrylia for sale at 55p. Two other people had about 150 each for sale at 58 and 56p. There were a group of people with 1-10 pieces for sale at prices ranging from 20-50p. It set my price to 39p. I really don't care about the people with 1-10 pieces for sale, just the ones with large quantities.

Finally, I had a case where it marked an item to 0. I had 400 bone chips for sale at 2p. Prices ranged anywhere from 5gp to 5p, with the majority of traders with smaller quantities at 1p. Myself and another with larger stocks were at 2p. It marked mine at 0p... the lower price-1p.

Actually, just the piece that marks the stuff for sale that's under vendor price would be awesome. Have it go through the bazaar and let me know of any stupid deals. :-)

Posted: Thu Aug 26, 2004 1:27 am
by El
Very odd.... I just had this price a black pearl for 1000000p. Now, I'm amenable to the profit, but it seemed odd :-) Looking at what was for sale in the bazaar at that time, searching on black pearl, there were plenty of items with that as part of their name, but only 1 other seller with a black pearl for sale -- for 10p. Nothing about any of the other items seemed out of the ordinary. Just something to note.

Posted: Fri Aug 27, 2004 12:10 pm
by Process
I feel like a complete moron, but I still can't seem to get it right. I've replaced all the areas of the MQ2DataTypes.h and MQ2DataTypes.cpp files with the designated alterations. However, everytime I go to compile it, I get syntax errors like crazy. There must be some aspect to altering the file that I'm not getting.

Can someone possibly post the exact code with the correct syntax for the alterations required? I know it's asking a lot, but I have tried so many variations and can't get it to work.

I have taken out the " + " signs, I have removed the lines with the " - " signs. I have left them in, I have done everything imaginable. I'm sure it's some simple syntax error like an extra space or something probably, but I can't seem to figure it out.

If someone can help out a n00b, I'd appreciate it. This macro would save me so much time.

Thanks,

Process

Posted: Fri Aug 27, 2004 2:24 pm
by El
Without the error messages, it's difficult to tell what's wrong.

Posted: Sat Aug 28, 2004 12:57 am
by Process
I can post the error messages, but it would literally be pages long. There are hundreds of syntax errors all related to those two files.

Here is the code I have for those sections, maybe someone can tell me what I'm doing wrong:

MQ2DataTypes.h:

Code: Select all

List=23,
		Checked=24,
		Style=25,
		Enabled=26,
		Highlighted=27,
		Name=28,
		ScreenID=29,
		Type=30,
        Items=31, 
        NewText=32 
   }; 
... 
      TypeMember(Items); 
+      TypeMember(NewText);//32 
    };
	MQ2WindowType():MQ2Type("window")
	{
		TypeMember(Open);
		TypeMember(Child);
		TypeMember(VScrollMax);
		TypeMember(VScrollPos);
		TypeMember(VScrollPct);
		TypeMember(HScrollMax);
And MQ2DataTypes.cpp:

Code: Select all

	case BGColor:
		Dest.Argb=pWnd->BGColor;
		Dest.Type=pArgbType;
		return true;
   case Text: 
      GetCXStr(pWnd->WindowText,DataTypeTemp,MAX_STRING); 
      Dest.Ptr=&DataTypeTemp[0]; 
      Dest.Type=pStringType; 
      return true; 
   case NewText: 
      strcpy(pWnd->WindowText->Text,Index); 
      GetCXStr(pWnd->WindowText,DataTypeTemp,MAX_STRING); 
      Dest.Ptr=&DataTypeTemp[0]; 
      Dest.Type=pStringType; 
      return true; 
   case Tooltip: 
      GetCXStr(pWnd->Tooltip,DataTypeTemp,MAX_STRING); 
      Dest.Ptr=&DataTypeTemp[0]; 
      Dest.Type=pStringType; 
      return true; 
Those are the sections of the 2 files the way I have them editted. Does anyone see what I'm doing wrong?

Thanks again,

Process

Posted: Sat Aug 28, 2004 8:34 am
by Sparr
post the first error (not warning, ERROR) and the 3 lines above and below it in the compiler output.

Posted: Sat Aug 28, 2004 10:21 am
by Hamner
ok look in MQ2DataTypes.cpp for the below section.

Code: Select all

	case Text:
		GetCXStr(pWnd->WindowText,DataTypeTemp,MAX_STRING);
		Dest.Ptr=&DataTypeTemp[0];
		Dest.Type=pStringType;
		return true;
	case Tooltip:
		GetCXStr(pWnd->Tooltip,DataTypeTemp,MAX_STRING);
		Dest.Ptr=&DataTypeTemp[0];
		Dest.Type=pStringType;
		return true;
and insert

Code: Select all

   case NewText: 
      strcpy(pWnd->WindowText->Text,Index); 
      GetCXStr(pWnd->WindowText,DataTypeTemp,MAX_STRING); 
      Dest.Ptr=&DataTypeTemp[0]; 
      Dest.Type=pStringType; 
      return true;
Make it look like this

Code: Select all

	case Text:
		GetCXStr(pWnd->WindowText,DataTypeTemp,MAX_STRING);
		Dest.Ptr=&DataTypeTemp[0];
		Dest.Type=pStringType;
		return true;
	case NewText: 
		strcpy(pWnd->WindowText->Text,Index); 
		GetCXStr(pWnd->WindowText,DataTypeTemp,MAX_STRING); 
		Dest.Ptr=&DataTypeTemp[0]; 
		Dest.Type=pStringType; 
		return true;
	case Tooltip:
		GetCXStr(pWnd->Tooltip,DataTypeTemp,MAX_STRING);
		Dest.Ptr=&DataTypeTemp[0];
		Dest.Type=pStringType;
		return true;
In other words, strip the plus (+) and add it between. Do you see now? You have to do that to all that they said to. Search for and remove the code they have marked with a minus (-) That's about as simple as it can get and not do it for you.

Posted: Sat Aug 28, 2004 2:00 pm
by El
Lose the "+" in front of the line in MQDataTypes.h.

Posted: Mon Aug 30, 2004 8:04 am
by Ketamine
Here is the error I get:

No such 'window' member 'NewText'
bazaar.mac@181 (Main):/call NullSub
${Window[QuanityWnd].Child[QTYW_SliderInput].NewTextp[${targetprice}]}

Posted: Mon Aug 30, 2004 3:04 pm
by Sparr

Code: Select all

        NewText=32
   };
...
      TypeMember(Items);
+      TypeMember(NewText);//32
    };
   MQ2WindowType():MQ2Type("window")
   {
      TypeMember(Open);
^^ all wrong. the ... means "figure out where to put this", and the + is a line to be added, WITHOUT THE PLUS.

Posted: Tue Aug 31, 2004 11:49 am
by Ketamine
Any idea why I am getting that errror message that I am getting that I posted above? :(

Posted: Fri Sep 17, 2004 9:56 am
by El
Ketamine wrote:Any idea why I am getting that errror message that I am getting that I posted above? :(
Yes, it's because you haven't added in the code changes to MQ2 that are in the original post and recompiled.

wow

Posted: Sun Oct 17, 2004 11:26 pm
by Chatwiththisname
Followed your directions, worked great, I'm such a pud so I added a loop to the macro so it updates constantly :-X yes effectively this could be disassterous, but thats a chance i'm willing to take :-D

Only 1 problem, my spider venom is updating to 1000000 plat, oh well wasnt selling at 1cp anyway :-D

how to loop

Posted: Sun Oct 17, 2004 11:47 pm
by Chatwiththisname
ok, I figured i'd share my information with everyone about the loop, I understand that not everyone knows how to take peices from one code and put it into another, this is in fact my first time, yes theorectically this loop could cause problems, but for those of you who actually read all the posts yall would understand the coding is simi safeguarded against said loop, this is what I did

I merely added the line :boogers
to the top of the macro below the /delcare's here is my example

/declare newtargetprice int local

|open the trader window
:OpenTraderAgain
/trader
/delay 10s ${Window[BazaarWnd].Open}
/if (!${Window[BazaarWnd].Open}) /goto :OpenTraderAgain
:boogers
|open the bazaar search window
:OpenBazaarAgain
/bazaar
/delay 10s ${Window[BazaarSearchWnd].Open}
/if (!${Window[BazaarSearchWnd].Open}) /goto :OpenBazaarAgain

this is my marker, now I simply went down to the bottom of the macro before the end of the macro and put the line /goto :boogers
here again is my example

/notify QuantityWnd QTYW_SliderInput enter
/delay 1
/notify BazaarWnd BZW_SetPrice_Button leftmouseup
/delay 1
/goto :nextslot
:donewithslots
/goto :boogers
/return

Sub NullSub
/return

This cause's it to loop, there is a delay after it gets to the end of your items, its the same delay you get when you type the /macro baz (or whatever you named it) before it starts updating

now in order for this to work you have to have read the origional post by the arthor of this thread and the macro, Boogers is copyrighted by nose and all its associates by fakelaws of MyWorldOwnzj00

Posted: Tue Oct 19, 2004 9:28 am
by rugood2
Hey guys! Great work on the macro. It was working for me for a long time doing some great things yet, I am suddenly getting an error when I run it in game. Here is the error:

No such 'window' member 'New Text'
bazaar.mac@180(main):/call Nullsub
$window[QuantityWnd].child[Qty_SliderInput].NewText[${Targetprice}]}

any ideas of what I f_cked up ? haha