Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Twitch on July 25, 2004, 03:08 PM

Title: Help me /w this please?
Post by: Twitch on July 25, 2004, 03:08 PM
Hi.  I have been learning Visual Basic 6 for some time now and these past few months ive been studying how bots are made thx to these forums/site :D.  

Anyways, lets get to the point.  I have recently started making a very basic chat bot using CSB (yes im a newb, wanna fight about it?) and i would like to enhance/add some new features.

For now i just ask this..   I would like to add another label above the list of people who are in the channel (lvChannel) and i have looked at other sources but that doesnt really help..    can someone help me here ?
Title: Re:Help me /w this please?
Post by: warz on July 25, 2004, 03:33 PM
You'd like to add a label above your list view? Such as a label saying "X number of people in Y channel" ? Just drop a label, or text box or whatever you like above it, and set the text accordingly.
Title: Re:Help me /w this please?
Post by: Twitch on July 25, 2004, 03:41 PM
well i don't really know how..   i mean i have an idea of how to code it but its a blury idea lol..    I appreciate the help though warz.
Title: Re:Help me /w this please?
Post by: Maddox on July 25, 2004, 03:44 PM
You said you have been learning VB6, but yet you don't know how to make a simple label. Maybe you should start back at square one.
Title: Re:Help me /w this please?
Post by: warz on July 25, 2004, 03:46 PM
Well, in your user_join() event, or user_leave() event, id suggest doing something along the lines of


lblLabelThing.caption = lstListview.count & " users in " & botinfo.current_channel


.. or something. General idea.

Edit:

Quote from: Maddox on July 25, 2004, 03:44 PM
You said you have been learning VB6, but yet you don't know how to make a simple label. Maybe you should start back at square one.

I also agree.   :-X
Title: Re:Help me /w this please?
Post by: warz on July 25, 2004, 04:38 PM
There's some listview function that gives the amount of items in it. MSDN it. I don't remember it.
Title: Re:Help me /w this please?
Post by: Twitch on July 25, 2004, 06:07 PM
well thanks warz..    you other people seem to be posting nonsense..    i suggest you shh ?

i work like all the time so i really didnt learn much of vb lol
i just like coding /w what i know..  even though most of it is source.

anyways, thx again warz
Title: Re:Help me /w this please?
Post by: Warrior on July 25, 2004, 06:53 PM
Quote from: Twitch on July 25, 2004, 06:07 PM
i really didnt learn much of vb lol

Dont make a bot.
Title: Re:Help me /w this please?
Post by: hismajesty on July 25, 2004, 08:34 PM
Quote from: Twitch on July 25, 2004, 06:07 PMyou other people seem to be posting nonsense..

Like what?

Quote from: Twitch on July 25, 2004, 06:07 PMi suggest you shh ?

What, you don't know if you suggest it or not?

Quote from: Twitch on July 25, 2004, 06:07 PMi work like all the time so i really didnt learn much of vb lol

If you've been learning VB for 'a while' that wouldn't matter, most first chapters demonstrate how to drop a label on the form.

Quote from: Twitch on July 25, 2004, 06:07 PMi just like coding /w what i know

Good, now go learn more! ;)

Quote from: Twitch on July 25, 2004, 06:07 PM..  even though most of it is source.

Brilliant! Source code that is source...
Title: Re:Help me /w this please?
Post by: Twitch on July 25, 2004, 10:02 PM
why do you people get so serious ?...    damn.  take a joke?

yes i know how to drop a label man..  i just dont know how to code it so it actually shows x people and y channel like warz said..  

and if no one will tell me then i'll just go learn more....    

T h e   E n d
Title: Re:Help me /w this please?
Post by: ChR0NiC on July 25, 2004, 11:58 PM
[Kp edit: deleted direct attack.  However, I tend to agree with the frustration the attack attempted to convey.]

When you join a channel....using CSB you receive information in IIRC CSB1_JoinedChannel. That has your channel name in it, set that as your current channel by defining the variable as a public variable. For example Public CurrentChan As String.


Private Sub CleanSlateBot1_JoinedChannel(ChannelName As String)

CurrentChan = ChannelName

End Sub


Then I am guessing you have a channel list....so do this.


Private Sub CleanSlateBot1_JoinedChannel(ChannelName As String)

CurrentChan = ChannelName

lblCurrentChan.Caption = CurrentChan & "(" & ListView1.ListItems.Count & ")"

End Sub


I don't know how much simpler it can be but, if you still don't get it, PLEASE I BEG OF YOU, restart your VB learning.
Title: Re:Help me /w this please?
Post by: hismajesty on July 26, 2004, 12:17 AM
Quotewhy do you people get so serious ?...    damn.  take a joke?

...what was the joke?
Title: Re:Help me /w this please?
Post by: Warrior on July 26, 2004, 12:48 PM
He attempted to turn his situation around to where he said it was a joke when in reality he was actually quite serious but when he saw the severity of our reactions torwards him the only logical thing he came up with at the time was "damn take a joke" .
Title: Re:Help me /w this please?
Post by: Grok on July 27, 2004, 12:47 PM
Quote from: ChR0NiC on July 25, 2004, 11:58 PM
[Kp snip - removed it from original post, so dropping it from here too.  Chr0nic has obviously seen this response, so I don't mind cleaning the message.  See also my response to Grok, two posts down.]

This is an unaaceptable response on any vL-hosted forum but this is botdev, so maybe they're fine with it here.  Bring that attitude to even our Trash Can, and it will only be until I see it.

When someone is trying to learn, no matter how much of a beginner they are, either you try to help them, or you sit out.  In this case, you may think your explanation if perfectly good, because you understand it, why can't they?

Know what the best teachers and professors know -- that one approach does not work for every student.  If you really want to help, and someone doesn't understand your first attempt, try another tact.  Yelling and cussing is not another acceptable tact for education, unless you're in Navy Seal training maybe.

Don't blame the student for your failure to be a good teacher.
Title: Re:Help me /w this please?
Post by: ChR0NiC on July 27, 2004, 01:01 PM
Quote from: Grok on July 27, 2004, 12:47 PM
Don't blame the student for your failure to be a good teacher.

Sorry, I just don't like being flamed after I am nice enough to help him. But I apologize, I shall be much more nicer from now on
Title: Re: Grok's rebuke to Chr0nic
Post by: Kp on July 27, 2004, 06:33 PM
Quote from: Grok on July 27, 2004, 12:47 PMThis is an unaaceptable response on any vL-hosted forum but this is botdev, so maybe they're fine with it here.  Bring that attitude to even our Trash Can, and it will only be until I see it.

Actually, I just hadn't gotten here yet. :)  Cleaned it from his message and dropped it from your quote for thoroughness, but otherwise didn't touch your message.
Title: Re:Help me /w this please?
Post by: Twitch on July 29, 2004, 10:25 AM
 You guys don't really need to carry on..   i have alreaady figured it out and have figured out plenty more..    

I don think i will be needing help for a long time. .  or until i make a bot with BNET Docs.


Thanks for your help guys.