; Project started 12:40pm March 26 2010 on ^1:HOTLINK:*item=*:#:{ .timerwh off .timerwh 1 3 window -c @wowhead if (%updatedsize) { set -u3 %updatedsize %updatedsize } else { set -u3 %updatedsize 100 } if (%new_width) { set -u3 %new_width %new_width } else { set -u3 %new_width 300 } window -dBdpow0 +dL @wowhead $calc($mouse.dx +15) $calc($mouse.dy - %updatedsize - 20) %new_width %updatedsize if ((http:// isin $1) && (!%cooldown)) || (%lastitem != $1) { window -c @wowhead window -dBdpow0 +dL @wowhead $calc($mouse.dx +15) $calc($mouse.dy - %updatedsize - 20) %new_width %updatedsize drawtext -p @wowhead 0 5 5 Loading... join $chan sockclose itemsocket sockopen itemsocket www.wowhead.com 80 sockmark itemsocket $remove($1,http://www.wowhead.com/?item=,<,>.) echo 4 -a } set %lastitem $1 set -u3 %cooldown 1 return 1 } on *:SOCKOPEN:itemsocket:{ sockwrite -nt $sockname GET /?item= $+ $gettok($sock($sockname).mark,1,32) $+ &xml HTTP/1.0 sockwrite -nt $sockname Host: www.wowhead.com $+ $crlf $+ $crlf unset %data %switch } on *:sockread:itemsocket:{ if ($sockerr > 0) return :nextread sockread -f %temp if ($sockbr == 0) return inc %switch 1 if (%switch > 11) { set -u3 %data %data $+ %temp if (class="q isin %data) { set -u3 %quality $replacex($mid(%data,$calc($pos(%data,class="q)+8),1),0,10329501,1,16777215,2,65310,3,14512128,4,15611299,5,33023,6,255,7,8441061) } if (Item not Found! isin %data) { sockclose $sockname } } goto nextread } on *:sockclose:itemsocket:{ var %startpos = $calc($pos(%data,htmlTooltip,1) +12) var %len = $calc($pos(%data,htmlTooltip,2) - %startpos -5) var %exploded,%x = $regsub($mid(%data,%startpos,%len),m/|<\/?(a|span|small)[^>]*>/g,$null,%exploded) var %exploded = $replace(%exploded,>,> $+ $chr(160)) var %exploded = $striptags(%exploded) var %exploded = $replace(%exploded,$chr(40) $+ $chr(160),$chr(40),L $+ $chr(160),L,Classes: $+ $str($chr(1260),2),Classes: $+ $chr(32),<,<,>,>) tokenize 160 %exploded var %this = 0, %thisy = 0, %totaly = 0, %total = $0 set -u3 %updatedsize $calc(15 * $0 +10) window -dBdpow0 +dL @wowhead $calc($mouse.dx +15) $calc($mouse.dy - %updatedsize - 20) %new_width $calc(15 * $0 +10) drawfill -r @wowhead 1315860 1315860 0 0 %new_width %updatedsize while (%this < %total) { inc %this 1 inc %thisy 1 var %line = $($ $+ %this,2) var %width = $width(%line,verdana,10) if (%width > $window(@wowhead).w) { set -u3 %new_width $calc(%width +20) window -dBdpow0 +dL @wowhead $calc($mouse.dx +15) $calc($mouse.dy - %updatedsize - 20) %new_width $calc(15 * $0 +10) drawfill -r @wowhead 1315860 1315860 300 0 $calc(300 - %new_width) %updatedsize } if (%this == 1) { drawtext -nrp @wowhead %quality Verdana 14 5 $calc((%thisy * 15) - 10) %line } else { drawtext -nrp @wowhead 16777215 Verdana 10 6 $calc((%thisy * 15) - 7) %line } } } alias striptags { var %x,%y = $regsub($1-,/(<[^>]+>)/g,$null,%x) | return $replace($remove(%x,$chr(9)), ,$chr(32),",") }