Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Crim-Training on October 28, 2003, 11:35 AM

Title: w3xp flags
Post by: Crim-Training on October 28, 2003, 11:35 AM
ive tried numerous ways of updating this so it shows TFT icons but no luck, can anyone help me ?

VB ofcourse
Title: Re:w3xp flags
Post by: iago on October 28, 2003, 01:02 PM
I think you need to give a lot more information thant that to get a coherant answer.
Title: Re:w3xp flags
Post by: Crim-Training on October 28, 2003, 01:10 PM
Scrap my last post, but i dont know how to make it sound any better

"i need help getting my Warcraft 3: TFT icons to show up on my bot, would you be so kind to push me in the right direction or give me an example of how this can be done"

thx VB
Title: Re:w3xp flags
Post by: hismajesty on October 28, 2003, 01:57 PM
If the client = W3XP then display the W3XP icon.
Title: Re:w3xp flags
Post by: Crim-Training on October 28, 2003, 02:26 PM
thx hismajesty, i got it working about 30mins ago but =/ thx anyway
Title: Re:w3xp flags
Post by: MyndFyre on October 28, 2003, 04:43 PM
What was the problem?  Were you not interpreting the correct client... or... what?
Title: Re:w3xp flags
Post by: Crim-Training on October 29, 2003, 12:54 AM
for those who might wanna read back on this i did this..

Public Function GetIconCode(Optional ByVal Client As String, Optional ByVal Flags As Long, Optional ByVal SS As String) As Integer
Dim Code As Integer
Dim pA() As String
Dim Spawn As Integer
Dim stats As Boolean
On Error GoTo GetIconCode_Error
If Len(Client) > 4 Then stats = True
Statstring = Client

   If (BNFLAGS_BLIZZ And Flags) = BNFLAGS_BLIZZ Then
       GetIconCode = ICON_BLIZZ
       Exit Function
   ElseIf (BNFLAGS_OP And Flags) = BNFLAGS_OP Then
       GetIconCode = ICON_GAVEL
       Exit Function
   ElseIf (BNFLAGS_SYSOP And Flags) = BNFLAGS_SYSOP Then
       GetIconCode = ICON_SYSOP
       Exit Function
   ElseIf (BNFLAGS_SQUELCH And Flags) = BNFLAGS_SQUELCH Then
       GetIconCode = ICON_SQUELCH
       Exit Function
   ElseIf (BNFLAGS_GLASSES And Flags) = BNFLAGS_GLASSES Then
       GetIconCode = ICON_GLASSES
       Exit Function
   ElseIf Flags = 48 Or Flags = 32 Then
       GetIconCode = ICON_SQUELCH
       Exit Function
   ElseIf Flags = 0 Then: GoTo Product
   End If
Product:
Select Case Mid(Client, 1, 4)
 Case "CHAT"
     Code = ICON_CHAT
 Case "STAR"
    Code = ICON_STAR
 Case "JSTR"
     Code = ICON_JSTR
 Case "SSHR"
     Code = ICON_SSHR
 Case "WAR3"
     Code = ICON_3RAW
 Case "D2DV"
     Code = ICON_D2DV
 Case "DSHR"
     Code = ICON_DSHR
 Case "D2XP"
     Code = ICON_D2XP
 Case "W2BN"
     Code = ICON_W2BN
 Case "SEXP"
     Code = ICON_SEXP
 Case "DRTL"
     Code = ICON_DRTL
 Case "W3XP"
     Code = ICON_W3XP
End Select

GetIconCode = Code
Exit Function
GetIconCode_Error:

End Function
Public Function GetIconCodeFLAGS(Optional ByVal Client As String, Optional ByVal Flags As Long) As Integer
Dim Code As Integer
Dim pA() As String
Dim Spawn As Integer
Dim stats As Boolean
On Error GoTo GetIconCode_Error
If Len(Client) > 4 Then stats = True
If Len(Client) > 0 Then
Statstring = Client

   If (BNFLAGS_BLIZZ And Flags) = BNFLAGS_BLIZZ Then
       GetIconCodeFLAGS = ICON_BLIZZ
       Exit Function
   ElseIf (BNFLAGS_OP And Flags) = BNFLAGS_OP Then
       GetIconCodeFLAGS = ICON_GAVEL
       Exit Function
   ElseIf (BNFLAGS_SYSOP And Flags) = BNFLAGS_SYSOP Then
       GetIconCodeFLAGS = ICON_SYSOP
       Exit Function
   ElseIf (BNFLAGS_SQUELCH And Flags) = BNFLAGS_SQUELCH Then
       GetIconCodeFLAGS = ICON_SQUELCH
       Exit Function
   ElseIf (BNFLAGS_GLASSES And Flags) = BNFLAGS_GLASSES Then
       GetIconCodeFLAGS = ICON_GLASSES
       Exit Function
   ElseIf Flags = 48 Then
       GetIconCodeFLAGS = ICON_SQUELCH
       Exit Function
   ElseIf Flags = 0 Then: GoTo Product
   End If
Product:
Select Case Mid(Client, 1, 4)
 Case "TAHC"
     Code = ICON_CHAT
 Case "RATS"
     Code = ICON_STAR
 Case "RTSJ"
     Code = ICON_JSTR
 Case "RHSS"
     Code = ICON_SSHR
 Case "VD2D"
     Code = ICON_D2DV
 Case "RHSD"
     Code = ICON_DSHR
 Case "3RAW"
     Code = ICON_3RAW
 Case "PX2D"
     Code = ICON_D2XP
 Case "NB2W"
   Code = ICON_W2BN
 Case "PXES"
   Code = ICON_SEXP
 Case "LTRD"
     Code = ICON_DRTL
 Case "W3XP"
     Code = ICON_W3XP
End Select
End If
GetIconCodeFLAGS = Code
Exit Function
GetIconCode_Error:

End Function
Title: Re:w3xp flags
Post by: Adron on October 29, 2003, 02:03 PM
I wish everyone posted their solutions when they found them outside the thread!
Title: Re:w3xp flags
Post by: ______ on October 29, 2003, 11:03 PM
even if the topic is more than a few weeks old?
Title: Re:w3xp flags
Post by: Spht on October 29, 2003, 11:13 PM
Quote from: ___/\___ on October 29, 2003, 11:03 PM
even if the topic is more than a few weeks old?

ESPECIALLY if the topic is more than a few weeks old.
Title: Re:w3xp flags
Post by: Crim-Training on October 30, 2003, 03:10 PM
i dont understand, this topic is a whole couple of days old, unless i fell asleep for a few weeks, which could of happened
Title: Re:w3xp flags
Post by: Adron on October 31, 2003, 10:24 AM
It's common for questions related to the comment, not to the actual thread, to be posted...

But I agree, if you find a solution on your own or somewhere else, please post it here so that someone else having the same problem will find it when they search the forum.