Issues with Bazaar.mac

Joined
Jun 7, 2007
Messages
816
Reaction score
3
Points
18
Anyone using the Bazaar.mac from VIP section in MacroQuest ???

It was working fine up until the new patch, and seems to be crashing when it is getting to the "/next result" call in the Trader section . . . when attempting to loop through the ${Bazaar.Count}


Specific section that crashing me:

Code:
   /for result 1 to ${Bazaar.Count}
      /if (${Bazaar.Item[${result}].Name.Equal[${itemname}]}&&!${Me.Name.Equal[${Bazaar.Item[${result}].Trader.Name}]}) {
         /varcalc itemsfound ${itemsfound}+${Bazaar.Item[${result}].Quantity}
         /varcalc pricetotal ${pricetotal}+${Bazaar.Item[${result}].Price}*${Bazaar.Item[${result}].Quantity}
         /if (${Bazaar.Item[${result}].Price}<${minprice}) /varset minprice ${Bazaar.Item[${result}].Price}
         /if (${Bazaar.Item[${result}].Price}>${maxprice}) /varset maxprice ${Bazaar.Item[${result}].Price}
      }
   /next result

As soon as it gets to the /next result line, bammo . . . CTD

Was something changed in the 4-18-2008 game patch that is messing this up?

I've run the macro flawlessly for 3 years... up until this last patch, and never altered it since i started using it.
 
anything over 200 found you CTD thats with and without MQ2 vanilla so its on SOE's side.
 
Update

anything over 200 found you CTD thats with and without MQ2 vanilla so its on SOE's side.

Actually, the issue you were refering to ... CTD when result is greater than 200 ... is no t related to this issue in the slightest ... That issue was corrected in the plugin itself... it was a memory overflow issue.. that has been fixed.

I have just been informed by DevNull of MQ2 site that the reason it is crashing.. is that the code is trying to get the spawn ID data of the trader.name ... and if it can't get the spawn data it will crash... And it is crashing BECASUE of the data send info changes SOE made to the zones. If the trader is not in range of me ( 650 radius ) ... i cant get the spawn ID data.. and that is why its CTD.

Here is the exact quote from devnul:

devNull wrote:

Trader.Name will not work if the other PC is not in range since it's trying to get the Spawn from the ID. Wait until next patch when they send all PC data again and/or devs come out with a permanent solution to get the Trader Name (it's in the data packet now even when the PC is not in range but if that's used, will not be a Spawn type anymore).

Wed Apr 23, 2008 5:54 am

It never occured to me that the trader.name return back was obviously dependant upon being able to return spawn data information from the zone, and that the spawn data info changes SOE made ( in regards to what is sent to the client based upon proximity ) would be the culprit for my crashing.

Feels allot better knowing WHY its happening.... now if we can only get a perm fix.. cause I doubt SOE gonna go back to sending all the spawn data info back to the client for the whole zone.

UPDATE:
Someone suggested in the MQ2 thread for the Bazaar.mac that it would not crash me if i stand dead center in the trader area (at the center pillar next to the portal ) ... this way i would be as close to having all the traders within my 650 arc as possible ... well.. it works... definately the culprit .... And i rececked this by having one of the traders in the resultset slighly out of the 650 range.. the other one well within... and when i get to the person who out of the 650 range.. that triggers the crash.

Fells damn good to have an answer to this.. it was driving me bonkers.


After some digging... I have a viable solution for this issue ( at least for the macro ):

Instead of this:

/if (${Bazaar.Item[${result}].Name.Equal[${itemname}]}&&!${Me.Name.Equal[${Bazaar.Item[${result}].Trader.Name}]}) {



I am now using this to get the trader name (direct pull from the text returned from the window itself, and not a trader.name call ... old line is LIME.. ew line that replaces it is RED)

/for result 1 to ${Bazaar.Count}

/if (${Bazaar.Item[${result}].Name.Equal[${itemname}]}&&!${Me.Name.Equal[${Window[BazaarSearchWnd].Child[BZR_ItemList].List[${result},3]}]}) {

/varcalc itemsfound ${itemsfound}+${Bazaar.Item[${result}].Quantity}
/varcalc pricetotal ${pricetotal}+${Bazaar.Item[${result}].Price}*${Bazaar.Item[${result}].Quantity}
/if (${Bazaar.Item[${result}].Price}<${minprice}) /varset minprice ${Bazaar.Item[${result}].Price}
/if (${Bazaar.Item[${result}].Price}>${maxprice}) /varset maxprice ${Bazaar.Item[${result}].Price}
}
/next result

If you have Mq2 forum VIP access, here is the complete code:
http://macroquest2.com/phpBB2/viewtopic.php?t=13132&start=75

Glad this one was solved.
 
Last edited:
i just stand in the middle of the bazaar section and it updates fine. only crashes if im in the selling areas.
 
i just stand in the middle of the bazaar section and it updates fine. only crashes if im in the selling areas.

Yeah ... i tried that.. but its better to have a perm solution in the code than a manual work around.... the changes i made now enable it to work again no matter what