WoWInterface SVN UrbanAchiever

[/] [trunk/] [FactionSpecificAchievements.lua] - Diff between revs 138 and 139

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 138 Rev 139
Line 424... Line 424...
        ["3357"] = 2,--Venomhide Ravasaur
        ["3357"] = 2,--Venomhide Ravasaur
        ["445"] = 2,--Warlord
        ["445"] = 2,--Warlord
        ["712"] = 2,--Warsong Outrider
        ["712"] = 2,--Warsong Outrider
        ["603"] = 2,--Wrath of the Horde
        ["603"] = 2,--Wrath of the Horde
}
}
 No newline at end of file
 No newline at end of file
 
 
 
--PHP CODE TO EXTRACT THE LIST FROM WOWHEAD
 
--[[<?php
 
 
 
$URLs = array(
 
        "http://www.wowhead.com/achievements?filter=si=-1;cr=9;crs=2;crv=4000" => 1,
 
        "http://www.wowhead.com/achievements?filter=si=-1;cr=9;crs=5;crv=4000" => 1,
 
        "http://www.wowhead.com/achievements?filter=si=-2;cr=9;crs=2;crv=4000" => 2,
 
        "http://www.wowhead.com/achievements?filter=si=-2;cr=9;crs=5;crv=4000" => 2
 
        );
 
$completearray = array();
 
foreach($URLs as $URL => $side){
 
        $page = file_get_contents($URL);
 
 
 
        $page = str_replace(array("\r\n", "\n", "\r"), '', $page);
 
 
 
 
 
        $pos = strpos($page, '<div id="lv-achievements" class="listview">');
 
        $wokingstring = substr($page, $pos);
 
        $wokingstring = str_replace('<div id="lv-achievements" class="listview"></div><script type="text/javascript">//<![CDATA[var _ = {};', '', $wokingstring);
 
 
 
        $pos = strpos($wokingstring, '_ = g_achievements;');
 
        $wokingstring = substr($wokingstring, 0, $pos);
 
 
 
        $wokingstring = str_replace(';$.extend(true, g_achievements, _);', "", $wokingstring);
 
 
 
        $workingarray = explode(';', $wokingstring);
 
 
 
 
 
        foreach($workingarray as $achievement){
 
                $pos = strpos($achievement, "',icon:'");
 
                $achievement = substr($achievement, 0, $pos);
 
                $achievement = str_replace(array("_[", "]={name_enus:'"), array('', '*-*'), $achievement);
 
                $achievement = explode('*-*', $achievement);
 
                $completearray[$achievement[0]]
 
        --[[ = $side . ',--' . str_replace('\\','',$achievement[1]);
 
}
 
 
 
}
 
 
 
foreach($completearray as $k => $v){
 
        echo '["' . $k . '"] = ' . $v . '<br />';
 
}
 
 
 
?>]]
 No newline at end of file
 No newline at end of file