Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: TeEhEiMaN on May 25, 2003, 01:45 PM

Title: Idle
Post by: TeEhEiMaN on May 25, 2003, 01:45 PM
I was wondering if someone can post a Basic VB Idle for cleanslatebot.
Thx
TeEhEiMaN
Title: Re:Idle
Post by: ______ on May 25, 2003, 02:23 PM
A very simple way of doing it in Minutes

Private Sub Timer1_Timer()
   Static counter As Integer
   If CleanSlateBot1.Connected Then
       If frmOptions.chkIdle.Value = Checked Then
           counter = counter + 1
           If counter >= 5 Then '5min = 5  2hrs = 120
               CleanSlateBot1.Send frmOptions.antiidlemsg.Text  'send the idle message
               Addtext vbBlue, txtName.Text & ": ", vbWhite, frmOptions.antiidlemsg.Text
               counter = 0
           End If
       End If
   End If
End Sub


Edit - Make it a habit to use the intergrated [ code ] and [ /code ] tags, please. Thanks.
Title: Re:Idle
Post by: TeEhEiMaN on May 25, 2003, 02:30 PM
thank you
Title: Re:Idle
Post by: TeEhEiMaN on May 25, 2003, 02:40 PM
I get an error on "Addtext" vbBlue
Title: Re:Idle
Post by: ______ on May 25, 2003, 02:43 PM


u need Gorks addtext function
http://www.valhallalegends.com/docs/rtbox.htm
Title: Re:Idle
Post by: TeEhEiMaN on May 25, 2003, 02:46 PM
i alrdy have that , Im not sure what the problem is?
Title: Re:Idle
Post by: TeEhEiMaN on May 25, 2003, 02:51 PM
Addtext vbBlue, txtName.Text & ": ",

I think the txtName.Text it the thing that mess's me up, What is the txtName?
Title: Re:Idle
Post by: ______ on May 25, 2003, 02:55 PM
Quote from: TeEhEiMaN on May 25, 2003, 02:51 PM
Addtext vbBlue, txtName.Text & ": ",

I think the txtName.Text it the thing that mess's me up, What is the txtName?

