Introducing ArmorySync

Sync Blizzards' Armory data with WoWRoster (addon depreciated no longer works see ApiSync)

Moderators: Ulminia, poetter

Introducing ArmorySync

Postby Leifthrasil » Sat Apr 21, 2007 5:45 pm

I don't know if anybody already mentioned this, but for Exalted faction 999/1000 the parsing is broken. You need to change the boundary in "function getRepValue($value)" and "getRepCap($value)" in the functions.general.php from 42999 to 43000. Otherwise max rep (which is 42999) won't show.

Code: Select all
function getRepValue($value) {
   $value = abs($value);
   
   if ($value >= 42000 && $value < 43000) { $value -= 42000; } //<-- was 42999 (now 43000)
   elseif ($value >= 21000 && $value < 42000) { $value -= 21000; }
   elseif ($value >= 9000 && $value < 21000) { $value -= 9000;  }
   elseif ($value >= 3000 && $value < 9000) { $value -= 3000; }
   elseif ($value >= -3000 && $value < 3000) { $value -= 0;  }
   elseif ($value >= -6000 && $value < -3000) { $value -= 3000; }
   elseif ($value >= -42000 && $value < -6000) { $value -= 6000; }
   
   return $value;
}

function getRepCap($value) {
   if ($value >= 42000 && $value < 43000) { return 1000; } //<-- was 42999 (now 43000)
   if ($value >= 21000 && $value < 42000) { return 21000; }
   if ($value >= 9000 && $value < 21000) { return 12000; }
   if ($value >= 3000 && $value < 9000) { return 6000; }
   if ($value >= -6000 && $value < 3000) { return 3000; }
   if ($value >= -42000 && $value < -6000) { return 36000; }
   
   return 0;
}
Last edited by Leifthrasil on Sat Apr 21, 2007 5:45 pm, edited 1 time in total.
Image
User avatar
Leifthrasil
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Thu Jul 06, 2006 4:19 pm

Introducing ArmorySync

Postby Vanterax » Sat Apr 21, 2007 8:31 pm

Correct Leif. You also need to make the same change to getRepStanding() as well.

I hope everything that's been suggested in this long thread will be compiled into a new version or Armory Sync. :) There's a lot to read.
Vanterax
WR.net Apprentice
WR.net Apprentice
 
Posts: 66
Joined: Wed Dec 13, 2006 6:58 am

Introducing ArmorySync

Postby kaleyn » Sun Apr 22, 2007 4:35 pm

Well, I'm not very savvy when it comes to reading through PHP and figuring out what the code is doing, so I may be very wrong in how I'm interpreting this, but here is what I did:

All of this is from index.php

Code: Select all
for ($i=0$i<=5$i++)
    {
    
$playername=$players[$i];
    echo 
$playername;
    
synchPlayer(null$playername);
    }
 


A very simple FOR statement to limit the number of players it feeds into the synchplayer function.

Then I tried changed the SQL query to try and make it so that it only grabs those names that haven't been updated in the last 24 hours.

Code: Select all
"WHERE members.level >= " $addon_conf['ArmorySync']['MinLevel'] . " AND members.level <= " $addon_conf['ArmorySync']['MaxLevel'] ." " .
        
"AND ( ISNULL(players.name) " .
        
"OR members.update_time <= DATE_SUB(NOW(), INTERVAL " $addon_conf['ArmorySync']['SynchCutoffTime'] . " HOUR) ) " .
              
//"OR STR_TO_DATE(players.dateupdatedutc,'%m/%d/%y %H:%i:%s') <= DATE_SUB(NOW(), INTERVAL " . $addon_conf['ArmorySync']['SynchCutoffTime'] . " HOUR) ) " .
        
"ORDER BY members.update_time ASC";
 


The main change was changing the field from "players.dateupdatedutc" to "members.update_time", and to switch the order to ASC instead of DESC.

I was assuming that the function updates the "members.update_time" field when it synchs, but I could be wrong. Also, are the formats compatible, and did I code this right. I could be making the stupidest of errors, and not even know. Someone with more insight into the mod, and better PHP experience might be better to answer this.

EDIT: If anyone has ideas on how to improve or make this work, I will not be offended if you rip it all up. I'm very new to PHP and coding, so all hints and tips are appreciated.
Last edited by kaleyn on Sun Apr 22, 2007 4:42 pm, edited 2 times in total.
Johann Wolfgang Von Goethe --
Treat people as if they were what they ought to be and you help them to become what they are capable of being.
User avatar
kaleyn
WR.net Apprentice
WR.net Apprentice
 
Posts: 37
Joined: Mon Jan 08, 2007 7:59 pm

Introducing ArmorySync

Postby kaleyn » Mon Apr 23, 2007 3:01 am

Added this to the index.php file abov my previous post's simple for loop. Provided a nice summary for the update...

