You can use Games::WoW::Armory to print both character, name, and current level for all members of a given guild.

The following Perl script will build a .csv file named guild.csv "," delimited containing both character names and current level for all members of a given guild in World of Warcraft (WoW).

#!/usr/bin/perl -w ############################################### #This script will connect to the wowarmory.com# #site and display level and name of members # #of a particular guild. # # Written by jackl0phty # ############################################### # Load required modules. use strict; use Games::WoW::Armory; use FileHandle; #declare variables my @name; my @race; my @level; my @guild; my @gender; my @faction; my @lmodified; my @class; # Create new Games::Wow::Armory object. my $armory = Games::WoW::Armory->new(); $armory->search_character( { realm => 'anvilmar', character => 'draxxus', country => 'US' } ); #set characteristic to it's corresponding array @name = $armory->character->name; @race = $armory->character->race; @level = $armory->character->level; @guild = $armory->character->guildName; @gender = $armory->character->gender; @faction = $armory->character->faction; @lmodified = $armory->character->lastModified; @class = $armory->character->class; #get guild members my $armory2 = Games::WoW::Armory->new(); $armory2->search_guild( { realm => 'anvilmar', guild => "@guild", country => 'US' } ); #open file handle and write character stats my $fh = new FileHandle; if ($fh->open("> guild.csv")) { # Print Character's stats. foreach my $member (@{$armory2->guild->members}){ my @members = $member->name; print $fh $member->name; print $fh ","; print $fh $member->level; print $fh ",\n"; } } $fh->close;

After running the script, it will create a file named guild.csv in the directory it is executed from. Then you can open the file in spreadsheet for OpenOffice.

Note: The following 3 things are required to use the script: 1. Realm (i.e. name of server your character is on). 2. Guild - Name of the guild your character is a member of. 3. Country - The country code of the server you play on.

Planned Improvements: Currently, you must hard-code the realm, guild, and country code in the script. I plan to make those command-line arguments in the future. I also plan to be able to print more guild member stats. As of right now, you can only print the character name and level for ALL guild members due to a limitation in the Games::WoW::Armory module (as I understand it, if not, please let me know). I have an idea for a work-a-round that I think will work but haven't gotten around to coding it yet. Disclaimer: This post comes with NO expressed warranty, guarantee, support, or maintenance of any kind! Use at your own risk!


In reply to Using Games::WoW::Armory to print character name and level of you guild members of World of Warcraft. by jackl0phty

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.