• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Needs Repaired -- Bazaar Mac. (1 Viewer)

iceman_001

New member
Joined
Jan 11, 2006
RedCents
The following code worked before patch, I tried everything I know I am capable of can anyone repair this: (Red Cent will be given)


|update.mac
|Auto-Update Bazaar Prices
|
|Original by Sparr
|
|Updated by M.D. - 2/2/06
|
|Updates the prices of your trader items to compete with other prices found via /bazaar
|Must have a price set for the items you wish to update otherwise they will be skipped

Sub Main
/declare slot int local
/declare dupecheck int local
/declare itemname string local
/declare result int local
/declare stddev int local
/declare itemsfound int local
/declare pricetotal int local
/declare avgprice int local
/declare minprice int local
/declare avgdev int local
/declare devhigh int local
/declare quartprice int local
/declare maxprice int local
/declare price int local
/declare fairprice int local
/declare targetprice int local
/declare newtargetprice int local
/declare PlatVal int local
/declare targetstr string local

/echo Starting Auto-update...

:OpenTraderAgain
/trader
/delay 1s ${Window[BazaarWnd].Open}
/if (!${Window[BazaarWnd].Open}) /goto :OpenTraderAgain

:OpenBazaarAgain
/bazaar
/delay 2s ${Window[BazaarSearchWnd].Open}
/if (!${Window[BazaarSearchWnd].Open}) /goto :OpenBazaarAgain

/notify BazaarSearchWnd BZR_UpdatePlayerButton leftmouseup
/delay 2s

/varset slot -1
:nextslot
/varcalc slot ${slot}+1
/if (${slot}>79) /goto :donewithslots
/notify BZW_BazaarSlotsWnd BZR_BazaarSlot${slot} leftmouseup
/if (!${Window[BazaarWnd].Child[BZW_SetPrice_Button].Enabled}) /goto :nextslot
/if (!${Window[BazaarWnd].Child[BZW_Clear_Button].Enabled}) /goto :nextslot
/varset itemname ${Window[BZW_BazaarSlotsWnd].Child[BZR_BazaarSlot${slot}].Tooltip}

:SearchBazaarAgain
/bzsrch race any class any stat any slot any type any price 0 9999999 ${itemname}
/delay 5s ${Bazaar.Done}
/if (!${Bazaar.Done}) /goto :SearchBazaarAgain
/if (!${Bazaar.Count}) /goto :nextslot

/varset itemsfound 0
/varset pricetotal 0
/varset minprice 9999999
/varset maxprice 0
/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
/if (!${itemsfound}) /goto :nextslot
/varset avgprice ${Math.Calc[${pricetotal}/${itemsfound}/1000].Int}
/varset minprice ${Math.Calc[${minprice}/1000].Int}
/varset maxprice ${Math.Calc[${maxprice}/1000].Int}
/varset stddev 0
/varset avgdev 0
/for result 1 to ${Bazaar.Count}
/if (${Bazaar.Item[${result}].Name.Equal[${itemname}]}&&!${Me.Name.Equal[${Bazaar.Item[${result}].Trader.Name}]}) {
/varcalc stddev ${stddev}+((${Math.Calc[${Bazaar.Item[${result}].Price}/1000].Int}-${avgprice})^2)*${Bazaar.Item[${result}].Quantity}
/varcalc avgdev ${avgdev}+${Math.Abs[${Bazaar.Item[${result}].Price}-${avgprice}*1000]}*${Bazaar.Item[${result}].Quantity}
}
/next result
/varset stddev ${Math.Calc[(${stddev}/${itemsfound})^.5]}
/varset avgdev ${Math.Calc[${avgdev}/${itemsfound}/1000].Int}

/varcalc quartprice (${avgprice}+${minprice})/2
/varset fairprice 9999999
/for result 1 to ${Bazaar.Count}
/if (${Bazaar.Item[${result}].Name.Equal[${itemname}]}&&!${Me.Name.Equal[${Bazaar.Item[${result}].Trader.Name}]}) {
/if (${Math.Calc[${Bazaar.Item[${result}].Price}/1000].Int}>=${quartprice}&&${Math.Calc[${Bazaar.Item[${result}].Price}/1000].Int}<${fairprice}) /varset fairprice ${Math.Calc[${Bazaar.Item[${result}].Price}/1000].Int}
}
/next result

/if (${itemsfound}<15) {
/varset targetprice ${Math.Calc[${avgprice}-${stddev}]}
/varset targetprice ${If[${targetprice}<${minprice},${minprice},${targetprice}]}
} else {
/varset targetprice ${fairprice}
}
/varcalc targetprice ${targetprice}-1

/if (${targetprice}<${Math.Calc[${SelectedItem.Value}/1050]}) {
/echo Underpriced Goods! ${itemname} for ${minprice}pp value:${Math.Calc[${SelectedItem.Value}/1050]} etc:(${avgprice},${targetprice},${stddev},${itemsfound})
/varset targetprice ${Math.Calc[${SelectedItem.Value}/1000].Int}
}

/varset newtargetprice 9999999
/for result 1 to ${Bazaar.Count}
/if (${Bazaar.Item[${result}].Name.Equal[${itemname}]}&&!${Me.Name.Equal[${Bazaar.Item[${result}].Trader.Name}]}) {
/if (${Math.Calc[${Bazaar.Item[${result}].Price}/1000].Int}>${targetprice}&&${Math.Calc[${Bazaar.Item[${result}].Price}/1000].Int}<${newtargetprice}) /varset newtargetprice ${Math.Calc[${Bazaar.Item[${result}].Price}/1000].Int}
}
/next result
/if (${newtargetprice}>1000) {
/varcalc targetprice ${newtargetprice}-50
} else {
/varcalc targetprice ${newtargetprice}-5
}
/if (${targetprice}<=0) /varset targetprice 1

/varset targetstr ${targetprice}

/if (${targetprice}<${Window[BazaarWnd].Child[BZW_Money0].Text}) {
/echo Repricing ${itemname} from ${Window[BazaarWnd].Child[BZW_Money0].Text} to ${targetprice}
:openqtywndagain
/notify BazaarWnd BZW_Money0 leftmouseup
/delay 2s
/if (!${Window[QuantityWnd].Open}) /goto :openqtywndagain
/delay 1
/keypress backspace chat
/keypress backspace chat
/keypress backspace chat
/keypress backspace chat
/keypress backspace chat
/keypress backspace chat
/keypress backspace chat
/keypress backspace chat
/delay 1
/for PlatVal 1 to 7
/squelch /keypress ${targetstr.Mid[${PlatVal},1]} chat
/next PlatVal
/notify QuantityWnd QTYW_Accept_Button leftmouseup
/delay 1
/notify BazaarWnd BZW_SetPrice_Button leftmouseup
/delay 1
}
/goto :nextslot
:donewithslots
/end
/return
 
Hummmm I wonder if you remove "Happy face" and "Sad face" from the mac if it would work better?


OOO sorry could not resist, just had to say that!!!!

Lady_Of_Old
/giggling back to work
 
Needs Repaired -- Bazaar Mac.

Users who are viewing this thread

Back
Top