Code: Select all
echo "Total Players to Update: ".sizeof($players) . "<br>";
    for (
$i=0$i<=sizeof($players); $i++)
    {
    
$playername=$players[$i];
    echo 
$playername ."<br>";
 
Johann Wolfgang Von Goethe --
Treat people as if they were what they ought to be and you help them to become what they are capable of being.
User avatar
kaleyn
WR.net Apprentice
WR.net Apprentice
 
Posts: 37
Joined: Mon Jan 08, 2007 7:59 pm

Re: Introducing ArmorySync

Postby bsmorgan » Mon Apr 23, 2007 8:16 am

kaleyn wrote:Added this to the index.php file abov my previous post's simple for loop. Provided a nice summary for the update...


Here's my updated loop including a test for maximum execution time:
Code: Select all
echo "Total Players to Update: ".sizeof($players) . "<br>";
$startTime time();
for (
$i=0$i<sizeof($players); $i++) {
    
$playername=$players[$i];
    echo 
$playername ."<br>";
    
synchPlayer(null$playername);
    if ((
time() - $startTime) > ini_get('max_execution_time') - 10) {
        break;
        }
    }
echo 
"Updated ".$i." players in ".(time() - $startTime)." out of ".ini_get('max_execution_time')." seconds.<br>";
 


I also changed the SQL statement order by to:
Code: Select all
      "ORDER BY players.dateupdatedutc ASC, members.last_online ASC";


It looks like the players.dateupdatedutc field will get updated by a successful fetch (and store) of the armory data. That should make repeated execution of this loop eventually process everyone.
User avatar
bsmorgan
WoW Interface Developer
WoW Interface Developer
 
Posts: 160
Joined: Tue Nov 28, 2006 10:17 pm
Location: Colorado Springs, Colorado

Introducing ArmorySync

Postby Jomar » Tue Apr 24, 2007 8:14 am

I've installed this addon but it seems to be behaving strangely, when I run it I just get a blank page in FF or a page not found error in IE maybe 5 seconds, it still seems to update though... sometimes.
Jomar
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Tue Apr 24, 2007 2:35 am

Re: Introducing ArmorySync

Postby Immi » Tue Apr 24, 2007 10:12 pm

Hi,

I've downloaded the addon and installed but when I put my password in and click "go" I get the page cannot be displayed.

This happens in about 5sec.

Can anyone please help with this?
Immi
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Fri Mar 16, 2007 10:24 pm

Re: Introducing ArmorySync

Postby berrant » Wed Apr 25, 2007 6:25 am

Immi wrote:Hi,

I've downloaded the addon and installed but when I put my password in and click "go" I get the page cannot be displayed.

This happens in about 5sec.

Can anyone please help with this?


Same here. I downloaded the addon from the link in the first post of this thread... Tried with both IE and Firefox...

*hmmmmm*

[edit] OK, changed to the socket thingy in teh config.php file and it runs now. however, I get:

Non-Critical Error: Incomplete Data for Priestx. Player has probably not updated in awhile.
Priestx synched: 0 seconds. Total runtime: 21 seconds.
Non-Critical Error: Incomplete Data for Shyste. Player has probably not updated in awhile.
Shyste synched: 0 seconds. Total runtime: 21 seconds.
Non-Critical Error: Incomplete Data for Myriah. Player has probably not updated in awhile.
Myriah synched: 1 seconds. Total runtime: 22 seconds.

--
I checked a few of these toon in the armoury site, and they are i there... not awaitig refresh... Suggestions?
Last edited by berrant on Wed Apr 25, 2007 7:03 am, edited 1 time in total.
Image
User avatar
berrant
WR.net Apprentice
WR.net Apprentice
 
Posts: 8
Joined: Wed Aug 16, 2006 12:42 am

Introducing ArmorySync

Postby Subxero » Wed Apr 25, 2007 9:03 am

Any sugestion to get correct names on unix server systems ?
User avatar
Subxero
WR.net Artisan
WR.net Artisan
 
Posts: 234
Joined: Thu Jul 06, 2006 4:08 pm
Realm: Zul'jin (PvE) - US

Introducing ArmorySync

Postby Pugro » Wed Apr 25, 2007 2:01 pm

berrant, I got the same as I'd not udpated the armory URL to use the Europian site...you on the US or EU realms?
Last edited by Pugro on Wed Apr 25, 2007 7:25 pm, edited 1 time in total.
--------------------------------
Pugro_
Ice and Trinity Guilds, Nordrassil, EU PvE
www.iceguild.org.uk, www.trinityguild.net
Image
Pugro
WR.net Journeyman
WR.net Journeyman
 
Posts: 79
Joined: Fri Jul 07, 2006 2:14 pm
Location: London, UK

Introducing ArmorySync

Postby berrant » Wed Apr 25, 2007 8:39 pm

I'm on the US realm... Server name in my avatar.
Image
User avatar
berrant
WR.net Apprentice
WR.net Apprentice
 
Posts: 8
Joined: Wed Aug 16, 2006 12:42 am

Introducing ArmorySync

Postby kaleyn » Thu Apr 26, 2007 1:22 am

BSMorgan,

I applied your changes, and my report screen is always reporting 207 players to update, even though it updates ~10 players each time.

Furthermore, if it comes up with an error from Armorysync saying that player hasn't been on in a while, can we have it so that these players get their toons marked as "updated"? Otherwise it keeps them in the list, indeed at the top of the list. (Spinning my wheels for nothing.)
Johann Wolfgang Von Goethe --
Treat people as if they were what they ought to be and you help them to become what they are capable of being.
User avatar
kaleyn
WR.net Apprentice
WR.net Apprentice
 
Posts: 37
Joined: Mon Jan 08, 2007 7:59 pm

Re: Introducing ArmorySync

Postby bsmorgan » Fri Apr 27, 2007 12:29 am

kaleyn wrote:I applied your changes, and my report screen is always reporting 207 players to update, even though it updates ~10 players each time.

I believe this is caused by the error below.
kaleyn wrote:Furthermore, if it comes up with an error from Armorysync saying that player hasn't been on in a while, can we have it so that these players get their toons marked as "updated"? Otherwise it keeps them in the list, indeed at the top of the list. (Spinning my wheels for nothing.)

I'm getting exactly the same error(s) as are a couple of other people. I believe (love to be proved wrong) that this has nothing to do with my changes, but is rather a change by Blizzard that is causing ArmorySynch to fail. I'm not getting any successful updates at all so my count remains static.

Until I get past this error myself, I can't verify that the count and the query actually get smaller every time. It should work that way and if it doesn't, I'll see what I can do to make it work that way. There may need to be a field added to the database that contains the "ArmorySynch update date".

Regards,

Brad
User avatar
bsmorgan
WoW Interface Developer
WoW Interface Developer
 
Posts: 160
Joined: Tue Nov 28, 2006 10:17 pm
Location: Colorado Springs, Colorado

Re: Introducing ArmorySync

Postby Kristoff22 » Fri Apr 27, 2007 11:40 pm

A new version has been uploaded which has a number of fixes, including support for international versions. By default it uses the same language that you have setup in Roster, but you can change that (and a number of new options) in config.php. There is also better support for debugging, including print statments of debug messages and the ability to turn updating roster off if you want to. I'm having major problems getting this to work correctly with UseCurl set to false, which uses the getContentFileSocket function. If anyone has gotten this to work correctly, please let me know (assuming you have modified the function). If not, I'm going to hold off on fixing that code until I find someone is actually using it - so if you are please let me know.

One other note, I will be closing this thread, and opening up a new thread which will include much better information about what ArmorySync is, how to install it, and FAQ.

Hope everyone enjoys the new updates :)
Kristoff22
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 103
Joined: Mon Nov 13, 2006 5:54 am

