Script made for mouse(irc.geekshed.net)
This script will gather your last 3 actions or some basic statistics from www.wowarmory.com and return them to irc in the form of channel message or notice.
Getting Started:
Example:
21:23:18 @armory Mîthra Galakrond
21:23:19 Searching ........
21:23:22 Ambassador Mîthra 9 Scourgelord Tyrannus kills (Heroic Pit of Saron).
21:23:22 Ambassador Mîthra 9 Ick and Krick kills (Heroic Pit of Saron).
21:23:23 Ambassador Mîthra 9 Forgemaster Garfrost kills (Heroic Pit of Saron).
21:23:24 Ambassador Mîthra http://www.wowarmory.com/character-sheet.xml?r=Galakrond&n=M%C3%AEthra
21:23:29 @wowstats Mîthra Galakrond
21:23:29 Searching ........
21:23:31 Ambassador Mîthra Level 80 Draenei Shaman strength: 121 agility: 71 stamina: 136 intellect: 140 spirit: 145 armor: 15141
21:23:33 Ambassador Mîthra http://www.wowarmory.com/character-sheet.xml?r=Galakrond&n=M%C3%AEthra
;Wow Armory Script by Ford_Lawnmower irc.geekshed.net #Script-Help
menu Channel,Status {
.$iif($group(#ArmoryWow) == On,$style(1)) ArmoryWow Trigger
..$iif($group(#ArmoryWow) == On,$style(2)) On: .enable #ArmoryWow
..$iif($group(#ArmoryWow) == Off,$style(2)) Off: .disable #ArmoryWow
}
#ArmoryWow on
On $*:Text:/^(\+|-|!|@)(Armory|wowstats).*/Si:#: {
var %action $regml(1), %selection $regml(2)
if (%action isin +-) && ($regex($nick($chan,$nick).pnick,/(!|~|&|@)/)) {
if (%action == +) {
if ($istok(%ArmoryWowChanList,$+($network,$chan),32)) { .msg $chan $nick $chan is already running the ArmoryWow script }
else {
.enable #ArmoryWow
Set %ArmoryWowChanList $addtok(%ArmoryWowChanList,$+($network,$chan),32)
.msg $chan $nick has activated the ArmoryWow script for $chan .
}
}
else {
if (!$istok(%ArmoryWowChanList,$+($network,$chan),32)) { .msg $chan $nick $chan is not running the ArmoryWow script }
else {
Set %ArmoryWowChanList $remtok(%ArmoryWowChanList,$+($network,$chan),1,32)
.msg $chan $nick has deactivated the ArmoryWow script for $chan .
}
}
}
elseif (!$timer($+(ArmoryWow,$network,$nick))) && ($istok(%ArmoryWowChanList,$+($network,$chan),32)) {
.timer $+ $+(ArmoryWow,$network,$nick) 1 6 noop
var %method $iif(%action == !,.notice $nick,$iif($regex($nick($chan,$nick).pnick,/(!|~|&|@|%)/),.msg $chan,.notice $nick))
GetArmoryWow %method %selection $strip($2-)
}
}
#ArmoryWow end
alias Armory { GetArmoryWow echo -a Armory $1- }
alias WowStats { GetArmoryWow echo -a WowStats $1- }
alias -l GetArmoryWow {
var %sockname $+(ArmoryWow,$network,$2,$ticks)
$1-2 Searching ........
sockopen %sockname www.wowarmory.com 80
sockmark %sockname $1-2 $3 $+(/character-sheet.xml?r=,$urlencode($5),&n=,$urlencode($4)) 3 1 $4
}
On *:sockopen:ArmoryWow*: {
if (!$sockerr) {
sockwrite -nt $sockname GET $gettok($sock($sockname).mark,4,32) HTTP/1.0
sockwrite -n $sockname Host: www.wowarmory.com
sockwrite -n $sockname $crlf
}
else { echo -st Socket Error $nopath($script) | sockclose $sockname | return }
}
On *:sockread:ArmoryWow*: {
if ($sockerr) { echo -st Socket Error $nopath($script) | sockclose $sockname | return }
else {
var %ArmoryWow | sockread %ArmoryWow
if ((Error && Encountered) isin %ArmoryWow) {
$gettok($sock($sockname).mark,1-2,32) **Error** Page Not Found! Syntax is !armory name realm or !wowstats name realm
sockclose $sockname
return
}
elseif ($gettok($sock($sockname).mark,3,32) == armory) {
if ($gettok($sock($sockname).mark,6,32) > $gettok($sock($sockname).mark,5,32)) {
tokenize 32 $sock($sockname).mark
$1-2 $scolor($delim($8) $delim($7),04,) $+(http://www.wowarmory.com,$4,)
sockclose $sockname
return
}
elseif ($regex(%ArmoryWow,/<span class="prefix">([^<]*)\s\ /)) { addmark 32 $delim($regml(1)) }
elseif ($regex(%ArmoryWow,/<desc>([^<]*)<\/desc>/)) {
tokenize 32 $sock($sockname).mark $regml(1)
$1-2 $scolor($delim($8) $delim($7) $9-,04,)
incmark 6 32
}
}
else {
if (function resistancesObject isin %ArmoryWow) {
tokenize 32 $sock($sockname).mark
$1-2 $scolor($delim($9) $delim($7) $delim($8) $10- ,04,)
$1-2 $scolor($delim($9) $delim($7),04,) $+(http://www.wowarmory.com,$4,)
sockclose $sockname
return
}
elseif ($regex(%ArmoryWow,/<a class="staticTip" href="\/character-sheet\.xml\?r=.*&cn=.*" onmouseover="setTipText\('([^&]*) ([^&]*) ([^&]*) ([^<]*)'\)">/)) {
addmark 32 $delim(** $regml(1) $regml(2) $regml(3) $regml(4) **)
}
elseif ($regex(%ArmoryWow,/<span class="prefix">([^<]*)\s\ /)) { addmark 32 $delim($regml(1)) }
elseif ($regex(%ArmoryWow,/function (.*)Object/)) { addmark 32 $+($regml(1),:) }
elseif ($regex(%ArmoryWow,/this\.base="([\d]*)";/)) { addmark 32 $regml(1) }
}
}
}
alias -l addmark { sockmark $sockname $addtok($sock($sockname).mark,$2-,$1) }
alias -l incmark { sockmark $sockname $puttok($sock($sockname).mark,$calc($gettok($sock($sockname).mark,$1,$2) + $iif($3,$3,1)),$1,$2) }
alias -l urlencode { return $regsubex($1-,/(\W)/g,$+(%,$base($asc(\t),10,16))) }
alias delim { return $regsubex($1-,/([\s\x7])/g,$iif(\t == $chr(7),$chr(32),$chr(7))) }
alias -l SColor {
var %c1 $iif($2,$right($+(0,$2),2),99),%c2 $iif($3,$right($+(0,$3),2),99)
return $+($regsubex($1,/([\ba-z]{1,})/gi,$+(,%c1,\t,,%c2)),)
}
It has the information that is what i was posting. While i am no expert i managed to get it working to pull information from the new site and figured it was a launchpad for more people to utilize.
http://us.battle.net/wow/en/character/thrall/robinhorde/simple provides stats.. /advanced provides more info as well.
THRALL in this link being the realm and ROBINHORDE the character in this case.
and that is what i was fixing.. while i only grabbed the achieves (And badly at that) ALL the information is there its just a matter of parsing.. i will refrain from posting more information to assist.. my bad.
@edb The Author of this script didn't go "poof" . I do not and have never used world of warcraft, in fact , I only know that is is some sort of a game. The reason there is no new progress on this script is because the new site is junk and doesn't provide any of the information that the old one did.
If someone knows of another site that provides the same information as the old one, please post the sitename along with a detailed description of how the script should work and what information should be gathered from each command. Please provide working examples , along with valid links to search results pages.
You may also come to irc.Geekshed.net #Script-Help to make your request.
btw, Your comment was deleted edb. The code that you posted is here -->> http://pastebin.com/hc1fNgXU
Please don't post large blocks of redundant code here. 98% or what you posted is already at the top of this page, so please just use a pastebin link.
@Gosy No worries. I just need to know what information should be returned from irc from the new site. Since nobody ever posted back a response to my comment, this post has died.
My original Comment:
The site is completely different and doesn't appear to have character information available for search ;/
If you think a search script for this site would be useful, please take a moment to study the site and explain to me how the script should work and what information it should return.
If you know of another site that has both wow armory and stats information, please post the link here and I will consider a rewrite with the new site.
Please keep in mind that I do not and have never played wow. I know nothing about it, so please explain thoroughly.
@FordLawnmower i hope my comment didn't insult you in any way, my intention wasn't meant like that. And i wish i knew how to script myself i would gladly help you thus i've never scriptet anything inside mirc :(. I can just support you on this really, i hope you get around this script and make it work again! :)
Cheers
@Gosy It seems that wowarmory.com has been changed to -->> http://us.battle.net/wow/en/
The site is completely different and doesn't appear to have character information available for search ;/
If you think a search script for this site would be useful, please take a moment to study the site and explain to me how the script should work and what information it should return.
If you know of another site that has both wow armory and stats information, please post the link here and I will consider a rewrite with the new site.
Please keep in mind that I do not and have never played wow. I know nothing about it, so please explain thoroughly.
[17:00:43] <@TheAlmightyDuck> @wowstats Daveysc Eitrigg
[17:00:44] Searching ........
[17:00:45] strength: Daveysc Level 48 Night Elf Hunter 42 agility: 102 stamina: 71 intellect: 53 spirit: 57 armor: 2117
[17:00:46] strength: Daveysc http://www.wowarmory.com/character-sheet.xml?r=Eitrigg&n=Daveysc
I'm guessing strength: should come after Daveysc Level 48 Night Elf Hunter