• Welcome to Valhalla Legends Archive.
 

Creating a User Monitor

Started by Lobo, June 13, 2003, 11:32 PM

Previous topic - Next topic

Lobo

Hey if I made one how would I be able to tell if the person comes online with sending /whois every 5 secs.
Look it's a signature.

hismajesty

i think you would use the timer function..but I'm not sure

Yoni

#2
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:

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


Or similar.

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.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Banana fanna fo fanna

/who brood war usa-22

Lobo

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.
Look it's a signature.

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.


Mesiah / haiseM

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.


ex:

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

]HighBrow Innovations
Coming soon...

AIM Online Status: 

Camel

Quote from: St0rm.iD on June 14, 2003, 07:21 PM
/who brood war usa-22

[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)

iago

Then you use a timer.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


tA-Kane

#10
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.").
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com