• Welcome to Valhalla Legends Archive.
 

Event: Flags_Change ( 0xF )

Started by BaDDBLooD, April 03, 2004, 05:32 PM

Previous topic - Next topic

BaDDBLooD

Private Sub ChatBot_OnFlags(ByVal username As String, ByVal Flags As Long, ByVal message As String, ByVal Ping As Long)



Dim Bot As New clsBnetBot
   
   If (BNFLAGS_OP And Flags) = BNFLAGS_OP Then
       frmMain.lstChannel.ListItems.Remove frmMain.lstChannel.FindItem(username).Index
       With frmMain.lstChannel
           .ListItems.Add 1, , username, , Bot.GetIconCode(message, Flags)
           .ListItems(1).ListSubItems.Add , , , Bot.GetPingCode(Ping, Flags)
           .ListItems(1).ToolTipText = username & " [ " & Ping & " ms ] " & Flags & " Moderator"
       End With
       If BType.Joins = True Then
           AddChat vbGreen, username & " [ " & Ping & " ms ] " & Flags & " Flags Has acquired operator status."
       Else: End If
   End If
   
   For X = 1 To frmMain.lstChannel.ListItems.Count
       If frmMain.lstChannel.ListItems.Item(X).text = username Then
           With frmMain.lstChannel
               .ListItems.Item(X).SmallIcon = Bot.GetIconCode(message, Flags)
           End With
       End If
   Next X

End Sub



i tested this code, and when my War3 ops rejoined, i had 2 in the userlist, with no operator icon.

Any help would be apreciated, if you need further code.. just ask!

Note: the GetIconCode does work, because i can see the Names in the listview before this event fires!
There are only two kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.

Newby

Check your OnUser sub. That may be the problem.
- Newby

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote<TehUser> Man, I can't get Xorg to work properly.  This sucks.
<torque> you should probably kill yourself
<TehUser> I think I will.  Thanks, torque.

BaDDBLooD

#2


Private Sub ChatBot_OnUser(ByVal username As String, ByVal Flags As Long, ByVal message As String, ByVal Ping As Long)

Dim Bot As New clsBnetBot, ParsedString As String
   Call ParseStatString(message, ParsedString)

If Flags = "2" Then
   With frmMain.lstChannel
       .ListItems.Add 1, , username, , Bot.GetIconCode(message, Flags)
       .ListItems(1).ListSubItems.Add , , , Bot.GetPingCode(Ping, Flags)
       .ListItems(1).ToolTipText = username & " [ " & Ping & " ms ] " & Flags & " Moderator"
   End With
Else
   With frmMain.lstChannel
       .ListItems.Add , , username, , Bot.GetIconCode(message, Flags)
       .ListItems(.ListItems.Count).ListSubItems.Add , , , Bot.GetPingCode(Ping, Flags)
       .ListItems(.ListItems.Count).ToolTipText = ParsedString & " [ " & Ping & " ms ] " & Flags
   End With
End If

frmMain.txtChannelInfo = BType.CurrentChannel & " ( " & frmMain.lstChannel.ListItems.Count & " )"

End Sub



merry christmas to you all ;)

EDIT: i still need help ;)~
There are only two kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.

Newby

Does that mean you fixed it? Or does that mean you still need help? :P
- Newby

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote<TehUser> Man, I can't get Xorg to work properly.  This sucks.
<torque> you should probably kill yourself
<TehUser> I think I will.  Thanks, torque.

effect

How about your write your own "GetIconCode" sub and dont use the public eth bot one. Just for starters...
Quote from: Mangix on March 22, 2005, 03:03 AM
i am an expert Stealthbot VBScript. Recognize Bitch.

BaDDBLooD

There are only two kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.

effect

Icidentally you used the same naming convention as Ethbot , interesting. The icon's that arnt showing what product was/is the user on? have you loaded that image into your image list?
Quote from: Mangix on March 22, 2005, 03:03 AM
i am an expert Stealthbot VBScript. Recognize Bitch.

BaDDBLooD

#7
i can post my geticon code if you want me to

the icon is loaded in my image list, it's warcraft III, i will try it with Other icon's to see if it makes a difference ;O

EDIT: Nm no i can't my cdkey is in use =\
There are only two kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.

ChR0NiC

Actually I believe BaDDBLooD is using a convention from either Dr Bot or Soup Bot which may have originally come from Eth.

MyndFyre

Back to the topic, ahem...

