Valhalla Legends Forums Archive | Battle.net Bot Development | Re: Lag Icon

AuthorMessageTime
Guest
and i using BNLS also
February 16, 2003, 7:30 PM
Yoni
BNLS has nothing to do with ListView issues.
Most of the people on this forum are unfamiliar with Etheran's code so that is pretty much meaningless.

Basically, to add icons to a listview, you have to add an imagelist control, add the icons to the imagelist, associate the listview with the imagelist, and then specify an image index when adding the item.
February 16, 2003, 7:34 PM
haZe
ill tell you how to do it: use/write your own code.
February 16, 2003, 7:37 PM
Guest
you idiot what does writing my own code have to do with it... stealth bot uses etherans getlagicon code??? And iam not having problems with finding out what lag icon to use??? so shhhh if you not going to help(talking to cow no yoni)???umm i not sure how to add both though i did all that.. Yoni.. but i dont know about lag icon

[code] If Product = "Warcraft II" Then
 lvChannel.ListItems.Add , , Username, , 8[/code]
i have that and etc.. where/what do i put to add lag icon
February 16, 2003, 7:48 PM
Coltz
If your using etheran's code then why don't you just see how etheran did it?  It's not that hard to find
February 16, 2003, 7:58 PM
Guest
i tried his way but it was blank it didnt show the icon  ???
February 16, 2003, 8:03 PM
Guest
can someone please help me  ???
February 16, 2003, 8:11 PM
Noodlez
Dim LagIcon as integer
LagIcon = GetLagIcon(ping)
lvwUsers.ListItems.Add ,,username,,icon
lvwUsers.FindItem(username).ListSubItems.Add ,,,,icon


I suggest not calling other people idiots, when you don't know how to use a ListView. Also, haze isn't that a bit hypocritial of you, do you not use CSB?
February 16, 2003, 8:39 PM
JaMi
LOL just out of curiousity about Haze's comment "use/write your own code" isnt he the one that ends every one of his posts with "if your not going to help then dont answer" ?
February 16, 2003, 9:07 PM
kamakazie
Probably would be better to do:

[code]
Dim ListUser As ListItem
   
Set ListUser = lvwUsers.ListItems.Add(, , UserName, , UserIcon)
ListUser.ListSubItems.Add , , , GetLagIcon(UserPing)
[/code]

Noodlez: why would you add the user's icon for their ping?
Edit:  Also, Noodlez, if you're going to use FindItem, it would probably best to set fPartial to False so as to not return "User#2" when you're really looking for "User".
February 16, 2003, 9:10 PM
Guest
i get no error but the lag icon is not there?? :'(
February 16, 2003, 10:05 PM
kNiGhT
haze ur fucking newb.  u flame ppl who are asking for some help and yet on like every single one of ur posts asking for some help u put "no flame plz, only respond if ur actually going to help". i am not a very good programmer as i know ur not also but u dont see me going around flaming ppl. whore
February 16, 2003, 10:06 PM
tA-Kane
[quote]u dont see me going around flaming ppl. whore[/quote]
Except now.
February 16, 2003, 10:25 PM
Guest
it only adds product icon and username  ???  :'(
February 16, 2003, 10:26 PM
kNiGhT
i only flame haze b/c i semi know who he is and im not really flaming him for his skill at programming im flaming him in general
February 16, 2003, 10:28 PM
MesiaH
[quote]stealth bot uses etherans getlagicon code???[/quote]

id just like to add that stealth bot is a joke, if you think its a good bot, expand your horizons, its all open source bull shit thrown together in one bot, and a nice tic tac toe game downloaded from planet source code.
February 17, 2003, 12:02 AM
Noodlez
[quote]Probably would be better to do:

[code]
Dim ListUser As ListItem
   
Set ListUser = lvwUsers.ListItems.Add(, , UserName, , UserIcon)
ListUser.ListSubItems.Add , , , GetLagIcon(UserPing)
[/code]

Noodlez: why would you add the user's icon for their ping?
Edit:  Also, Noodlez, if you're going to use FindItem, it would probably best to set fPartial to False so as to not return "User#2" when you're really looking for "User".[/quote]

What do you mean the user icon? The first icon I added was the product icon, although I didn't show the GetIcon() for that
February 17, 2003, 1:47 AM
kamakazie
[quote]
Dim LagIcon as integer
LagIcon = GetLagIcon(ping)
lvwUsers.ListItems.Add ,,username,,icon
lvwUsers.FindItem(username).ListSubItems.Add ,,,,icon
[/quote]

