Please please please plzplzplz someone fix it or help :-p

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

Moderators: Ulminia, poetter

Please please please plzplzplz someone fix it or help :-p

Postby Underground944 » Sun Feb 22, 2009 1:41 pm

I was looking at certain things IE how armory works, and if we read in the information as if it was a string from the armor, as if we loaded the page and then viewed source, we would get sections such as:

<characterTab>
<talentSpec treeOne="0" treeThree="19" treeTwo="52"/>
<buffs/>
<debuffs/>
<pvp>
<lifetimehonorablekills value="8475"/>
<arenacurrency value="0"/>
</pvp>
<professions>
<skill key="skinning" max="450" name="Skinning" value="450"/>
<skill key="tailoring" max="450" name="Tailoring" value="449"/>
</professions>
<title value="Corporal %s"/>
<knownTitles>
<title value="Corporal %s"/>
</knownTitles>
<characterBars>
<health effective="15433"/>
<secondBar casting="132" effective="16443" notCasting="387" type="m"/>
</characterBars>
<baseStats>
<strength attack="36" base="36" block="-1" effective="46"/>
<agility armor="106" attack="-1" base="43" critHitPercent="4.49" effective="53"/>
<stamina base="59" effective="865" health="8470" petBonus="-1"/>
<intellect base="181" critHitPercent="6.29" effective="897" mana="13175" petBonus="-1"/>
<spirit base="179" effective="436" healthRegen="22" manaRegen="363"/>
<armor base="1998" effective="1998" percent="11.60" petBonus="-1"/>
</baseStats>
<resistances>
<arcane petBonus="-1" value="0"/>
<fire petBonus="-1" value="0"/>
<frost petBonus="-1" value="0"/>
<holy petBonus="-1" value="0"/>
<nature petBonus="-1" value="0"/>
<shadow petBonus="-1" value="0"/>
</resistances>
<melee>
<mainHandDamage dps="106.6" max="263" min="92" percent="0" speed="1.66"/>
<offHandDamage dps="0.0" max="0" min="0" percent="0" speed="1.85"/>
<mainHandSpeed hastePercent="8.14" hasteRating="267" value="1.66"/>
<offHandSpeed hastePercent="8.14" hasteRating="267" value="1.85"/>
<power base="36" effective="36" increasedDps="2.0"/>
<hitRating increasedHitPercent="13.82" penetration="0" reducedArmorPercent="0.00" value="453"/>
<critChance percent="10.81" plusPercent="10.19" rating="468"/>
<expertise additional="0" percent="0.00" rating="0" value="0"/>
</melee>
<ranged>
<weaponSkill rating="0" value="0"/>
<damage dps="293.7" max="636" min="341" percent="0" speed="1.66"/>
<speed hastePercent="8.14" hasteRating="267" value="1.66"/>
<power base="43" effective="43" increasedDps="3.0" petAttack="-1.00" petSpell="-1.00"/>
<hitRating increasedHitPercent="13.82" penetration="0" reducedArmorPercent="0.00" value="453"/>
<critChance percent="14.65" plusPercent="10.19" rating="468"/>
</ranged>
<spell>
<bonusDamage>
<arcane value="1703"/>
<fire value="1703"/>
<frost value="1703"/>
<holy value="1703"/>
<nature value="1703"/>
<shadow value="1703"/>
<petBonus attack="-1" damage="-1" fromType=""/>
</bonusDamage>
<bonusHealing value="1703"/>
<hitRating increasedHitPercent="17.27" penetration="0" reducedResist="0" value="453"/>
<critChance rating="468">
<arcane percent="16.48"/>
<fire percent="25.48"/>
<frost percent="16.48"/>
<holy percent="16.48"/>
<nature percent="16.48"/>
<shadow percent="16.48"/>
</critChance>
<penetration value="0"/>
<manaRegen casting="132.00" notCasting="387.00"/>
<hasteRating hastePercent="8.14" hasteRating="267"/>
</spell>
<defenses>
<armor base="1998" effective="1998" percent="11.60" petBonus="-1"/>
<defense decreasePercent="0.00" increasePercent="0.00" plusDefense="0" rating="0" value="400.00"/>
<dodge increasePercent="0.00" percent="4.49" rating="0"/>
<parry increasePercent="0.00" percent="0.00" rating="0"/>
<block increasePercent="0.00" percent="0.00" rating="0"/>
<resilience damagePercent="0.00" hitPercent="0.00" value="0.00"/>
</defenses>
<items>
<item durability="60" gem0Id="41285" gem1Id="40014" gem2Id="0" icon="inv_helmet_126" id="39295" maxDurability="60" permanentenchant="3820" randomPropertiesId="0" seed="764214686" slot="0"/>
<item durability="0" gem0Id="0" gem1Id="0" gem2Id="0" icon="inv_jewelry_necklace_27naxxramas" id="40680" maxDurability="0" permanentenchant="0" randomPropertiesId="0" seed="0" slot="1"/>
<item durability="60" gem0Id="40014" gem1Id="0" gem2Id="0" icon="inv_shoulder_25" id="39494" maxDurability="60" permanentenchant="2995" randomPropertiesId="0" seed="0" slot="2"/>
<item durability="0" gem0Id="0" gem1Id="0" gem2Id="0" icon="inv_shirt_white_01" id="6795" maxDurability="0" permanentenchant="0" randomPropertiesId="0" seed="865205670" slot="3"/>
<item durability="100" gem0Id="40026" gem1Id="40014" gem2Id="0" icon="inv_chest_cloth_41" id="40234" maxDurability="100" permanentenchant="3832" randomPropertiesId="0" seed="0" slot="4"/>
<item durability="35" gem0Id="39998" gem1Id="0" gem2Id="0" icon="inv_belt_10" id="37408" maxDurability="35" permanentenchant="0" randomPropertiesId="0" seed="0" slot="5"/>
<item durability="75" gem0Id="40048" gem1Id="40026" gem2Id="0" icon="inv_pants_cloth_14" id="39309" maxDurability="75" permanentenchant="3719" randomPropertiesId="0" seed="1883546832" slot="6"/>
<item durability="50" gem0Id="0" gem1Id="0" gem2Id="0" icon="inv_boots_cloth_11" id="39273" maxDurability="50" permanentenchant="3826" randomPropertiesId="0" seed="727415568" slot="7"/>
<item durability="35" gem0Id="0" gem1Id="0" gem2Id="0" icon="inv_bracer_17" id="37884" maxDurability="35" permanentenchant="2332" randomPropertiesId="0" seed="0" slot="8"/>
<item durability="35" gem0Id="39998" gem1Id="0" gem2Id="0" icon="inv_gauntlets_17" id="40415" maxDurability="35" permanentenchant="3234" randomPropertiesId="0" seed="0" slot="9"/>
<item durability="0" gem0Id="0" gem1Id="0" gem2Id="0" icon="inv_jewelry_ring_ahnqiraj_06" id="37694" maxDurability="0" permanentenchant="0" randomPropertiesId="0" seed="1950823232" slot="10"/>
<item durability="0" gem0Id="0" gem1Id="0" gem2Id="0" icon="inv_jewelry_ring_52naxxramas" id="39389" maxDurability="0" permanentenchant="0" randomPropertiesId="0" seed="851310774" slot="11"/>
<item durability="0" gem0Id="0" gem1Id="0" gem2Id="0" icon="inv_trinket_naxxramas04" id="39229" maxDurability="0" permanentenchant="0" randomPropertiesId="0" seed="1721562680" slot="12"/>
<item durability="0" gem0Id="0" gem1Id="0" gem2Id="0" icon="inv_trinket_naxxramas03" id="40255" maxDurability="0" permanentenchant="0" randomPropertiesId="0" seed="1779830528" slot="13"/>
<item durability="0" gem0Id="0" gem1Id="0" gem2Id="0" icon="inv_misc_cape_naxxramas_02" id="40251" maxDurability="0" permanentenchant="3831" randomPropertiesId="0" seed="0" slot="14"/>
<item durability="75" gem0Id="0" gem1Id="0" gem2Id="0" icon="inv_knife_1h_stratholme_d_02" id="39424" maxDurability="75" permanentenchant="3788" randomPropertiesId="0" seed="1778885648" slot="15"/>
<item durability="0" gem0Id="0" gem1Id="0" gem2Id="0" icon="inv_offhand_dalaran_d_01" id="40698" maxDurability="0" permanentenchant="0" randomPropertiesId="0" seed="0" slot="16"/>
<item durability="75" gem0Id="0" gem1Id="0" gem2Id="0" icon="inv_wand_1h_stratholme_d_01" id="39473" maxDurability="75" permanentenchant="0" randomPropertiesId="0" seed="687684588" slot="17"/>
</items>
</characterTab>
i dont think that would be very hard to parse... just look for the corresponding tag that you want to import, and parse it accordingly... I dont know what file I would need to start editing and what the protocol is that was used for doing so. for instance if I was to write a java program to do this, I would read in the page, and then parse the file, taking out the information as it is fed in, storing it in the appropriate values, and then setting them in the database accordingly... I just dont know where to start, it only appears to be a few minor edits on terms of pulling the data off of their pages since everything can be retrieved as it is displayed to the end user IE the html source that your browser recieves. Am I getting anywhere?
User avatar
Underground944
WR.net Apprentice
WR.net Apprentice
 
Posts: 15
Joined: Tue Oct 16, 2007 4:41 am

Please please please plzplzplz someone fix it or help :-p

Postby PleegWat » Sun Feb 22, 2009 5:32 pm

The file format is XML, which is relatively easy to parse. The problem, AFAIK, is fetching the pages reliably. Asking too much of them too quickly results in the armory's anti-DOS kicking in.

You could write something up in java, but roster itself is completely written in PHP. A java addon may be possible, but would probably be tricky to get to work on all servers.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Please please please plzplzplz someone fix it or help :-p

Postby Ulminia » Fri Feb 27, 2009 5:22 am

im fixing it dont get your nikers in a nitch...
Ulminia of Zangarmarsh
Zonous of Zangarmarsh
Author of Roster Gallery
WoWRoster-Profiler Redesigner
User avatar
Ulminia
WoWRoster.net Dev Team
WoWRoster.net Dev Team
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 1223
Joined: Tue Jul 04, 2006 4:41 pm
Location: New Brunswick, Canada
Realm: Zangarmarsh (PvE) - US
gmail/gtalk: ulminia@gmail.com


Return to ArmorySync - Depreciated

Who is online

Users browsing this forum: No registered users and 0 guests

cron