Valhalla Legends Forums Archive | Battle.net Bot Development References | Creating a User Monitor

AuthorMessageTime
Lobo.id
Hey if I made one how would I be able to tell if the person comes online with sending /whois every 5 secs.
June 14, 2003, 4:32 AM
hismajesty
i think you would use the timer function..but I'm not sure
June 14, 2003, 4:57 AM
Yoni
Sending /whois every 5 seconds might not be a good idea (too short delay).

Anyway, you've answered your own question:
"How would I be able to tell if the person comes online?"
"By sending /whois every 5 seconds."

Unless you're not sure how to do that. Use a timer with an interval of 60000 and use this code:

[code]Private Sub SomeTimer_Timer()
YourCoolSendFunction "/whois " & Victim
End Sub[/code]

Or similar.
June 14, 2003, 10:11 AM
iago
If you want to do it without a timer, you have to either have him as a mutual friend (so you can see when he comes online) or sit in the channel he starts in (brood war usa-1, for example). Since there isn't enough people on bw anymore, almost everybody starts in -1.
June 15, 2003, 12:17 AM
St0rm.iD
/who brood war usa-22
June 15, 2003, 12:21 AM
Lobo.id
Ok yea I answered it. I meant to say was that the right thing to do. Thanks guys.

Also I was wondering how could I code in VB resize code for the bot to make everything line up when I maximized the screen. Thanks in advanced.
June 15, 2003, 2:52 PM
Nova1313
you can use code like this

(this is ripped from the lodgebot binary you have the code to)

Private Sub Form_Resize()
Dim CWIDTH As Long
Dim CHeight As Long
If frmmain.WindowState = 0 Or frmmain.WindowState = 2 Then
CWIDTH = frmmain.Width - formwidth
CHeight = frmmain.Height - formheight
'chattexts
On Error GoTo later
RichTextBox1.Width = RichTextBox1.Width + CWIDTH
On Error GoTo later
RichTextBox1.Height = RichTextBox1.Height + CHeight
On Error GoTo later
'whisper stuff
RichTextBox3.Width = RichTextBox3.Width + CWIDTH
On Error GoTo later
.....
'what todo if the program gets negative numbers...
later:
End Sub

only problem with that code is if it did get negative numbers cause the windows went further then a box could shrink well you had a problem..... The window would get all messed up. but it works for basic stuff.

June 15, 2003, 4:19 PM
MesiaH
Nova, just use If Then statements, then it won't keep the window looking all crappy, because by the time it reaches the negative number (or a number below the height/width/top) the window will be too small to see the contents, and when its resized to a visible state, it will be alligned fine.

[code]
ex:

If Me.Width > 3380 Then
rtbText.Width = Me.Width - 3375
Else

[/code]
June 15, 2003, 8:11 PM
Camel
[quote author=St0rm.iD link=board=17;threadid=1632;start=0#msg12350 date=1055636468]
/who brood war usa-22
[/quote]

[20:22:50] Users in channel Brood War USA-22:
[20:22:50] Ilick(lit, Highjump37
[20:22:50] bailpro, J-man-hunter
[20:22:50] Doggy_of_Doom, G_Unit_Nlgga
[20:22:50] radioclash101, I)arkstar69
[20:22:50] aopenpc, wizird
[20:22:50] eG]Psycho, CheezBall
[20:22:51] DE-goliath834, Bout2plucku
[20:22:51] DS-Carrier, Matt(M)dragon
[20:22:51] The-Suck-E-1, pX.Vietboi#2
[20:22:51] furchin, moreboy
[20:22:51] IDUNNO1111, Brown(Banana)
[20:22:51] Matrix_xXx, Eco(SphEre)
June 16, 2003, 12:22 AM
iago
Then you use a timer.
June 16, 2003, 12:12 PM
tA-Kane
Something else you could do, instead of /whois is /f l... I mean, isn't that kinda what it's for??!! You can eliminate 25 whole /whois's with a single friends list; cuts down on bandwidth, display time, and hey... it could even be less confusing than wanting to program in <= 25 /whois.

Another reason you'd do /f l, is because the user(s) don't need to be mutual to be displayed (so, you could create an account "IWatchYou#X", log it onto Chat X times (whereas x is your number of friends divided by 25), add your friends to the lists, and then do /f l every 10 or so seconds (I'd do 10 or more because of the size of a response Battle.net generates). Also, if it were me, I wouldn't watch for Battle.net to automatically send you a message when a user joins/leaves Battle.net or a game; those can easily be spoofed by the user by simply sending their own whisper to you (eg, "/w myfriend Your friend YourFriend has entered a StarCraft Ghost game I GOT THE GAME AND YOU DONT HAHAHA.").
June 16, 2003, 5:33 PM

Search