NOT Roster related, looking for Auctioneer display.

Here you can find plenty of help with your general coding needs and projects
If it is about a specific program, use the corresponding forum
DO NOT ask basic questions such as "How do I print a variable", use Google for that

Re: NOT Roster related, looking for Auctioneer display.

Postby rodrick » Thu Mar 15, 2007 2:24 am

for anyone working on this here is some procedural code that parses my auctioneer file correctly, now you'll have to call the DB and such yourself but it'll get you going. (only had 30 min or so to mess around with it).

Code: Select all
<?
define('ROSTER_INSTALLED', true);
include('./luaparser.php');
If ($data = ParseLuaFile('./Auctioneer.lua'))
{
   unset($data['AuctionConfig']);
   unset($data['AuctioneerSnapshotDB']);
   unset($data['AuctioneerFixedPriceDB']);
   unset($data['AuctioneerTransactionDB']);
   unset($data['AuctioneerItemDB']['version']);
   unset($data['AuctioneerItemDB']['auctionItemSubClasses']);
   unset($data['AuctioneerItemDB']['textures']);
   unset($data['AuctioneerItemDB']['auctionItemClasses']);
   unset($data['AuctioneerItemDB']['inventoryTypes']);
   foreach ($data['AuctioneerHistoryDB'] as $realm => $x)
   {
      if ($realm != 'altar of storms-horde')
      {
         unset($data['AuctioneerHistoryDB']["$realm"]);
      }
   }
   //parse each item
   foreach ($data['AuctioneerHistoryDB']['altar of storms-horde']['buyoutPrices'] as $id => $history)
   {
      $values = explode(':', $history);
      foreach ($values as &$amount)
      {
         $amount2 = explode('x', $amount);
         if ($amount2[0] != $amount)
         {
            $amount = $amount2[0] / $amount2[1];
         }
      }
      sort($values);
      $num = count($values);
      if ($num%2 == 0)
      {
         $middle = $num/2;
         $market = ($values[$middle] + $values[$middle - 1]) / 2;
      }
      else
      {
         $market = $values[$num/2];
      }
      $gold = floor($market / 10000);
      $silver = floor(($market - $gold * 10000) / 100);
      $copper = floor($market - $gold * 10000 - $silver * 100);
      $itemdb = explode(';', $data['AuctioneerItemDB']['items'][$id]);
      $name = $itemdb[0];
      echo $name . ' => Market value = ' . $gold . 'g ' . $silver . 's ' . $copper . 'c<br />';
   }
}
else
{
   echo "error opening file";
}
?>


NOTE: This only parses the history and has the realm and faction hardcoded.
Last edited by rodrick on Thu Mar 15, 2007 2:25 am, edited 1 time in total.
rodrick
WR.net Apprentice
WR.net Apprentice
 
Posts: 3
Joined: Tue Mar 13, 2007 8:24 am

NOT Roster related, looking for Auctioneer display.

Postby Foxy » Tue Apr 03, 2007 5:38 pm

I've been thinking about this a little lately and to tell you the truth I don't see a need for it...

In the past when I started my Offline Auction House Check Price System there was a need for a database of average prices and what not... Now it's been over done by many others and to tell you the truth, I have to give credit to WoW Econ for their site and keeping the searches free.

Perhaps someone can contact them and see about developing a roster addon that parses the search string from their site into a search addon for the roster?

Never the less the project imo would be a waste of time.
Foxy
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 111
Joined: Tue Aug 22, 2006 9:49 am

Re: NOT Roster related, looking for Auctioneer display.

Postby sabot7726 » Tue Jul 03, 2007 2:27 pm

How about the ability to upload an auctioneer.lua and simply have it add up the total value of stuff in the guildbank. Let's do that instead of a full blown offline AH :)
sabot7726
WR.net Apprentice
WR.net Apprentice
 
Posts: 5
Joined: Thu Jun 21, 2007 4:03 pm

Previous

Return to General Code Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron