i know this has been answered before, but i have been searching the forum and cant find it..
anyway i just need a quick idle message for a vb bot,
thx, Daniel
Building a binary Battle.net bot in a cumbersome language such as VB requires great expertise. Surely after accomplishing this feat you can manage a mind-boggingly trivial objective consisting of nothing more than a timer and a line or two of code?
Quote from: Crim-Training on October 08, 2003, 07:19 PM
i know this has been answered before, but i have been searching the forum and cant find it..
anyway i just need a quick idle message for a vb bot,
thx, Daniel
Hmm, heres a good idle message - "Omg hismajesty is the coolest guy ever he rox0rs my box0rs" good eh? ;D
Edit: Oh Oh Oh...you wanted code. Well assuming you're using VB place a timer on your form and name it tmrIdle. The double click on tmrIdle which will bring up the code screen for the timer.
Then you may or may not want to reset the timer. In this example we will set the timer to a preset time. You can alter this to have it send the timer at an interval of your choice. OK
tmrIdle.Interval = "60000" '1 Minute
'This Sets The Interval
Then the idle code is this (you will need to change send to your send method, such as adding to a queue or Something.Send etc.) Also let strIdleMsg = your textbox that includes the idle message you want (Example Form2.txtIdle.text or something)
Send strIdleMsg & " ~[ YourBot By SomeLeetGuy ]~"
A full code would be like this (let strIdleOn equal a checkbox on the setup form checking if idles are enabled)
Private Sub tmrIdle_Timer()
Dim strIdleMsg As String 'Declare Variable
Dim strIdleOn As String 'Declare Variable
strIdleMsg = frmSetup.txtIdleMsg.text 'Set Variable Value
strIdleOn = frmSetup.txtIdleOn.Value 'Set Variable Value
If strIdleOn = vbChecked Then ' If the Checkbox is checked
tmrIdle.Interval = 60000 'Set The Interval To 1 Minute
Send strIdleMsg & " ~[ YourBot By SomeLeetGuy ]~" 'Send Idle Message Text
End If
End Sub
Or.. much more simply, and without declaring two unnecessary variables:
Private Sub tmrIdle_Timer()
If frmSetup.txtIdleOn.Value = vbChecked Then ' If the Checkbox is checked
tmrIdle.Interval = 60000 'Set The Interval To 1 Minute
Send frmSetup.txtIdleMsg.text & " ~[ YourBot By SomeLeetGuy ]~" 'Send Idle Message Text
End If
End Sub
Quote from: Stealth on October 08, 2003, 10:00 PM
Or.. much more simply, and without declaring two unnecessary variables:
Private Sub tmrIdle_Timer()
If frmSetup.txtIdleOn.Value = vbChecked Then ' If the Checkbox is checked
tmrIdle.Interval = 60000 'Set The Interval To 1 Minute
Send frmSetup.txtIdleMsg.text & " ~[ YourBot By SomeLeetGuy ]~" 'Send Idle Message Text
End If
End Sub
I figured he'd be able to tell the variables are not required...I don't use variables within my code but I thought maybe if he didn't know how to declare variables that it would help.
Quote from: hismajesty on October 08, 2003, 10:06 PMI figured he'd be able to tell the variables are not required...I don't use variables within my code but I thought maybe if he didn't know how to declare variables that it would help.
Yes, variables are overrated.
Variables? Who needs variables? Or functions, for that matter. My last bot was just a big list of mathematical operations involving numeric constants. I didn't even use a single string!
Quote from: Zakath on October 09, 2003, 01:02 PM
Variables? Who needs variables? Or functions, for that matter. My last bot was just a big list of mathematical operations involving numeric constants. I didn't even use a single string!
Math sucks.
Much simpler, better, and non-gayer.
lTimerID = SetTimer(frmBot.hwnd, 0, 60000, AddressOf TimerProc)
Set the timer to 60 seconds.
Public Sub TimerProc(ByVal hwnd As Long, ByVal lMsg As Long, ByVal lTimerId As Long, ByVal lTime As Long)
QueueChatMessage "Hello world!"
End Sub
Timer's callback function.
Also, make sure you kill the timer.
Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
Quote from: Grok on October 09, 2003, 12:14 PM
Quote from: hismajesty on October 08, 2003, 10:06 PMI figured he'd be able to tell the variables are not required...I don't use variables within my code but I thought maybe if he didn't know how to declare variables that it would help.
Yes, variables are overrated.
It would seem that, unless he were making modifications to the contents of those two text boxes or using them extensively before sending them to Battle.net, there's no reason to create individual variables to mirror their contents. Is my thinking wrong?
Quote from: hismajesty on October 09, 2003, 04:33 PM
Quote from: Stealth on October 09, 2003, 04:04 PM
Is my thinking wrong?
Is it ever? :P
Well yeah, an example would be putting vL's homechannel on StealthBot's channel list :)
Quote from: iago on October 09, 2003, 04:58 PM
Quote from: hismajesty on October 09, 2003, 04:33 PM
Quote from: Stealth on October 09, 2003, 04:04 PM
Is my thinking wrong?
Is it ever? :P
Well yeah, an example would be putting vL's homechannel on StealthBot's channel list :)
It wouldn't make a difference seeing as 3/4 of bnet is banned from [vL] anyway. :P
Quote from: hismajesty on October 09, 2003, 06:21 PM
Quote from: iago on October 09, 2003, 04:58 PM
Quote from: hismajesty on October 09, 2003, 04:33 PM
Quote from: Stealth on October 09, 2003, 04:04 PM
Is my thinking wrong?
Is it ever? :P
Well yeah, an example would be putting vL's homechannel on StealthBot's channel list :)
It wouldn't make a difference seeing as 3/4 of bnet is banned from [vL] anyway. :P
eewy spam, mostly.
Quote from: iago on October 09, 2003, 08:07 PM
Quote from: hismajesty on October 09, 2003, 06:21 PM
Quote from: iago on October 09, 2003, 04:58 PM
Quote from: hismajesty on October 09, 2003, 04:33 PM
Quote from: Stealth on October 09, 2003, 04:04 PM
Is my thinking wrong?
Is it ever? :P
Well yeah, an example would be putting vL's homechannel on StealthBot's channel list :)
It wouldn't make a difference seeing as 3/4 of bnet is banned from [vL] anyway. :P
eewy spam, mostly.
How dare you call me a spammer? :'(
Edit: This topic has really gotten off topic. ;D
The question was answered at least 3 ways, I doubt it matters now :)
yes i got the idle to work thx for your help hismajesty also stealth
Quote from: Crim-Training on October 10, 2003, 05:45 AM
yes i got the idle to work thx for your help hismajesty also stealth
Alright no problem. :)
Quote from: Crim-Training on October 10, 2003, 05:45 AM
yes i got the idle to work thx for your help hismajesty also stealth
Those are the crappy ways
Quote from: UserLoser on October 10, 2003, 03:10 PM
Quote from: Crim-Training on October 10, 2003, 05:45 AM
yes i got the idle to work thx for your help hismajesty also stealth
Those are the crappy ways
shush meanie ;)
Posted: Userloser
Those are the crappy ways
Well it works so its good enough for me
Quote from: Zakath on October 09, 2003, 01:02 PM
Variables? Who needs variables? Or functions, for that matter. My last bot was just a big list of mathematical operations involving numeric constants. I didn't even use a single string!
Yeah I wrote my last bot in Scheme.
My notepad bot r0x0r5 you all!
Quote from: Newby on October 13, 2003, 09:47 AM
My notepad bot r0x0r5 you all!
It's always been my dream to write a bot in HTML.
Quote from: St0rm.iD on October 13, 2003, 09:41 AM
Yeah I wrote my last bot in Scheme.
Hey, I bet it could be done. I certainly wouldn't want to be the one to try it, but I'm sure it
is possible.
Quote from: Zakath on October 13, 2003, 12:55 PM
Hey, I bet it could be done. I certainly wouldn't want to be the one to try it, but I'm sure it is possible.
My scheme chat bot works somewhat.