Valhalla Legends Forums Archive | Battle.net Bot Development | idle msg

AuthorMessageTime
Crim-Training
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
October 9, 2003, 12:19 AM
Yoni
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?
October 9, 2003, 12:26 AM
hismajesty
[quote author=Crim-Training link=board=17;threadid=3005;start=0#msg23479 date=1065658749]
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
[/quote]

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
[code]
tmrIdle.Interval = "60000" '1 Minute
'This Sets The Interval
[/code]

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)

[code]
Send strIdleMsg & " ~[ YourBot By SomeLeetGuy ]~"
[/code]

A full code would be like this (let strIdleOn equal a checkbox on the setup form checking if idles are enabled)

[code]
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
[/code]
October 9, 2003, 1:04 AM
Stealth
Or.. much more simply, and without declaring two unnecessary variables:

[code]
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
[/code]
October 9, 2003, 3:00 AM
hismajesty
[quote author=Stealth link=board=17;threadid=3005;start=0#msg23515 date=1065668451]
Or.. much more simply, and without declaring two unnecessary variables:

[code]
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
[/code]
[/quote]

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.
October 9, 2003, 3:06 AM
Grok
[quote author=hismajesty link=board=17;threadid=3005;start=0#msg23518 date=1065668773]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]

Yes, variables are overrated.
October 9, 2003, 5:14 PM
Zakath
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!
October 9, 2003, 6:02 PM
hismajesty
[quote author=Zakath link=board=17;threadid=3005;start=0#msg23560 date=1065722579]
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]

Math sucks.
October 9, 2003, 7:18 PM
UserLoser
Much simpler, better, and non-gayer.
[code]
lTimerID = SetTimer(frmBot.hwnd, 0, 60000, AddressOf TimerProc)
[/code]
Set the timer to 60 seconds.

[code]
Public Sub TimerProc(ByVal hwnd As Long, ByVal lMsg As Long, ByVal lTimerId As Long, ByVal lTime As Long)
QueueChatMessage "Hello world!"
End Sub
[/code]

Timer's callback function.

Also, make sure you kill the timer.

[code]
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[/code]
October 9, 2003, 8:35 PM
Stealth
[quote author=Grok link=board=17;threadid=3005;start=0#msg23552 date=1065719646]
[quote author=hismajesty link=board=17;threadid=3005;start=0#msg23518 date=1065668773]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]

Yes, variables are overrated.
[/quote]

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?
October 9, 2003, 9:04 PM
hismajesty
[quote author=Stealth link=board=17;threadid=3005;start=0#msg23574 date=1065733482]
Is my thinking wrong?
[/quote]

Is it ever? :P
October 9, 2003, 9:33 PM
iago
[quote author=hismajesty link=board=17;threadid=3005;start=0#msg23578 date=1065735225]
[quote author=Stealth link=board=17;threadid=3005;start=0#msg23574 date=1065733482]
Is my thinking wrong?
[/quote]

Is it ever? :P
[/quote]

Well yeah, an example would be putting vL's homechannel on StealthBot's channel list :)
October 9, 2003, 9:58 PM
hismajesty
[quote author=iago link=board=17;threadid=3005;start=0#msg23584 date=1065736682]
[quote author=hismajesty link=board=17;threadid=3005;start=0#msg23578 date=1065735225]
[quote author=Stealth link=board=17;threadid=3005;start=0#msg23574 date=1065733482]
Is my thinking wrong?
[/quote]

Is it ever? :P
[/quote]

Well yeah, an example would be putting vL's homechannel on StealthBot's channel list :)
[/quote]

It wouldn't make a difference seeing as 3/4 of bnet is banned from [vL] anyway. :P
October 9, 2003, 11:21 PM
iago
[quote author=hismajesty link=board=17;threadid=3005;start=0#msg23593 date=1065741703]
[quote author=iago link=board=17;threadid=3005;start=0#msg23584 date=1065736682]
[quote author=hismajesty link=board=17;threadid=3005;start=0#msg23578 date=1065735225]
[quote author=Stealth link=board=17;threadid=3005;start=0#msg23574 date=1065733482]
Is my thinking wrong?
[/quote]

Is it ever? :P
[/quote]

Well yeah, an example would be putting vL's homechannel on StealthBot's channel list :)
[/quote]

It wouldn't make a difference seeing as 3/4 of bnet is banned from [vL] anyway. :P
[/quote]

eewy spam, mostly.
October 10, 2003, 1:07 AM
hismajesty
[quote author=iago link=board=17;threadid=3005;start=0#msg23605 date=1065748032]
[quote author=hismajesty link=board=17;threadid=3005;start=0#msg23593 date=1065741703]
[quote author=iago link=board=17;threadid=3005;start=0#msg23584 date=1065736682]
[quote author=hismajesty link=board=17;threadid=3005;start=0#msg23578 date=1065735225]
[quote author=Stealth link=board=17;threadid=3005;start=0#msg23574 date=1065733482]
Is my thinking wrong?
[/quote]

Is it ever? :P
[/quote]

Well yeah, an example would be putting vL's homechannel on StealthBot's channel list :)
[/quote]

It wouldn't make a difference seeing as 3/4 of bnet is banned from [vL] anyway. :P
[/quote]

eewy spam, mostly.
[/quote]

How dare you call me a spammer? :'(

Edit: This topic has really gotten off topic. ;D
October 10, 2003, 2:01 AM
iago
The question was answered at least 3 ways, I doubt it matters now :)
October 10, 2003, 3:00 AM
Crim-Training
yes i got the idle to work thx for your help hismajesty also stealth
October 10, 2003, 10:45 AM
hismajesty
[quote author=Crim-Training link=board=17;threadid=3005;start=15#msg23642 date=1065782753]
yes i got the idle to work thx for your help hismajesty also stealth
[/quote]

Alright no problem. :)
October 10, 2003, 7:20 PM
UserLoser
[quote author=Crim-Training link=board=17;threadid=3005;start=15#msg23642 date=1065782753]
yes i got the idle to work thx for your help hismajesty also stealth
[/quote]
Those are the crappy ways
October 10, 2003, 8:10 PM
hismajesty
[quote author=UserLoser link=board=17;threadid=3005;start=15#msg23680 date=1065816646]
[quote author=Crim-Training link=board=17;threadid=3005;start=15#msg23642 date=1065782753]
yes i got the idle to work thx for your help hismajesty also stealth
[/quote]
Those are the crappy ways
[/quote]

shush meanie ;)
October 10, 2003, 8:41 PM
Crim-Training
[code]Posted: Userloser
Those are the crappy ways [/code]

Well it works so its good enough for me
October 11, 2003, 1:44 AM
St0rm.iD
[quote author=Zakath link=board=17;threadid=3005;start=0#msg23560 date=1065722579]
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]

Yeah I wrote my last bot in Scheme.
October 13, 2003, 2:41 PM
Newby
My notepad bot r0x0r5 you all!
October 13, 2003, 2:47 PM
hismajesty
[quote author=Newby link=board=17;threadid=3005;start=15#msg24035 date=1066056426]
My notepad bot r0x0r5 you all!
[/quote]

It's always been my dream to write a bot in HTML.
October 13, 2003, 3:16 PM
Zakath
[quote author=St0rm.iD link=board=17;threadid=3005;start=15#msg24032 date=1066056108]
Yeah I wrote my last bot in Scheme.
[/quote]

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.
October 13, 2003, 5:55 PM
Adron
[quote author=Zakath link=board=17;threadid=3005;start=15#msg24059 date=1066067713]
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]

My scheme chat bot works somewhat.
October 13, 2003, 10:39 PM

Search