Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: haZe on December 27, 2002, 08:10 AM

Title: err..help!
Post by: haZe on December 27, 2002, 08:10 AM
I know I ask for a lot of help around here, but I'm totally n00b with bots (programming them), and that's  what this forum is here for, right?  ;)

Well, anyways, I'll get down to business. Does anyone have the join/leave code? I need my bot to display joins/leaves. It isn't exactly my bot tho-It's atom's VaporBot and I'm going to improve it =D Well anyways, if anyone has anything tell me plz.
Title: Re: err..help!
Post by: warz on December 27, 2002, 08:15 AM
What kind of bot?
Title: Re: err..help!
Post by: haZe on December 27, 2002, 08:34 AM
Chat bot. Also, 1 more thing: How can I prevent this from happening? (click link below to see what I'm talking about)
www.gosugamers.com/eek.JPG
When the ops or other ppl rejoin, I still see the old person..*sniff* and 1 more thing: When there's 2 ops, the second one is always at the bottom at the list and not at the top with the rest...How I get my channellist to display how it is, rather than in alphabetical order?
Title: Re: err..help!
Post by: warz on December 27, 2002, 08:45 AM
Might I ask what "But anyways does anyone have any source that WORKS (warz, fuck you)? " meant?
Title: Re: err..help!
Post by: haZe on December 27, 2002, 08:50 AM
Warz you shouldn't go around posting people's bot source codes without even asking them. :-/ :-/ :-/ :P
No, we don't know eachother.
WILL SOMEONE PLEASE ANSWER THE ORIGINAL QUESTION IN THIS POST!!!!!!
Title: Re: err..help!
Post by: warz on December 27, 2002, 08:54 AM
Ever think about looking at the code I posted? I'm sure you can answer most of your own questions by looking at them.
Title: Re: err..help!
Post by: Yoni on December 27, 2002, 08:58 AM
Read this.
http://botdev.valhallalegends.com/documents/0x0feducation.html
Title: Re: err..help!
Post by: haZe on December 27, 2002, 10:23 AM
NOO! Yoni I didn't understand a word of that document  :-/
Anyways,How can I prevent this from happening? (click link below to see what I'm talking about)
www.gosugamers.com/eek.JPG
When the ops or other ppl rejoin, I still see the old person..*sniff* and 1 more thing: When there's 2 ops, the second one is always at the bottom at the list and not at the top with the rest...How I get my channellist to display how it is, rather than in alphabetical order? I Guess I'm asking 2 questions: How do I get my ChannelList to refresh when a person leaves (this prob has something to do with join/leave notifications) and How do I stop the users from going in alphabetical order? I want them in the order that they joined in... :-/
Title: Re: err..help!
Post by: erase on December 27, 2002, 10:33 AM
yoni he's making a gateway bot.
Haze, you can't get your channel list to update when a user joins/parts?
If that's the case, Vapor bot should have Parse_Join and Parse_Leave subs.

Parse_OnJoin:
Me.RoomList.ListItems.Add username
Parse_OnLeave:
frmmain.ChannelList.ListItems.Remove frmmain.ChannelList.FindItem(username).Index

edit: [ code ] and [ /code ]
Title: Re: err..help!
Post by: haZe on December 27, 2002, 11:39 AM
Uhhh...I get a variable not defined error when I do that..username isnt defined =[
Title: Re: err..help!
Post by: warz on December 27, 2002, 12:02 PM
uhhh.. i think i'll laugh silently to myself, so i don't shatter any hopes this kid has at learning visual basic.
Title: Re: err..help!
Post by: Grok on December 27, 2002, 12:31 PM
Responses of that nature are not helpful.  If you have nothing constructive to contribute to the topic at hand, exercise better judgment and do not post.

No one, including myself, should be deriding another person who is trying to learn.  All of us started from somewhere, and we all learn at different paces.
Title: Re: err..help!
Post by: haZe on December 27, 2002, 01:25 PM
WILL SOMEONE PLZ JUST ANSWER MY QUESTION!!!!
:'(
:'(
Grok, all the code u give me gives me errors
:-/
Title: Re: err..help!
Post by: Zakath on December 27, 2002, 01:38 PM
That's because it's only a snippet - Grok (or anyone else) has no way to know what the names of the variables, objects, and functions you've defined are. Thus, the snippet uses some variable that is meant to be a placeholder for the variable in your program. So, if a code snippet doesn't work because "username" isn't a defined variable, substitute in the variable that you use to hold the username in question!
Title: Re: err..help!
Post by: warz on December 27, 2002, 03:08 PM
No way. Seriously?
Title: Re: err..help!
Post by: erase on December 27, 2002, 04:21 PM
Haze, read what Zakath wrote:
QuoteThat's because it's only a snipper [an example] So, if a code snippet doesn't work because "username" [***] isn't a defined variable, substitute in the variable that you use to hold the username in question!
haze read zakath's quote above.
My USERNAME variable is not the same as your USERNAME variable. Yours may be STRACCOUNT, STRUSER, USER, etc...Find out what it is...search the code for something similar
Title: Re: err..help!
Post by: haZe on December 27, 2002, 04:34 PM
Uhhh...It already has Parse_OnJoin and Parse_OnLeave things. But it doesn't take affect.
Private Sub Event_Join(strUser, strFlag, strProduct)
frmBot.ChannelUsers.ListItems.Add frmBot.ChannelUsers.ListItems.Count + 1, , strUser, , GetIconCode(strProduct, strFlag)
    If Mid(strFlag, 3, 1) = "1" Then frmBot.ChannelUsers.ListItems.Item(frmBot.ChannelUsers.ListItems.Count).ForeColor = vbYellow
End Sub
Private Sub Event_Leave(strUser, strFlag)
    'User leaves current channel
    'strUser: User's Name
    'strFlag: User's Status Flag
frmBot.ChannelUsers.ListItems.Remove (frmBot.ChannelUsers.FindItem(strUser).Index)
End Sub
Can someone please tell me whats wrong with that code!!! =[
Title: Re: err..help!
Post by: Mesiah / haiseM on December 28, 2002, 02:40 PM
uhmm...

If your looking for NOTIFICATIONS, you have everything right, except adding to the rtb.

I dunno what u use, AddChat, or rtbAdd, or whatever u may use. But you need to stick something in there like:

rtbadd vbgreen, strUser & " has left the channel." & vbcrlf


or whatever.
Title: Re: err..help!
Post by: haZe on December 29, 2002, 05:36 AM
k thx mesiah i have thad a chance 2 test it yet tho :/
when i do ull be sure to hear from me =D
Title: Re: err..help!
Post by: Yoni on December 29, 2002, 02:03 PM
QuoteNOO! Yoni I didn't understand a word of that document  :-/
Umm... Don't make a binary bot.
(erase: It is binary according to the screenshot.)


haZe: You should stop pasting everybody else's source code into one big mess and expect it to work without trying to understand it yourself. Maybe one day there will be an MSWord-like bot editor with a little clippy that goes "It looks like you're writing a bot!" but not yet.
Title: Re: err..help!
Post by: haZe on December 29, 2002, 03:10 PM
Yoni I didn't ask for your comments.

hey wanna see somethin cool?
 ::)  :o

Edit - Removed repeated faces.
Title: Re: err..help!
Post by: Yoni on December 29, 2002, 03:19 PM
Way to get someone's respect, haZe. *sigh*
Title: Re: err..help!
Post by: haZe on December 29, 2002, 03:44 PM
..well when u criticize me whatd'ya want me to do :/
sry yoni :/
but im not sorry to SOME OTHER PEOPLE
Title: Re: err..help!
Post by: Necrosis on December 29, 2002, 03:58 PM
ok, im usually a ghost on this forum..reading up, but I just have to post here. Haze, obviously you are an amateur with visual basic. I would take the time to learn your basics before you get into something of this advancement. After about 6 months of doing what I just suggested to you, I am getting into this kind of programming. I usually don't pass judgement like this, and if I have gone wrong, I apologise, but don't make a fool of yourself like this.

Also--reacting immaturely:

QuoteYoni I didn't ask for your comments.

hey wanna see somethin cool?
 ::)  :o

Edit - Removed repeated faces.

like the faces, will only make you look more foolish :-)
Title: Re: err..help!
Post by: haZe on December 29, 2002, 04:02 PM
Necrosis,

I thank you for your wise advice. but, quite frankly, all I want is a book on vb6 (not how to use everything, on the syntaxes and stuff). Reading a website and dling other ppls code is boring and isn't really a learning expirience to me. So if you know any B O O K S that I could learn VB6 on, please reply!

Yes, the smily faces are kinda lame but who cares
<*shrugs*>
:)
Title: Re: err..help!
Post by: Necrosis on December 29, 2002, 04:08 PM
I would highly suggest Visual Basic 6.0 for Dummies. That is what I started out on. However, this book gets old after a while and I almost guarantee you will lose interest as I did. What I've done recently is ask for snippets and their explainations on various forums.