just make txtname your name u logon as
the txtname.text is under my logon event. like logged on as username  
edit: txtname.text = username
Title: Re:Idle
Post by: TeEhEiMaN on May 25, 2003, 03:30 PM
Im still gettin the error on Addtext vbBlue, I installed that script u told me to do also.What the heck is wrong! >:(
Title: Re:Idle
Post by: ______ on May 25, 2003, 03:33 PM
create a text box name it txtname  then under ur logon even when successful

txtname.text = username


or if your still having problems then you dont have the antiidle msg text box or frmoptions

Edit: All in else fails just take it out but you wont see it on your bot, but bnet will see it.
Title: Re:Idle
Post by: TeEhEiMaN on May 25, 2003, 03:51 PM
Does this look right for the txt Box's cause I get an error on chkIdle = GetStuff("Misc", "chkedIdle"), Once I get this im pretty sure the idle will work.


Private Sub Command1_Click()
WriteStuff "Misc", "Master", txtMaster.Text
WriteStuff "Misc", "Trigger", txtTrigger.Text
WriteStuff "Misc", "Idle", txtIdle.Text

Unload Me

End Sub

Private Sub Command2_Click()

Unload Me

End Sub

Private Sub Form_Load()

txtMaster.Text = GetStuff("Misc", "Master")
txtTrigger.Text = GetStuff("Misc", "Trigger")
txtIdle.Text = GetStuff("Misc", "Idle")
chkIdle = GetStuff("Misc", "chkedIdle")
End Sub
Title: Re:Idle
Post by: ______ on May 25, 2003, 04:01 PM
Quote from: TeEhEiMaN on May 25, 2003, 03:51 PM
Does this look right for the txt Box's cause I get an error on chkIdle = GetStuff("Misc", "chkedIdle"), Once I get this im pretty sure the idle will work.


Private Sub Command1_Click()
WriteStuff "Misc", "Master", txtMaster.Text
WriteStuff "Misc", "Trigger", txtTrigger.Text
WriteStuff "Misc", "Idle", txtIdle.Text

Unload Me

End Sub



wheres the   writestuff "Misc", "chkedIdle,chkedIdle.value
im assuming chkeidle is a check box
Title: Re:Idle
Post by: tA-Kane on May 25, 2003, 04:18 PM
TeEhEiMaN, please use the [ code ] and [ /code ] tags.
Title: Re:Idle
Post by: TeEhEiMaN on May 25, 2003, 04:42 PM

Private Sub Timer1_Timer()
   Static counter As Integer
   If CleanSlateBot1.Connected Then
       If Form5.chkIdle.Value = Checked Then
           counter = counter + 1
           If counter >= 1 Then '5min = 5  2hrs = 120
               CleanSlateBot1.Send Form5.txtIdle.Text  'send the idle message
               counter = 0
           End If
       End If
   End If
End Sub


Thats what I have set, It Looks i put It in perfect, It runs with out errors but does no idle, HELP ME PLZZZZZZZZZZzz
[/code]
Title: Re:Idle
Post by: ______ on May 25, 2003, 05:10 PM
Quote from: TeEhEiMaN on May 25, 2003, 04:42 PM


It runs with out errors but does no idle, HELP ME PLZZZZZZZZZZzz


do u have text in the txtIdle.Text if so you have to wait 1 min after you turn it on.
Title: Re:Idle
Post by: TeEhEiMaN on May 25, 2003, 05:50 PM
I did, I got no clue why its not working, Did the script I send look right?
Title: Re:Idle
Post by: ______ on May 25, 2003, 06:02 PM
Quote from: TeEhEiMaN on May 25, 2003, 04:42 PM

Private Sub Timer1_Timer()
   Static counter As Integer
   If CleanSlateBot1.Connected Then
       If Form5.chkIdle.Value = Checked Then
           counter = counter + 1
           If counter >= 1 Then '5min = 5  2hrs = 120
               CleanSlateBot1.Send Form5.txtIdle.Text  'send the idle message
               counter = 0
           End If
       End If
   End If
End Sub

Seems to be fine to me   :-\

Edit: fixed badly corrupting tags.
Title: Re:Idle
Post by: TeEhEiMaN on May 25, 2003, 08:44 PM
If anyone has aim  and could walk me throught this, I would really appreciate it. Thanks
Aim: xTeEhEiMaNx
Title: Re:Idle
Post by: tA-Kane on May 25, 2003, 10:25 PM
Quote from: ______ on May 25, 2003, 06:02 PM
Quote from: TeEhEiMaN on May 25, 2003, 04:42 PM[/Code]
Please remember that for some dumb reason, the tags are case-sensitive, and only work when they're completely lower-case.
Title: Re:Idle
Post by: TeEhEiMaN on May 26, 2003, 02:38 PM
Here are both of the codes

Form 5 With all the TXT box's

Private Sub Command1_Click()
WriteStuff "Misc", "Master", txtMaster.Text
WriteStuff "Misc", "Trigger", txtTrigger.Text
WriteStuff "Misc", "Idle", txtIdle.Text
WriteStuff "Misc", "chkIdle", chkIdle.Value

Unload Me

End Sub

Private Sub Command2_Click()

Unload Me

End Sub

Private Sub Form_Load()

txtMaster.Text = GetStuff("Misc", "Master")
txtTrigger.Text = GetStuff("Misc", "Trigger")
txtIdle.Text = GetStuff("Misc", "Idle")
chkIdle.Value = GetStuff("Misc", "chkIdle")
End Sub


Forum 1 With the Code

Private Sub Timer1_Timer()
   Static counter As Integer
   If CleanSlateBot1.Connected Then
       If Form5.chkIdle.Value = Checked Then
           counter = counter + 1
           If counter >= 1 Then '5min = 5  2hrs = 120
               CleanSlateBot1.Send Form5.txtIdle.Text  'send the idle message
               AddChat vbBlue, txtUsername.Text & ": ", vbWhite, Form5.txtIdle.Text
                   counter = 0
           End If
       End If
   End If
End Sub



What the fuck, Its set up perfect?!
Title: Re:Idle
Post by: TeEhEiMaN on May 26, 2003, 11:06 PM
Can someone please help me with this?
Title: Re:Idle
Post by: Tazo on May 27, 2003, 05:11 AM
Quote from: TeEhEiMaN on May 26, 2003, 02:38 PM
Forum 1 With the Code
Title: Re:Idle
Post by: RhiNo on May 27, 2003, 08:58 AM
well your code is
Private Sub Timer1_Timer()
   Static counter As Integer
   If CleanSlateBot1.Connected Then
       If Form5.chkIdle.Value = Checked Then
           counter = counter + 1
           If counter >= 1 Then '5min = 5  2hrs = 120
               CleanSlateBot1.Send Form5.txtIdle.Text  'send the idle message
               AddChat vbBlue, txtUsername.Text & ": ", vbWhite, Form5.txtIdle.Text
                   counter = 0
           End If
       End If
   End If
End Sub

It may help if you add Form5.txtIdle.text &vbCrLf this seems to always be what my problem is when sending stuff to battle.net
Title: Re:Idle
Post by: Stealth on May 27, 2003, 04:13 PM
Quote from: RhiNo on May 27, 2003, 08:58 AM
It may help if you add Form5.txtIdle.text &vbCrLf this seems to always be what my problem is when sending stuff to battle.net

CleanSlateBot will automatically add vbCrLf to the end of the string to be sent.

I noticed your code refers to your timer running once every minute. To my knowledge, timer object intervals are stored in integer-types [+/- 32767] that translate into milliseconds, so the highest interval you could have would be a little under 33 seconds. What interval did you specify?

What you may want to try is adding a series of messageboxes or AddChats that will occur if certain parts of the code run (ie, one inside each If statement) to see at what point it fails.
Title: Re:Idle
Post by: ______ on May 28, 2003, 08:24 AM
is the timer1 on your main form?
Title: Re:Idle
Post by: RhiNo on May 28, 2003, 09:56 AM
ehhh sr dont really use bnls all that often for certain reasons but thats besides the point
Title: Re:Idle
Post by: CrAz3D on May 28, 2003, 10:44 AM
Private Sub AntiIdle_Timer()
If frmOptions.txtIdle.text = "" Then
   Exit Sub
End If
If frmOptions.txtInterval.text = "" Then
   Exit Sub
End If


Idle2 = Idle2 + 1
If Idle2 >= frmOptions.txtInterval.text Then
   CleanSlateBot1.Send frmOptions.txtIdle.text
   Idle2 = 0
End If
End Sub

In your declares area Public Idle2 sa an integer