• Welcome to Valhalla Legends Archive.
 

Need Help

Started by OuTLawZGoSu, August 01, 2003, 08:19 PM

Previous topic - Next topic

OuTLawZGoSu

Sup... I need some help in making my bot activate commands through whispering. Aight, that prolly didint make sence so let me vbreak i tdown for you. When i whisper the bot .ver , the bot will whisper back Version 1.2. I tryed using this code:

If username = username Then
If Left((LCase(message)), 5) = (Form4.txtTrigger.Text & "test"Then
saymessage = (Len(message) - 5)
If whisper = True Then
Send "/w " & username& " ---- OuTLawZ BoT"
ElseIf whisper = False Then
Send " ---- OuTLawZ BoT "
End If
End If
End If
______________________________________________________

Where is sais " If Whisper = True Then" , that line fo code does not work. but where is sais " If Whisper = False Then" , that line of code works. I typed in .ver sand it send " ---- OuTLawZ BoT ".

Please let me no if you can help...

L8terZ

______

#1
Quote from: OuTLawZGoSu on August 01, 2003, 08:19 PM
Sup... I need some help in making my bot activate commands through whispering. Aight, that prolly didint make sence so let me vbreak i tdown for you. When i whisper the bot .ver , the bot will whisper back Version 1.2. I tryed using this code:

If username = username Then
If Left((LCase(message)), 5) = (Form4.txtTrigger.Text & "test"Then
saymessage = (Len(message) - 5)
If whisper = True Then
Send "/w " & username& " ---- OuTLawZ BoT"
ElseIf whisper = False Then
Send " ---- OuTLawZ BoT "
End If
End If
End If
______________________________________________________

Where is sais " If Whisper = True Then" , that line fo code does not work. but where is sais " If Whisper = False Then" , that line of code works. I typed in .ver sand it send " ---- OuTLawZ BoT ".

Please let me no if you can help...

L8terZ


its looking for "trigger & test" not  .ver
try lcase(username) for non case sensative
Why is there a saymessage when you dont even need it?



for your whisper you mean...
 
if chkwhisper.value = 1 then  
whisper = true
else
whisper= false
endif

?

iago

Quote from: OuTLawZGoSu on August 01, 2003, 08:19 PM
If username = username Then

Is it supposed to be like that?  That seems a little redundant because it seems redundant.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


CrAz3D

I'm positive this has been posted before, quite indepth aswell.
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 ...

OuTLawZGoSu

OK... now the code looks like this:



Case ID_TALK
AddC vbYellow, "<" & username & ">", vbWhite, message

If chkwhisper.Value = 1 Then
whisper = True
Else
whisper = False
End If

If username = username Then
If Left((LCase(message)), 5) = (Form4.txtTrigger.Text & "test") Then
If whisper = True Then
Send "/w " & LCase(username) & " ---- OuTLawZ BoT"
ElseIf whisper = False Then
Send " ---- OuTLawZ BoT "
End If
End If
End If


With this code, everyting under the "If chkwhisper.Value = 1 Then" does not work. PLz let me no wat im doing wrong.

Raven

Try changing

If chkwhisper.Value = 1 Then
whisper = True
Else
whisper = False
End If


to


If chkwhisper.Value = 1 Then
whisper = True
Else if chkWhisper.Value != 1 Then
whisper = False
End If

drivehappy

Quote from: Raven on August 02, 2003, 11:10 AM

If chkwhisper.Value = 1 Then
whisper = True
ElseIf chkWhisper.Value != 1 Then
whisper = False
End If


!= isn't a VB operator, you'll need to use <>

OuTLawZGoSu

so it's :

If chkwhisper.Value = 1 Then
whisper = True
ElseIf chkWhisper.Value <> = 1 Then
whisper = False
End If

?

Dr.JaY

#8
Quote from: OuTLawZGoSu on August 02, 2003, 01:10 PM
so it's :

If chkwhisper.Value = 1 Then
whisper = True
ElseIf chkWhisper.Value <> = 1 Then
whisper = False
End If

?

You don't need ElseIf chkWhisper.Value <> = 1 Then,
just use
Else
whisper = False
End If

CrAz3D

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 ...

OuTLawZGoSu

nope ... still not working, all commands under that code dont work.

Help?

if you need the ID_Talk code i gan post it. jus tlet me no...

Dr.JaY

#11
Try this...

If chkwhisper.Value = "0" Then
whisper = True
Else
whisper = False
End If


______

Quote from: Dr.JaY on August 04, 2003, 07:29 AM
Try this...

If chkwhisper.Value = "0" Then
whisper = True
Else
whisper = False
End If


why put quote's around the 0 ?

UserLoser

#13
Could just do it in one line.

Whisper = chkWhisper.value

*Expects massive toasting for helping*

Dr.JaY

Quote from: ___/\___ on August 11, 2003, 09:31 PM
Quote from: Dr.JaY on August 04, 2003, 07:29 AM
Try this...

If chkwhisper.Value = "0" Then
whisper = True
Else
whisper = False
End If


why put quote's around the 0 ?

Because it does the same thing..