The reason it's happenning is that Blizzard sends two events for a Warcraft 3 user, either gaining ops in a clan channel, changing the icon in the channel, getting the tag in a clan channel, or levelling in a clan channel.  They are EVENT_JOIN and then EVENT_SHOW.

You have to check your EVENT_SHOW (that is, the User event) to make it check your list to see if the user you are changing is already in the channel.  If so, update that user.  Otherwise, add it.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

FuzZ

I didn't read these posts, this is how I do mine.

Private Sub Event_Flags(strUser As String, strFlag As Long, strStatString As String, ping As Long)
   Dim p As String
   Dim N&
   If (strFlag And FLAGS_OP) = FLAGS_OP Then
       p = Trim$(StrReverse(Left$(strStatString, 4)))
       Select Case p
           Case CHAT: N = ICON_CHAT
           Case DRTL: N = ICON_DRTL
           Case DSHR: N = ICON_DSHR
           Case W2BN: N = ICON_W2BN
           Case STAR: N = ICON_STAR
           Case JSTR: N = ICON_JSTR
           Case SSHR: N = ICON_SSHR
           Case SEXP: N = ICON_SEXP
           Case D2DV: N = ICON_D2DV
           Case D2XP: N = ICON_D2XP
           Case WAR3: N = ICON_WAR3
           Case W3XP: N = ICON_W3XP
           Case Else: N = ICON_UNKNOWN
       End Select
   End If
   If (strFlag And FLAGS_OP) = FLAGS_OP Then: N = ICON_OP
   If (strFlag And FLAGS_BLIZZ) = FLAGS_BLIZZ Then: N = ICON_BLIZZ
   If (strFlag And FLAGS_SPKR) = FLAGS_SPKR Then: N = ICON_SPEAKER
   If (strFlag And FLAGS_SYSOP) = FLAGS_SYSOP Then: N = ICON_SYSOP
   If strUser <> BNet.CUser Then
       If (strFlag And FLAGS_SQUELCH) = FLAGS_SQUELCH Then: N = ICON_SQUELCH
   End If
   If (strFlag And FLAGS_GLASSES) = FLAGS_GLASSES Then: N = ICON_SPECTATOR
   If (strFlag And FLAGS_GFPLAYER) = FLAGS_GFPLAYER Then: N = ICON_GFP
   If N = ICON_UNKNOWN Then
       Open App.Path & "\Unknown.txt" For Append As #1
        Print #1, strUser & " " & strStatString & " " & strFlag & " " & ping
       Close #1
   End If
   If N = ICON_OP Then
       If LCase$(strUser) = LCase$(BNet.CUser) Then
           AddChat frmBNet.rtbChat, vbYellow, "You are now operator for this channel."
       Else
           AddChat frmBNet.rtbChat, vbYellow, strUser & " is now operator for this channel."
       End If
   End If
   EditNick strUser, N
   AddChat frmBNet.rtbChat, vbYellow, "User: " & strUser & " Flags: " & strFlag & " strStatString: " & statstring & " Ping: " & ping
End Sub


EditNick:

Public Sub EditNick(ByVal strName$, lngIcon&)
   With frmBNet.lstNicks
       Dim aIX
       aIX = .FindItem(strName).Index
       .ListItems(aIX).Icon = lngIcon
       .ListItems(aIX).SmallIcon = lngIcon
   End With
End Sub


these are based off from AssBot

MyndFyre

Quote from: FuzZ on April 03, 2004, 07:14 PM
these are based off from AssBot

Does that mean you copied it?
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Eli_1

#12
Why are you all constantly accusing people of copying code...

BaDDBLooD

#13
Quote from: ChR0NiC on April 03, 2004, 06:51 PM
Actually I believe BaDDBLooD is using a convention from either Dr Bot or Soup Bot which may have originally come from Eth.

i wrote the code for every event, although i did not create the code for my 0xF.  Shadowed gave me the parsing into events function. ( Although i could right my own now that i am more advanced than i was )

admin, please delete posts like this.

edit: including this post

There are only two kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.

Archangel

Quote from: BaDDBLooD on April 04, 2004, 02:02 PM
Quote from: ChR0NiC on April 03, 2004, 06:51 PM
Actually I believe BaDDBLooD is using a convention from either Dr Bot or Soup Bot which may have originally come from Eth.

i wrote the code for every event, although i did not create the code for my 0xF.  Shadowed gave me the parsing into events function. ( Although i could right my own now that i am more advanced than i was )

admin, please delete posts like this.

edit: including this post



Wow is just an opinion, i think people can give opinions about stuff, why would u want a admin to delete this post?
I'm not an Addict.