• Welcome to Valhalla Legends Archive.
 

icon trouble

Started by QwertyMonster, January 29, 2005, 09:47 AM

Previous topic - Next topic

QwertyMonster

Quote from: Warrior on February 04, 2005, 08:00 AM

Was that so hard?

No, but it still doesnt help me with icons either.

Back on track, any ideas..

Warrior

but my other post did, try rereading my posts.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

QwertyMonster

Quote from: Warrior on February 03, 2005, 07:05 PM
Are you initializing the imagelist?

Yes.

Ok my bot adds icons when i tell it to, but it doesnt add the proper product icons, ideas?

UnLeaDeD

Icons.bni is nice because everytime bnet comes out with a new icon its automatically read. Just a thought.

Warrior

If he cant get icons from an imagelist to work how in the hell do you expect him to view them directly from the .bni file?
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

UnLeaDeD

:P
Icon = GetIconCode(Message, Flags)
If Icon = ICON_GAVEL Then
    Form1.Roomlist.ListItems.Add 1, , Username, , Icon
        Form1.Roomlist.ListItems(1).ListSubItems.Add , , , Ping
        Form1.Roomlist.ListItems(1).ListSubItems.Add , , Ping
Else
    Form1.Roomlist.ListItems.Add , , Username, , Icon
        Form1.Roomlist.ListItems(Form1.Roomlist.ListItems.Count).ListSubItems.Add , , , Ping
        Form1.Roomlist.ListItems(Form1.Roomlist.ListItems.Count).ListSubItems.Add , , Ping
End If

QwertyMonster

#21
Uh ok, i was trying and i have this:


Public Function geticon(Optional ByVal Username As String, Optional ByVal Product As String)

Select Case Mid(Client, 1, 4)
  Case "RATS"
   geticon = 6
  Case "PXES"
   geticon = 9
  Case "STAR"
   geticon = 6
   Case "SEXP"
   geticon = 9
    End Select
    End Function


Just to test out starcraft and broodwar.


icon = Events.geticon


    If Mid(Data, 5, 1) = Chr(1) Then
           
           MsgBox icon
           ListView1.ListItems.Add , , Username, , icon
       End If



Icon comes up as: 99222161

Any ideas people? I will keep trying :(


Edit: I keep getting different numbers, why?!

Edit2: After mcuking around for a while, i finally see that the "Product" is being sent back as "0". And 0 is nothing in my bot so it wont show anything. Any Ideas on how i can get sent the proper product? Maybe i am sending something off wrong? Hmm, ideas please?

Joe[x86]

Declare your icon integers, such as..
Public Const iSTAR as Integer = 1

Public Function GetIconCode(Product as String) as Integer
    Select Case UCase(Product)
        Case "RATS", "STAR"
            GetIconCode = iSTAR
            Exit Sub
        Case '// Some other product code..
            GetIconCode = '// The coresponding integer constant
            Exit Sub
        Case Else
            GetIconCode = iSQUELCH '// I guess people make a habbit of making people with unknown icon codes squelched. Hmpg.
            Exit Sub
    End Select
End Function

Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.