[VB.net] Armory Profile Graber menu

User Tag List

Results 1 to 1 of 1
  1. #1
    Glitchy's Avatar ★ Elder ★
    Reputation
    1277
    Join Date
    Jun 2007
    Posts
    985
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [VB.net] Armory Profile Graber

    This is functions to grab the data off of armory and load the item id's into an array to do with as you please.

    Example Use
    Code:
            Dim tArray() As String = LoadArmoryInfo("http://www.wowarmory.com/character-sheet.xml?r=Rexxar&n=Glitchyg")
            For Each tString As String In tArray
                MsgBox(tString)
            Next
    Imports
    Code:
    Imports System.Xml
    Imports System.Net
    Imports System.IO
    Functions
    Code:
    Public Function LoadArmoryInfo(ByVal tURL As String) As String()
            Dim tString, tChrData(0) As String
            Dim tCount, tData, tSlot As Integer
    
            tString = GetHtml(tURL)
    
            If Strings.StrComp(tString, "-1") = 0 Then
                'Error
                Return tChrData
            End If
    
            Dim m_nodelist As XmlNodeList
            Dim m_xmld As XmlDocument
            Dim m_node As XmlNode
            m_xmld = New XmlDocument()
            m_xmld.LoadXml(tString)
            m_nodelist = m_xmld.SelectNodes("/page/characterInfo/characterTab/items/item")
    
            tCount = 0
            For Each m_node In m_nodelist
                tData = m_node.Attributes.GetNamedItem("id").Value
                tSlot = m_node.Attributes.GetNamedItem("slot").Value
                If tSlot = -1 Then
                    tSlot = 19
                End If
                ReDim Preserve tChrData(tCount)
                tChrData(tSlot) = tData
                tCount = tCount + 1
            Next
    
            Return tChrData
    
        End Function
    
        Public Function GetHtml(ByVal URL As String) As String
            Try
                Dim request As HttpWebRequest = WebRequest.Create(URL)
                request.UserAgent = "Firefox/2."
                Application.DoEvents()
                Dim response As HttpWebResponse = request.GetResponse()
                Application.DoEvents()
                Dim reader As StreamReader = New StreamReader(response.GetResponseStream())
                Dim tString As String
                tString = ""
                Do While Not reader.EndOfStream()
                    tString = tString & reader.ReadLine() & vbCrLf
                Loop
                Return tString
            Catch ex As WebException
                'Unable to Connect to Host
                Return -1
            Catch ex As UriFormatException
                'Invaild URL
                Return -1
            Catch ex As Exception
                'Unknown Error
                Return -1
            End Try
        End Function

    [VB.net] Armory Profile Graber

Similar Threads

  1. Anonymous WoW Armory Profiles [feedback]
    By Sympozium in forum Programming
    Replies: 8
    Last Post: 01-04-2011, 10:19 AM
  2. Replies: 2
    Last Post: 05-31-2009, 09:55 PM
  3. [EPIC FAIL] hunter armory profile
    By Gilthoniel in forum World of Warcraft General
    Replies: 18
    Last Post: 06-09-2008, 08:33 PM
  4. Armory profiles!
    By Honsu in forum WoW Scam Prevention
    Replies: 4
    Last Post: 09-07-2007, 08:14 AM
  5. Armory profiles
    By Adrenalin3 in forum World of Warcraft General
    Replies: 1
    Last Post: 04-10-2007, 08:50 AM
All times are GMT -5. The time now is 06:10 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search