Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: NeTworK on March 25, 2004, 08:26 PM

Title: 2 Problems / Questions
Post by: NeTworK on March 25, 2004, 08:26 PM
First off.. (vb6 programming language)
When the bot connects, after the first minute, the channel list becomes blank.. then if i rejoin or join another channel, it shows, and it doesnt seem to do that again.. why thet hell is that and how can i fix it

Second, in the keypress, when you add text, and it sends the text to bnet and to your chat screen, how would i make it so if you did any type off command with "/" in it, it wouldnt show it on the bots chatscreen, but still exicute the command...
Title: Re:2 Problems / Questions
Post by: UserLoser. on March 25, 2004, 08:30 PM
If you don't want to display messages the start with '/':


If (Left$(TextYourSending, 1) <> "/") Then
   DisplayTheTextYourSending
End If
Title: Re:2 Problems / Questions
Post by: ChR0NiC on March 25, 2004, 08:38 PM
LoL most likely you are using a recompiled bot, because there was a few sources around which have the channel list set to erase after use. Check for the erase of the array for the channel list :P I will not tell you how to do it though. I want you to learn :P
Title: Re:2 Problems / Questions
Post by: NeTworK on March 25, 2004, 09:42 PM
Quote from: UserLoser. on March 25, 2004, 08:30 PM
If you don't want to display messages the start with '/':


If (Left$(TextYourSending, 1) <> "/") Then
   DisplayTheTextYourSending
End If

in the DisplayTheTextYourSending
.... i thought it was "dont want to desplay messages starting with'/'
Title: Re:2 Problems / Questions
Post by: MyndFyre on March 25, 2004, 09:45 PM
Quote from: NeTworK on March 25, 2004, 09:42 PM
Quote from: UserLoser. on March 25, 2004, 08:30 PM
If you don't want to display messages the start with '/':


If (Left$(TextYourSending, 1) <> "/") Then
   DisplayTheTextYourSending
End If

in the DisplayTheTextYourSending
.... i thought it was "dont want to desplay messages starting with'/'

Heh, good point.  You should be able to figure out how to fix it though.
Title: Re:2 Problems / Questions
Post by: NeTworK on March 25, 2004, 10:14 PM
I've already goten to like
If (Left$(textyoursending, 1) <> "/" Then
End If

But i dont know what to put in the center to desplay nothing...
Title: Re:2 Problems / Questions
Post by: MyndFyre on March 25, 2004, 10:16 PM
Quote from: NeTworK on March 25, 2004, 10:14 PM
I've already goten to like
If (Left$(textyoursending, 1) <> "/" Then
End If

But i dont know what to put in the center to desplay nothing...

If the left of the text you are sending is not "/", then you do display it!  Do you know that the <> operator is the inequality operator?
Title: Re:2 Problems / Questions
Post by: l)ragon on March 26, 2004, 01:57 AM
Add <your listview control name>.ListItems.Clear in to your EventChannel.

Edit1: This is just a guess that you have that commented out or have yet to add it.
Edit2: Fixed, no comment.
Title: Re:2 Problems / Questions
Post by: UserLoser. on March 26, 2004, 09:38 AM
Quote from: dRAgoN on March 26, 2004, 01:57 AM
add <your listview control name>.Clear in to your EventChannel.

Edit: this is just a guess that you have that commented out or have yet to add it.

To correct you, it's listview.ListItems.Clear
Title: Re:2 Problems / Questions
Post by: Gangz on March 26, 2004, 12:20 PM

If (Left$(strtext, 1) = "/" Then exit sub
End If


maybe? <> is saying that if the 1st letter doesnt = "/" then exit sub. its the exact oposite of the reaction you wanted.
For the channels

formname.listbox.clear

try that before joining any new channels
Title: Re:2 Problems / Questions
Post by: hismajesty on March 27, 2004, 04:02 AM
As has been said:

If (Left$(strSend, 1) <> "/" Then
      AddC "some text", vbWhite 'Or whatever you use for displaying text
End If


QuoteWhen the bot connects, after the first minute, the channel list becomes blank.. then if i rejoin or join another channel, it shows, and it doesnt seem to do that again.. why thet hell is that and how can i fix it

Perhaps posting some code that may be causing this would help.
Title: Re:2 Problems / Questions
Post by: MyndFyre on March 27, 2004, 06:58 AM
Guys... c'mon...  this isn't difficult.  Let me go through it line-by-line, and I'll make everything as deliberate as I can:


' Declare the text to send
Dim textToSend As String
' make it the text in the textbox.
textToSend = txtSend.Text
' Declare another string -- this being the first character of the text to send.
Dim firstChar As String
' GET the first character
firstChar = Left$(textToSend, 1)

' if the first character is not equal to "/"
If firstChar <> "/" Then
' then add the text to send to the chat window.
 AddChat vbGreen, textToSend
End If


This is not complicated.
Title: Re:2 Problems / Questions
Post by: hismajesty on March 27, 2004, 08:15 AM
MyndFyre: That has been posted multiple times.
Title: Re:2 Problems / Questions
Post by: MyndFyre on March 27, 2004, 09:37 AM
Quote from: hismajesty on March 27, 2004, 08:15 AM
MyndFyre: That has been posted multiple times.

hismajesty: I'm keenly aware of that.  Evidently many people here are retards who can't figure out what the code does, so I made it as plainly and deliberate as possible.  If you notice, I posted a shorter version of the same thing a few replies ago in the same thread, but didn't explain it.
Title: Re:2 Problems / Questions
Post by: Archangel on March 27, 2004, 12:24 PM
QuoteI'm keenly aware of that.  Evidently many people here are retards who can't figure out what the code does.

He is right, like alot of people dont know what code means, they use this forums for learning Programming.
Title: Re:2 Problems / Questions
Post by: hismajesty on March 27, 2004, 01:14 PM
Quote from: Myndfyre on March 27, 2004, 09:37 AM
Quote from: hismajesty on March 27, 2004, 08:15 AM
MyndFyre: That has been posted multiple times.

hismajesty: I'm keenly aware of that.  Evidently many people here are retards who can't figure out what the code does, so I made it as plainly and deliberate as possible.  If you notice, I posted a shorter version of the same thing a few replies ago in the same thread, but didn't explain it.

Ah, nevermind then. :P
Title: Re:2 Problems / Questions
Post by: iago on March 27, 2004, 01:28 PM
Quote from: Archangel on March 27, 2004, 12:24 PM
QuoteI'm keenly aware of that.  Evidently many people here are retards who can't figure out what the code does.

He is right, like alot of people dont know what code means, they use this forums for learning Programming.

They use a bot development forum for learning? dumbdumbdumb.  

I could understand people using the vb or c++ or java forum for learning, but making bots is a reasonably advanced topic.  Before you even attempt to make a bot, you should already have a firm understanding of the language you intend to program it in.  Otherwise, you end up looking like an idiot.
Title: Re:2 Problems / Questions
Post by: Skywing on March 27, 2004, 01:44 PM
Quote from: iago on March 27, 2004, 01:28 PM
Quote from: Archangel on March 27, 2004, 12:24 PM
QuoteI'm keenly aware of that.  Evidently many people here are retards who can't figure out what the code does.

He is right, like alot of people dont know what code means, they use this forums for learning Programming.

They use a bot development forum for learning? dumbdumbdumb.  

I could understand people using the vb or c++ or java forum for learning, but making bots is a reasonably advanced topic.  Before you even attempt to make a bot, you should already have a firm understanding of the language you intend to program it in.  Otherwise, you end up looking like an idiot.
Unfortunately, that doesn't seem to stop many people from trying (here).