Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: EviL_MarinE on January 16, 2005, 11:22 AM

Title: Icons :(
Post by: EviL_MarinE on January 16, 2005, 11:22 AM
Go to the bottom, 1st post from the last = My problem
Title: Re: Icons :(
Post by: UserLoser. on January 16, 2005, 11:51 AM
Looks like you're missing the resource file
Title: Re: Icons :(
Post by: EviL_MarinE on January 17, 2005, 09:50 AM
On my bot i can tell it to give a icon, but i cant get it to give the proper icon its s'pose to have.
    ____________________________________
> Example: if using starcraft, have the s.c icon <
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Here is my code:


    If (Bnetsocket.State <> 8) And (Bnetsocket.State <> 9) Then
        Bnetsocket.GetData s, vbString
       'a = Split(s, Chr(13))
   
       
       End If
        For i = LBound(a) To UBound(a)
       
        If Left(a(i), 1) = Chr(10) Then a(i) = Right(a(i), Len(a(i)) - 1)
            e = Split(a(i), Chr(32), 1)
         

        If Mid(Data, 5, 1) = Chr(1) Then
                   
                    p = Split(a(i), Chr(32), 5)
                    p(4) = Mid(p(4), 2, Len(p(4)) - 2)
            n = 0
                  ' Msgbox
                    Select Case p(4)
                        Case CHAT: n = ICON_CHAT
                        Case DRTL: n = ICON_DRTL
                        Case DSHR: n = ICON_DSHR
                        Case STAR: n = ICON_STAR
                        Case SSHR: n = ICON_SSHR
                        Case JSTR: n = ICON_JSTR
                        Case SEXP: n = ICON_SEXP
                        Case W2BN: n = ICON_W2BN
                        Case D2DV: n = ICON_D2DV
                        Case D2XP: n = ICON_D2XP
                        Case WAR3: n = ICON_WAR3
                        Case Else: n = ICON_UNKNOWN
                    'End Select
                       End Select
                     
                     'MsgBox n
                     ListView1.ListItems.Add , , Username, , n

          'End Select
          'MsgBox n
          End If


This is the code from "Assbot" i know, but i am using it for tests on how to add icons ect... I was fiddling around and cant give it to give the correct icon it is s'pose to have.
On Assbot it has

                    If (HexToDec(CLng(p(3)))) And (FLAG_BLIZZARD) Then n = ICON_BLIZZARD
                    If (HexToDec(CLng(p(3)))) And (FLAG_OP) Then n = ICON_OP
                    If (HexToDec(CLng(p(3)))) And (FLAG_SPEAKER) Then n = ICON_SPEAKER
                    If (HexToDec(CLng(p(3)))) And (FLAG_SYSADMIN) Then n = ICON_SYSADMIN
                    If (HexToDec(CLng(p(3)))) And (FLAG_SQUELCHED) Then n = ICON_SQUELCHED
                    If (HexToDec(CLng(p(3)))) And (FLAG_SPECTATOR) Then n = ICON_SPECTATOR

on the end of there Chr(1) part.

I put that on mine and it just gives the icon of "Spectator" - Glasses

Has anybody got any ideas? Would be appreciated =] ;D ;D ;D :D ;)
Title: Re: Icons :(
Post by: pianka on January 17, 2005, 10:05 AM
You may want to make sure all of those globals are actually declared.  Also make sure they correspond with your image list as opposed to the Assbot resource file.
Title: Re: Icons :(
Post by: EviL_MarinE on January 17, 2005, 10:12 AM
I have put the assbot resource file in my bot for tests.

All of the things are delcared, i think.

But if u notice
Quote from: EviL_MarinE on January 17, 2005, 09:50 AM

'a = Split(s, Chr(13))




I have put the " '  " cos if i dont it duplicates the name in the lists, any helps?
Title: Re: Icons :(
Post by: EviL_MarinE on January 20, 2005, 09:34 AM
Umm hey. Dont Take notice of any of the previous posts!


I have figured out to use icons ect... But the only thing i cant work out is, how to give the proper icon they should have

eg: icon_star if product = starcraft

I had a little go @ it and it failed teribly, i have no ideas on what to put atm. I dont want anybody to post code because i would like to do it myself :) but if you could atleast talk about how i should cod it or something?

thanks in advance people :D;):):p
Title: Re: Icons :(
Post by: EviL_MarinE on January 21, 2005, 10:40 AM
No ideas?  :'( :'( :'(
Title: Re: Icons :(
Post by: Kp on January 21, 2005, 12:40 PM
Quote from: EviL_MarinE on January 21, 2005, 10:40 AM
No ideas?  :'( :'( :'(

Or just no interest.  You allowed barely 25 hours for a response, which is nothing when you consider most of the people here don't want to debug your program for you.
Title: Re: Icons :(
Post by: EviL_MarinE on January 21, 2005, 01:23 PM
Lol, just lol.