Valhalla Legends Forums Archive | Battle.net Bot Development | Idleing, [vb]

AuthorMessageTime
FiReGoD
i know it was posted on here before, but the search did not come up with anything, anyone got an easy way to idle past 60 seconds because vb's timers are gay!
April 12, 2003, 7:55 PM
ILurker
Make two integer,
integer1 = ammount of seconds you want the idle to be

make the timer interval 1000
1000 = 1 second

make the timer add 1 number to the 2nd integer
then if 2nd integer = 1st integer then
send message
and set the 2nd integer to 0
April 12, 2003, 8:00 PM
drivehappy
[quote author=™ILurker™ link=board=17;threadid=1022;start=0#msg7660 date=1050177650]
Make two integer,
integer1 = ammount of seconds you want the idle to be

make the timer interval 1000
1000 = 1 second

make the timer add 1 number to the 2nd integer
then if 2nd integer = 1st integer then
send message
and set the 2nd integer to 0
[/quote]

If 1st Integer >= 2nd Integer Then
2nd Integer=0
Timer1.Enabled = False
Else
1st Integer = 1st Integer + 1
End If

'VB sometimes will go above the 2nd Int if you don't have > in there.
April 13, 2003, 12:01 AM
ILurker
[quote author=drivehappy link=board=17;threadid=1022;start=0#msg7684 date=1050192069]
[quote author=™ILurker™ link=board=17;threadid=1022;start=0#msg7660 date=1050177650]
Make two integer,
integer1 = ammount of seconds you want the idle to be

make the timer interval 1000
1000 = 1 second

make the timer add 1 number to the 2nd integer
then if 2nd integer = 1st integer then
send message
and set the 2nd integer to 0
[/quote]

If 1st Integer >= 2nd Integer Then
2nd Integer=0
Timer1.Enabled = False
Else
1st Integer = 1st Integer + 1
End If

'VB sometimes will go above the 2nd Int if you don't have > in there.

[/quote]

If 1st Integer >= 2nd Integer Then
--> 2nd Integer = 0
--> Timer1.Enabled = False
Else
1st Integer = 1st Integer + 1
End If
The way you had it, you put the wrong one to set to zero...
<That's if the 2nd integer is the idle amount the user set>

And, if it's an idle, you don't disable to timer doing it ;\
April 13, 2003, 1:50 AM
drivehappy
[quote author=™ILurker™ link=board=17;threadid=1022;start=0#msg7690 date=1050198606]
The way you had it, you put the wrong one to set to zero...
<That's if the 2nd integer is the idle amount the user set>

And, if it's an idle, you don't disable to timer doing it ;\
[/quote]
Ya, sorry I did put the wrong one.

I usually disable it, because I will usually have it call a function instead of doing it inside the timer. Yes, I know I forgot to put that in too, but it's just an example.
April 13, 2003, 1:58 AM
Camel
https://davnit.net/bnet/vL/phpbbs/index.php?board=17;action=display;threadid=653;start=0

[quote author=Noodlez link=board=17;threadid=653;start=0#msg5100 date=1043634145]
Er, I meant SetTimer. Not Create.

SetTimer is a function in user32.dll

[code]Public Declare Function SetTimer Lib "user32" Alias "SetTimer" (ByVal hWnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
[/code]

That's how you declare it.

An example call would be:
[code]SetTimer(Me.Hwnd,&H0,delay, AddressOf SendQueue)[/code]
[/quote]
April 13, 2003, 5:41 PM
Skywing
[quote author=Camel link=board=17;threadid=1022;start=0#msg7726 date=1050255681]
https://davnit.net/bnet/vL/phpbbs/index.php?board=17;action=display;threadid=653;start=0

[quote author=Noodlez link=board=17;threadid=653;start=0#msg5100 date=1043634145]
Er, I meant SetTimer. Not Create.

SetTimer is a function in user32.dll

[code]Public Declare Function SetTimer Lib "user32" Alias "SetTimer" (ByVal hWnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
[/code]

That's how you declare it.

An example call would be:
[code]SetTimer(Me.Hwnd,&H0,delay, AddressOf SendQueue)[/code]
[/quote]
[/quote]Don't forget USER32's KillTimer.
April 13, 2003, 6:46 PM
FiReGoD
i did it a differant way,

i put a non-visible text box on my form and set that to the time the user wants
i set the timer to a 1000 interval
then i put another one on the form and did
txt2.text = txt2.text + 1000

and in the timer i did
if txt1.text = txt2.text then
access.send readini(a, "Idle", b) & "- [BriskBot]"
txt2.text = "0"
end if

April 13, 2003, 7:23 PM
Camel
just use settimer and killtimer. it's a little bit of work to set up, but it's hella worth it. just look at the number of people using bnu`bot before and after using settimer and killtimer. it makes the bot much more clean...and stuff...
April 13, 2003, 9:03 PM
FiReGoD
the users dont even notice a differance
April 14, 2003, 2:31 AM

Search