Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Guest on February 16, 2003, 01:30 PM

Title: Re: Lag Icon
Post by: Guest on February 16, 2003, 01:30 PM
and i using BNLS also
Title: Re: Lag Icon
Post by: Yoni on February 16, 2003, 01:34 PM
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.
Title: Re: Lag Icon
Post by: haZe on February 16, 2003, 01:37 PM
ill tell you how to do it: use/write your own code.
Title: Re: Lag Icon
Post by: Guest on February 16, 2003, 01:48 PM
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

If Product = "Warcraft II" Then
  lvChannel.ListItems.Add , , Username, , 8

i have that and etc.. where/what do i put to add lag icon
Title: Re: Lag Icon
Post by: Coltz on February 16, 2003, 01:58 PM
If your using etheran's code then why don't you just see how etheran did it?  It's not that hard to find
Title: Re: Lag Icon
Post by: Guest on February 16, 2003, 02:03 PM
i tried his way but it was blank it didnt show the icon  ???
Title: Re: Lag Icon
Post by: Guest on February 16, 2003, 02:11 PM
can someone please help me  ???
Title: Re: Lag Icon
Post by: Noodlez on February 16, 2003, 02:39 PM
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?
Title: Re: Lag Icon
Post by: JaMi on February 16, 2003, 03:07 PM
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" ?
Title: Re: Lag Icon
Post by: dxoigmn on February 16, 2003, 03:10 PM
Probably would be better to do:

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

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".
Title: Re: Lag Icon
Post by: Guest on February 16, 2003, 04:05 PM
i get no error but the lag icon is not there?? :'(
Title: Re: Lag Icon
Post by: kNiGhT on February 16, 2003, 04:06 PM
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
Title: Re: Lag Icon
Post by: tA-Kane on February 16, 2003, 04:25 PM
Quoteu dont see me going around flaming ppl. whore
Except now.
Title: Re: Lag Icon
Post by: Guest on February 16, 2003, 04:26 PM
it only adds product icon and username  ???  :'(
Title: Re: Lag Icon
Post by: kNiGhT on February 16, 2003, 04:28 PM
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
Title: Re: Lag Icon
Post by: Mesiah / haiseM on February 16, 2003, 06:02 PM
Quotestealth bot uses etherans getlagicon code???

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.
Title: Re: Lag Icon
Post by: Noodlez on February 16, 2003, 07:47 PM
QuoteProbably would be better to do:

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

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".

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
Title: Re: Lag Icon
Post by: dxoigmn on February 16, 2003, 08:10 PM
QuoteDim LagIcon as integer
LagIcon = GetLagIcon(ping)
lvwUsers.ListItems.Add ,,username,,icon
lvwUsers.FindItem(username).ListSubItems.Add ,,,,icon

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.
Title: Re: Lag Icon
Post by: Noodlez on February 16, 2003, 08:55 PM
ack, that was an accident :p

btw, does your listview have a colum for lagicon?
Title: Re: Lag Icon
Post by: Guest on February 17, 2003, 05:48 AM
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

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

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?
Title: Re: Lag Icon
Post by: Zakath on February 17, 2003, 09:24 AM
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).
Title: Re: Lag Icon
Post by: celluloid on February 18, 2003, 09:00 AM
i believe his problem is the fact he "DOESNT!" have the lag images in his imagelist  :-X  :P
Title: Re: Lag Icon
Post by: Zakath on February 18, 2003, 11:25 AM
That would indeed cause problems. :P
Title: Re: Lag Icon
Post by: Stealth on February 19, 2003, 12:48 PM
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.

Quoteid 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.

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.
Title: Re: Lag Icon
Post by: K on February 19, 2003, 01:20 PM
Wow, a well written, well thought out post...someone alert the feds so they can remove this intelligence from the forum before it spreads!
Title: Re: Lag Icon
Post by: Banana fanna fo fanna on February 19, 2003, 03:19 PM
So you wrote CheckRevision?
Title: Re: Lag Icon
Post by: Stealth on February 19, 2003, 03:29 PM
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.
Title: Re: Lag Icon
Post by: JaMi on February 19, 2003, 04:33 PM
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.
Title: Re: Lag Icon
Post by: Noodlez on February 19, 2003, 07:27 PM
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.
Title: Re: Lag Icon
Post by: ioSys on February 20, 2003, 12:32 AM
Kane, Knight has got a point here  ;)
Title: Re: Lag Icon
Post by: Banana fanna fo fanna on February 22, 2003, 05:17 PM
I love how you can install a language too.
Title: Re: Lag Icon
Post by: Yoni on February 23, 2003, 08:54 AM
QuoteI love how you can install a language too.
:P
People in my HS programming class kept asking me to send them C for a while.
Title: Re: Lag Icon
Post by: Banana fanna fo fanna on February 25, 2003, 11:10 AM
Better than "visual basics"