im having trouble with this..
Private Sub CSB_UserInChannel(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, ByVal Product As String, StatUpdate As Boolean, SimulatedEvent As Boolean)
Dim producticon As Integer
Dim lagicon As Integer
producticon = iGetProduct(Product, Flags)
lagicon = iGetPing(Ping)
If producticon = iOPS Then
ChannelView.ChannelView.add1 , , "test", , 1
ChannelView.ListSubItems.Add , , , lagicon
Else
With ChannelView.ListItems.Add(, , Username, , producticon)
.ListSubItems.Add , , , lagicon
End With
End If
End Sub
ChannelView.ChannelView.add1 , , "test", , 1
that part is highlighted... please help
I think the problem is "add1"
do you know what to change it too? I've tried changing it a lot.. and it wont seem to work..
It should be ListItems.Add, not Add1
ok.. im now using ..
Dim producticon As Integer
Dim lagicon As Integer
Dim Product As String
lagicon = iGetPing(Ping)
Product = Mid(Message, 4, 1) & Mid(Message, 3, 1) & Mid(Message, 2, 1) & Left(Message, 1)
producticon = iGetProduct(Product, Flags)
ChannelView.ListItems.Remove ChannelView.FindItem(Username).Index
If producticon = iOPS Then
With ChannelView.ListItems.Add(1, , Username, , producticon)
.ListSubItems.Add , , , lagicon
End With
Else
With ChannelView.ListItems.Add(, , Username, , producticon)
.ListSubItems.Add , , , lagicon
End With
End If
but it still wont work..
Heres wut i use:
Private Sub CleanSlateBot1_UserInChannel(ByVal username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, ByVal Product As String, StatUpdate As Boolean, SimulatedEvent As Boolean)
strJSTR = Product
strSexp = Product
strSTAR = Product
strd2 = Product
strD2XP = Product
strW2BN = Product
strw3 = Product
strDiablo = Product
strW3XP = Product
Dim icon As Integer
Dim lagicoN As Integer
If icon = ICON_GAVEL Then
With Form1.lvChannel.ListItems.Add(1, username, username, , icon)
.ListSubItems.Add lvChannel.FindItem(username).Index, , , lagicoN
End With
End If
If icon <> ICON_GAVEL Then
With Form1.lvChannel.ListItems.Add(, , username, , icon)
.ListSubItems.Add , , , lagicoN
End With
End If
ok the above still wont work..
I tried using..
'Private Sub CSB_UserInChannel(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, ByVal Product As String, StatUpdate As Boolean, SimulatedEvent As Boolean)
'Username = Replace(Username, "*", vbNullString)
'Dim ProductIcon As Integer, LagIcon As Integer
'ProductIcon = iGetProduct(Product, Flags)
'LagIcon = IIf(Flags = 16 Or Flags = 18 Or Flags = 48 Or Flags = 50, PLUG, iGetPing(Ping))
'
' If ProductIcon = OPS Then
' With ChannelView.ListItems.Add(1, , Username, , ProductIcon)
' .ListSubItems.Add , , , LagIcon
' .ToolTipText = "Ping: " & Ping & " Flags: " & Flags
' 'change Tool Tip to w/e you want
' End With
' Else
' With ChannelView.ListItems.Add(, , Username, , ProductIcon)
' .ListSubItems.Add , , , LagIcon
' .ToolTipText = "Ping: " & Ping & " Flags: " & Flags
'change tool tip here aswell (if u want)
' End With
' End If
'lblChannel.Caption = Channel & " (" & ChannelView.ListItems.Count & ")"
'change lblChannel.Caption to the name of the label/textbox u called it
'End Sub
without the 's of course.. I think ill stick with no icons for now.. can anyone tell me that...?
I think no icons is good, my bots prettty stable now with its commands and i do not use icons, not using icons also allows u to connect to servers like us-best.net with no trouble.
Its the emulation server's own fault for not doing thier Flag Updates correctly.
how would i go about making a channel list.. without icons.. :(
1. Does ChannelView have 2 columns or 1?
2. Did you add the ImageList?
3. Does that ImageList have any icons in it?
4. Giveing up defeats the purpose of trying to be better :P
1.2
2.yes
3.yes
4. this is my first version of my first bot.. so i think no icons would be ok for now..
Zeth! Why did you leave me! I can fix it!
UserJoins:
Private Sub CSB_UserJoins(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, ByVal Product As String, SimulatedEvent As Boolean)
AddChat vbWhite, Username & " joined the channel"
Dim producticon As Integer
Dim lagicon As Integer
producticon = iGetProduct(Product, Flags)
lagicon = iGetPing(Ping)
If producticon = iOPS Then
With lvChannel.ListItems.Add(1, , Username, , producticon)
.ListSubItems.Add , , , lagicon
End With
Else
With lvChannel.ListItems.Add(, , Username, , producticon)
.ListSubItems.Add , , , lagicon
End With
End If
End Sub
Userleaves:
Private Sub CSB_UserLeaves(ByVal Username As String, ByVal Flags As Long, SimulatedEvent As Boolean)
AddChat vbWhite, Username & " has left the channel"
On Error Resume Next
lvChannel.ListItems.Remove ChannelView.FindItem(Username).Index
End Sub
UserInChannel:
Private Sub CSB_UserInChannel(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, ByVal Product As String, StatUpdate As Boolean, SimulatedEvent As Boolean)
Dim producticon As Integer
Dim lagicon As Integer
producticon = iGetProduct(Product, Flags)
lagicon = iGetPing(Ping)
If producticon = iOPS Then
With lvChannel.ListItems.Add(1, , Username, , producticon)
.ListSubItems.Add , , , lagicon
End With
Else
With lvChannel.ListItems.Add(, , Username, , producticon)
.ListSubItems.Add , , , lagicon
End With
End If
End Sub
Kinda.. ignore the icon stuff.. my bot uses that exact code and no icons show up ;)
That code asumes that you use lvChannel for for your channel LV
Thanks to Darkness[e1] for the Channel List code. Thanks to CupHead for CSB :)
Quote from: JoeTheOdd on September 28, 2004, 10:35 AMThanks to CupHead for CSB :)
Burn in hell, CupHead!
oops, I am off topic and a moderator :p
:) YOUR CODE WORKS! weee.. ty lol
Quote from: Grok on September 28, 2004, 02:50 PM
Quote from: JoeTheOdd on September 28, 2004, 10:35 AMThanks to CupHead for CSB :)
Burn in hell, CupHead!
oops, I am off topic and a moderator :p
I think grok snapped -.-, EVERYONE RUN GROKS GONE MAD!@!@!@
pointless post.........