• Welcome to Valhalla Legends Archive.
 

Help Please

Started by Forged, May 04, 2004, 09:16 PM

Previous topic - Next topic

Forged

I am a noob and for some reason my bot hates me and won't send my idle.  Can someone please help?


Private Sub idle_Timer()
   Dim strIdles As String
   Dim IdleWait As Integer
   Dim Idlemsg As String
   Dim strIdleType As String

   
   strIdles = ReadINI(f, "Idles", p)
   strIdleType = ReadINI(f, "IdleType", p)
   IdleWait = ReadINI(f, "IdleWait", p)
   Idlemsg = ReadINI(f, "IdleMsg", p)
   
   idle.Interval = CInt(IdleWait * 1000)
   if If strIdles = "y" Then    

   If strIdleType = "mp3" Then

   ExEasy1.Send "Now Playing: Vile`Chat v(1.2) By:Forged"
   
   ElseIf strIdleType = "msg" Then ExEasy1.Send Idlemsg
   
   ElseIf strIdleType = "uptime" Then ExEasy1.Send "System Uptime - " & ConvertTime(GetTickCount()) & " Vile`Chat (1.04)"
   End If
   end if
End Sub

Private Sub txtSend_KeyPress(KeyAscii As Integer)
Dim Message As String
If KeyAscii = 13 Then
ExEasy1.Send txtSend.Text
Message = txtSend.Text
txtSend.Text = ""
KeyAscii = 0
ExEasy1.AddChat vbYellow, "<", vbGreen, ExEasy1.CurrentUser, vbYellow, ">", vbWhite, Message

'Don't know if this is why
idle.Enabled = False
idle.Enabled = True

End If
End Sub
QuoteI wish my grass was Goth so it would cut itself

CrAz3D

'Don't know if this is why
idle.Enabled = False
idle.Enabled = True

That is resetting the idle...which probably isn't too good if you ever want it to "fire"
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Eli_1

#2
Quote from: CrAz3D on May 05, 2004, 02:08 PM
'Don't know if this is why
idle.Enabled = False
idle.Enabled = True

That is resetting the idle...which probably isn't too good if you ever want it to "fire"
If the user is truly idle (afk), then that shouldn't be a problem.

Edit:
I've never seen anyone use this before. But who knows, it might work -- VB allows tons of weird things...

if If strIdles = "y" Then    


hismajesty

#3
No, two consecutive if's would cause an error (expected expression) perhaps he meant to use iif()?

Edit: Typo

BaDDBLooD

what does iif function do?
There are only two kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.

Eli_1

#5
Quote from: BaDDBLooD on May 05, 2004, 03:24 PM
what does iif function do?

IIRC, the syntax is: iif(Statment, True, False)

Dim iTest As Integer
iTest = 1
MsgBox IIf(iTest = 1, "It's equal to 1!", "It's not equal to 1!"), vbOKOnly + vbInformation, "IIF Example"




'// Or maybe a bot example?  ;D
Public Function GetAccess(ByVal Username as String)
   GetAccess = IIF(Username = "Eli_1", 100, 0)
End Function

Forged

#6
I re-wrote my idletimer in math class because I was bored and it works now.
I forgot to add idle.enbaled = true


Private Sub idle_Timer()
   Dim strIdles As String
   Dim IdleWait As Integer
   Dim Idlemsg As String
   Dim strIdleType As String

   
   strIdles = ReadINI(f, "Idles", p)
   strIdleType = ReadINI(f, "IdleType", p)
   IdleWait = ReadINI(f, "IdleWait", p)
   Idlemsg = ReadINI(f, "IdleMsg", p)
   
 
   If strIdles = "y" Then idle.Enabled = True

   If strIdleType = "mp3" Then
   Dim WindowTitle As String
   WindowTitle = l_winamp.GetWindowTitle("Winamp v1.x")
   WindowTitle = Left(WindowTitle, Len(WindowTitle) - 9)
   
   ExEasy1.Send "Now Playing: " & WindowTitle & " Vile`Chat v(1.2) By:Forged"
   ExEasy1.Chat True, True, vbYellow, "Now Playing: " & WindowTitle & " Vile`Chat v(1.2) By:Forged"
   
   ElseIf strIdleType = "msg" Then ExEasy1.Send Idlemsg
   ExEasy1.Chat True, True, vbYellow, Idlemsg
   ElseIf strIdleType = "uptime" Then ExEasy1.Send "System Uptime - " & ConvertTime(GetTickCount()) & "  Vile`Chat (1.2)"
   ExEasy1.Chat True, True, vbYellow, "System Uptime - " & ConvertTime(GetTickCount()) & "  Vile`Chat (1.2)"
   End If
   

End Sub
QuoteI wish my grass was Goth so it would cut itself

Eli_1

#7
Haha, math and chemistry is where I write my best code.

Ironicly it's where I catch up on my sleep too.  ;D

effect

Dont hardcode your versions (App.Major/Minor/Revision)

Hope that helps you a little.
Quote from: Mangix on March 22, 2005, 03:03 AM
i am an expert Stealthbot VBScript. Recognize Bitch.

MyndFyre

Quote from: Forged on May 05, 2004, 06:52 PM
I forgot to add idle.enbaled = true

Don't you mean idle.enbalmed?
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Forged

Sorry I spelt it wrong

idle.Enabled

......
QuoteI wish my grass was Goth so it would cut itself