Introducing ArmorySync

Postby berrant » Sat Apr 28, 2007 12:45 am

OK. I re-read the entire thread, and updated to the newest version posted by Kristoff22. I removed the ; from infront of 'extension=php_curl.dll' in the php.ini through remote desktop my my server. Left cURL ebaled in config.php.

Now, getting this on a white page all alone:

SELECT members.name FROM `roster2_members` members LEFT JOIN `roster2_players` players ON members.name = players.name WHERE members.level >= 19 AND ( ISNULL(players.name) OR STR_TO_DATE(players.dateupdatedutc,'%m/%d/%y %H:%i:%s') <= DATE_SUB(NOW(), INTERVAL 6 HOUR) ) ORDER BY members.last_online DESC
Found 54 players.
GetContentCurl: armory.worldofwarcraft.com/character-sheet.xml?r=Onyxia&n=Acrynth, 1, User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2, cookieLangId=en_us;


At least it has signs of life.... I have given up on my guildies uploading profiles and I seriously want to get this working... Suggestions??

[EDIT:]

Seems that the server did not have the cURL .dll in the correct place. it is now and working great... Updates the same 4 players each time I click the addon from the main roster page....

[EDIT 2:]

Seems that players updated by this addon are marked by roster as being updated always at 7:00pm, even though its 1:30pm here now... Perhaps this is why the same players get updated over and over....??
Last edited by berrant on Sat Apr 28, 2007 1:28 am, edited 2 times in total.
Image
User avatar
berrant
WR.net Apprentice
WR.net Apprentice
 
Posts: 8
Joined: Wed Aug 16, 2006 12:42 am

PreviousNext

Return to ArmorySync - Depreciated

Who is online

Users browsing this forum: No registered users and 0 guests

cron