Notice how the two words in bold & italic are the same.  Assuming icon is the index of the user's icon, you're adding it twice. That second icon should be LagIcon.
February 17, 2003, 2:10 AM
Noodlez
ack, that was an accident :p

btw, does your listview have a colum for lagicon?
February 17, 2003, 2:55 AM
Guest
Yes.. for testing i put the exact same listview settings as etheran bot's listview  ??? there is 2 colums and the one on right is blank where lagicon should be..i meant user icon as product icon, game icon, etc

[code] ElseIf Product = "Starcraft: Broodwar" Then
  Set ListUser = lvChannel.ListItems.Add(, , Username, , 3)
ListUser.ListSubItems.Add , , , GetLagIcon(Ping)[/code]

i have it dimed at the top "Dim ListUser As ListItem"

is that right?? and i have this on formload
lvChannel.SmallIcons = imgPics so anything else?? that i should check?
February 17, 2003, 11:48 AM
Zakath
Do you have to expressely set the LVS_EX_SUBITEMIMAGES style in VB? You have to do that in C before you can display multiple images in a single row in a listview (well, unless you owner-draw it, of course).
February 17, 2003, 3:24 PM
celluloid
i believe his problem is the fact he "DOESNT!" have the lag images in his imagelist  :-X  :P
February 18, 2003, 3:00 PM
Zakath
That would indeed cause problems. :P
February 18, 2003, 5:25 PM
Stealth
StealthBot actually doesn't use Etheran's code to assign icons. The only aspect of my program I used any part of EBBot for was to find the -scale- used in assigning ping icons.

[quote]

id just like to add that stealth bot is a joke, if you think its a good bot, expand your horizons, its all open source bull shit thrown together in one bot, and a nice tic tac toe game downloaded from planet source code.[/quote]

MesiaH, I really had more respect for you than that. I did, in fact, write my own code for an overwhelming majority of the 4500-some lines of code that make up StealthBot's current build. I spent a day or two writing the Tic Tac Toe system and getting all the protocol kinks worked out of it.

I have spent far too many hours grappling with Visual Basic to be ridiculed like that. Admittedly, I have used open source code. But not for the backbone of the bot, its command structure, GUI and the like. My open source code usage is limited to the structure of Winamp APIs, system tray minimization, and Grok's fantastic and ubiquitous AddChat subroutine ((which I modified myself after version 1.6 to automatically add timestamps to each line)). In the case of EBBot, I used Etheran's code as a reference so that I wouldn't have to research which ping times corresponded to which lag icon. Considering that I have not had Starcraft installed for a good six months now, this shouldn't be unreasonable.

Systray minimization, APIs, variant use.. when I started programming the bot, much of the stuff I use much more commonly now was way over my head. My knowledge has grown substantially, but admittedly is nowhere near most of vL's (and probably your own) work with VB. That's perfectly alright with me, I don't really care to be the best; but when someone has the guts to make a comment like you did, it's just sad.

Thank you.
February 19, 2003, 6:48 PM
K
Wow, a well written, well thought out post...someone alert the feds so they can remove this intelligence from the forum before it spreads!
February 19, 2003, 7:20 PM
St0rm.iD
So you wrote CheckRevision?
February 19, 2003, 9:19 PM
Stealth
Never claimed I did. The connection is handled by CleanSlateBot, which proved a means for me to program the rest of the bot without dealing with Winsock. I am now, however beginning to deal with Winsock as an error has caused CSB to return Index Out Of Bounds on Warcraft 3 logins. Now that I have a far better understanding of some of the more advanced functions it will not be as difficult as if I had started from scratch.

My argument was aimed at MesiaH, who attacked my program as "open source bull shit"; which it certainly is not.
February 19, 2003, 9:29 PM
JaMi
very well put stealth~ Your personal like/dislike of a bot(Mesiah), isn't a reason to flam the creator, he still put a lot of hardwork into it.
February 19, 2003, 10:33 PM
Noodlez
actually, using CSB is perfectly good reason to flame some one for making a bot.

when you add CSB to a project your not making a bot, your adding features to an existing bot.
February 20, 2003, 1:27 AM
ioSys
Kane, Knight has got a point here  ;)
February 20, 2003, 6:32 AM
St0rm.iD
I love how you can install a language too.
February 22, 2003, 11:17 PM
Yoni
[quote]I love how you can install a language too.[/quote]
:P
People in my HS programming class kept asking me to send them C for a while.
February 23, 2003, 2:54 PM
St0rm.iD
Better than "visual basics"
February 25, 2003, 5:10 PM

Search