Some suggestions?

http://kickme.to/datoforums - they have a good vb section there, prompt replies-- dont be a dumbass

http://www.acky.net - a couple good tutorials and an archive of code

http://www.planet-source-code.com - nutload of code

http://www.winsockvb.com - this is one of the best winsockvb tutorial sites I have found, please do check this out

One more thing: Just of out curiosity, how old are you? I've been in this crowd since I was 10, I am 13 now.

Peace.
Title: Re: err..help!
Post by: haZe on December 29, 2002, 04:09 PM
im 11
Title: Re: err..help!
Post by: Noodlez on December 29, 2002, 04:17 PM
ooh the age thingie ^^
i've been (attempting) :P to program since 8, am 14 now
Title: Re: err..help!
Post by: haZe on December 29, 2002, 04:18 PM
LoL! You started programming when you were 8? I started when I was 10-In QBasic. -.- It's only a 2 years differnce and boy it shows..lol
Title: Re: err..help!
Post by: Necrosis on December 29, 2002, 04:22 PM
Haze-- You have to be kidding me. Tell me you're kiding me. Please.
Title: Re: err..help!
Post by: Necrosis on December 29, 2002, 04:22 PM
btw get on aim, my sn is th3rm41 I want to talk to you
Title: Re: err..help!
Post by: haZe on December 29, 2002, 04:35 PM
necrosis i cant parents banned me sry
no aim, no icq, no aim, no nuttin sry
if u want to chat send me an IM thru the forum that we're on
duh
=p
bye
ttyl
=D
Title: Re: err..help!
Post by: Mesiah / haiseM on December 29, 2002, 05:13 PM
CLS

COLOR 4
PRINT "Hi, my name is bob!"

INPUT "What is your name"; name$
PRINT "Hi," & name$ & "!"

END

QB > all

------------------------------------------

I just wanted to post to say the lil MSWord comment yoni made, was quite creative and amusing :P
Title: Re: err..help!
Post by: haZe on December 29, 2002, 05:48 PM
huh? mesiah i didnt understand that last post..  :-/
Title: Re: err..help!
Post by: Mesiah / haiseM on December 29, 2002, 07:37 PM
u moron, and u said u knew qbasic, pfft
Title: Re: err..help!
Post by: Necrosis on December 29, 2002, 08:04 PM
rofl, sorry haze but you just got owned
Title: Re: err..help!
Post by: Yoni on December 30, 2002, 04:35 AM
CLS: RANDOMIZE
FOR I = 1 TO 1000000: NEXT
DO
COLOR INT(RND * 15) + 1
PRINT CHR$(INT(RND * 256));
BEEP
LOOP
Title: Re: err..help!
Post by: l)ragon on December 30, 2002, 12:14 PM
correct me if im wrong Yoni lol but would that not like get very annoying.

~l)ragon
Title: Re: err..help!
Post by: Etheran on December 30, 2002, 03:54 PM
play "l8edcdeel4el8ddl4dl8egl4gl8edcdeeeeddedc"

gogo!!
Title: Re: err..help!
Post by: Yoni on December 31, 2002, 12:16 PM
It's meant to be run on multiple public computers, preferably in a school's computer lab.
The "FOR" loop in the beginning gives you time to walk away.
Title: Re: err..help!
Post by: st0rm of incdamage on January 01, 2003, 01:00 PM
Hmmm...
Been programming since I was 9. PhatBot developed at age 12. Going to resist the urge to flame, but you have to use common sense, Haze. Think, what happens when you join a channel? The list is cleared and then filled up with users. Thus, how do I clear the list? Well, lets see if there's a clear method or something similar? Aha! Maybe if I call it when I join a channel, problems will be solved?

By the way, don't learn VB6. It's dead. It has maybe 2 years tops left in it. VB.NET is replacing it. From all accounts (including mine, I bought it legally too), it SUCKS.

Learn Python. It's an easy, powerful language that beginners as well as professionals use. Free, object-oriented, RAD. What more could you ask?

www.python.org
http://www.python.org/doc/current/tut/tut.html
www.jython.org

Have fun.
Title: Re: err..help!
Post by: MrRaza on January 01, 2003, 01:04 PM
Java/c/c++/perl/python/LISP - the way to go...
Title: Re: err..help!
Post by: st0rm again on January 01, 2003, 01:08 PM
Don't think I remembered all my color codes, but...
SCREEN 12 '640x480x8bpp, no pcopy :(
COLOR 7
CIRCLE (320,240), 100
COLOR 4
CIRCLE (280,200), 10
CIRCLE (360,200), 10
COLOR 1
CIRCLE (320,280), 20

My first language as well; anyone ever read Greg Perry?
Title: Re: err..help!
Post by: MichaelPW on January 03, 2003, 01:05 PM
" anyone ever read Greg Perry? "


- Impressive author, indeed:)