Author Topic: Help, me out.  (Read 5160 times)

Vector

  • Administrator
  • Hero Member
  • *****
  • Posts: 550
    • View Profile
    • http://clanmage.phost.ws
Help, me out.
« Reply #30 on: November 20, 2008, 03:40:50 PM »
Code: [Select]
  If InStr(Message, "hi") Then
    '// They are saying a greeting. Let's give them a friendly reply
    AddQ "hi u"
  End If

However, you are testing to see if the message has "hi" in it. If they say "Hi" it won't work. In that case, you have to first place the message into all lower case.

Code: [Select]
  If InStr(Lcase(Message), "hi") Then
    AddQ "hi u"
  End If
« Last Edit: November 20, 2008, 03:41:39 PM by Vector »
I am an Unofficial StealthBot Technician, an Unofficial StealthBot scripter, among other things. See my about page for more info.

Quote from: ArticWolve
Sorry I went down. Had internet problems with a cracker-jack-licensed driver hitting my internet pole (about 8 of them fell) and drooping my phone and electricity. Sorry ><

Rev77.net Plugins Manager

Proud host of Vector.no-ip.info | VectorJBLS.no-ip.org Status: [img]http://rev77.net/ServerCheck/check.asp?query=check&server=VectorJBLS.no-ip.org_status.png\" border=\"0\" class=\"linked-image\" /]

Shito-Ryu Karate-Do Genbu-Kai Rank: 8th Kyu (White belt, one stripe)

Rev77.Net Remote Support (Double-Click my name only if you were told to)

If the above link doesn't work, or if you use Vista, try this alternate link.

Noob ~Vector

de80

  • Sr. Members
  • Full Member
  • ***
  • Posts: 148
    • View Profile
Help, me out.
« Reply #31 on: November 20, 2008, 03:43:28 PM »
So like this?

Code: [Select]
'Hi
'.01
'& By de80

Sub  Hi_UserTalk(Username, Flags, Message, Ping)
    
    AddQ & Username & " Hi "
    
End Sub

If InStr(Lcase(Message), "hi") Then
    AddQ "hi u"
  End If
[div align=\'center\']New To VBS World trying to learn.
 [/div]

ArticWolve

  • Global Moderators
  • Hero Member
  • *****
  • Posts: 636
    • View Profile
    • http://
Help, me out.
« Reply #32 on: November 20, 2008, 03:49:34 PM »
Not like that.
Code: [Select]
If InStr(Lcase(Message), "hi") Then
  AddQ "hi u"
End If
is in the sub, not outsideof it.
Quote
Darker then the darkest shade of night...
    A Rebel at heart... A criminal by mind
    All in the eyes of the beholder... is the truth to life
    But Th---The Only---The One and Only True Master of Death is the Reaper itself
[/color]
[/color]
[div align=\'center\'][img]http://img261.imageshack.us/img261/9411/mydesktopce6.jpg\" border=\"0\" class=\"linked-sig-image\" /][img]http://www.danasoft.com/sig/238153.jpg\" border=\"0\" class=\"linked-sig-image\" /][/div]                     [div align=\'center\']    Click ME for my forums. You know you want to click ME. Come on CLICK ME DAMN IT! But don't click THIS!![/div]

Vector

  • Administrator
  • Hero Member
  • *****
  • Posts: 550
    • View Profile
    • http://clanmage.phost.ws
Help, me out.
« Reply #33 on: November 20, 2008, 03:54:30 PM »
Quote from: de80
So like this?

Code: [Select]
'Hi
'.01
'& By de80

Sub  Hi_UserTalk(Username, Flags, Message, Ping)
    
    AddQ & Username & " Hi "
    
End Sub

If InStr(Lcase(Message), "hi") Then
    AddQ "hi u"
  End If
The If statement cannot be outside the UserTalk function, like you have.

It needs to be inside UserTalk

Code: [Select]
'Hi
'0.1
'&Hi:de80

Sub  Hi_Event_UserTalk(Username, Flags, Message, Ping)
  If InStr(Lcase(Message), "hi") Then
    AddQ "hi u"
  End If    
End Sub

Also, you seem to be forgetting that UserTalk is an Event.

Quote
Sub Hi_Event_UserTalk(Username, Flags, Message, Ping)

Your third line:
Code: [Select]
'&by de80
Needs to look like this:

Code: [Select]
'&Name of plugin:Name of author:What this plugin doesthis line is entirely optional, though.
I am an Unofficial StealthBot Technician, an Unofficial StealthBot scripter, among other things. See my about page for more info.

Quote from: ArticWolve
Sorry I went down. Had internet problems with a cracker-jack-licensed driver hitting my internet pole (about 8 of them fell) and drooping my phone and electricity. Sorry ><

Rev77.net Plugins Manager

Proud host of Vector.no-ip.info | VectorJBLS.no-ip.org Status: [img]http://rev77.net/ServerCheck/check.asp?query=check&server=VectorJBLS.no-ip.org_status.png\" border=\"0\" class=\"linked-image\" /]

Shito-Ryu Karate-Do Genbu-Kai Rank: 8th Kyu (White belt, one stripe)

Rev77.Net Remote Support (Double-Click my name only if you were told to)

If the above link doesn't work, or if you use Vista, try this alternate link.

Noob ~Vector

de80

  • Sr. Members
  • Full Member
  • ***
  • Posts: 148
    • View Profile
Help, me out.
« Reply #34 on: November 20, 2008, 03:55:03 PM »
Code: [Select]
'Hi
'.01
'& By de80

Sub  Hi_UserTalk(Username, Flags, Message, Ping)
    
    AddQ & Username & " Hi "
    If InStr(Lcase(Message), "hi") Then
    AddQ "hi u"
  End If

  End Sub
[div align=\'center\']New To VBS World trying to learn.
 [/div]

Vector

  • Administrator
  • Hero Member
  • *****
  • Posts: 550
    • View Profile
    • http://clanmage.phost.ws
Help, me out.
« Reply #35 on: November 20, 2008, 03:59:41 PM »
Sub Hi_Event_UserTalk

not Sub Hi_UserTalk

This line:

Code: [Select]
AddQ & Username & " Hi "
will execute each time someone talks, because it is not contained within an If block.
« Last Edit: November 20, 2008, 04:01:19 PM by Zone57 »
I am an Unofficial StealthBot Technician, an Unofficial StealthBot scripter, among other things. See my about page for more info.

Quote from: ArticWolve
Sorry I went down. Had internet problems with a cracker-jack-licensed driver hitting my internet pole (about 8 of them fell) and drooping my phone and electricity. Sorry ><

Rev77.net Plugins Manager

Proud host of Vector.no-ip.info | VectorJBLS.no-ip.org Status: [img]http://rev77.net/ServerCheck/check.asp?query=check&server=VectorJBLS.no-ip.org_status.png\" border=\"0\" class=\"linked-image\" /]

Shito-Ryu Karate-Do Genbu-Kai Rank: 8th Kyu (White belt, one stripe)

Rev77.Net Remote Support (Double-Click my name only if you were told to)

If the above link doesn't work, or if you use Vista, try this alternate link.

Noob ~Vector

ArticWolve

  • Global Moderators
  • Hero Member
  • *****
  • Posts: 636
    • View Profile
    • http://
Help, me out.
« Reply #36 on: November 20, 2008, 04:04:16 PM »
Quote from: Vector
[code]AddQ & Username & " Hi "
  /code]
 
  Vector: Lol at your error
 
  De80: He means this:
  [div class='codetop']CODE[/div][div class='codemain' style='height:200px;white-space:pre;overflow:auto']'Hi
  '.01
  '& Hi Script:De80
 
  Sub  Hi_Event_UserTalk(Username, Flags, Message, Ping)
 
   If InStr(Lcase(Message), "hi") Then
      AddQ "Hello " & Username
    End If

 
  End Sub[/div]

Corrected your mistakes in red ><
« Last Edit: November 20, 2008, 04:05:02 PM by Shadow »
Quote
Darker then the darkest shade of night...
    A Rebel at heart... A criminal by mind
    All in the eyes of the beholder... is the truth to life
    But Th---The Only---The One and Only True Master of Death is the Reaper itself
[/color]
[/color]
[div align=\'center\'][img]http://img261.imageshack.us/img261/9411/mydesktopce6.jpg\" border=\"0\" class=\"linked-sig-image\" /][img]http://www.danasoft.com/sig/238153.jpg\" border=\"0\" class=\"linked-sig-image\" /][/div]                     [div align=\'center\']    Click ME for my forums. You know you want to click ME. Come on CLICK ME DAMN IT! But don't click THIS!![/div]

de80

  • Sr. Members
  • Full Member
  • ***
  • Posts: 148
    • View Profile
Help, me out.
« Reply #37 on: November 20, 2008, 04:04:41 PM »
Code: [Select]
'Hi
'.01
'& By de80

Sub  Hi_Event_UserTalk(Username, Flags, Message, Ping)
    
    If InStr(Lcase(Message), "hi") Then
    
    AddQ "hi u"
  
  End If

  End Sub
« Last Edit: November 20, 2008, 04:08:02 PM by de80 »
[div align=\'center\']New To VBS World trying to learn.
 [/div]

Vector

  • Administrator
  • Hero Member
  • *****
  • Posts: 550
    • View Profile
    • http://clanmage.phost.ws
Help, me out.
« Reply #38 on: November 20, 2008, 04:17:37 PM »
There is nothing syntaxically wrong with de's post though.

Your third line is still the same.

yours is:
Code: [Select]
'& by de80
Should be:

Code: [Select]
'&Hi:de80:Says "hi u" when user says a message with "hi" in it
I am an Unofficial StealthBot Technician, an Unofficial StealthBot scripter, among other things. See my about page for more info.

Quote from: ArticWolve
Sorry I went down. Had internet problems with a cracker-jack-licensed driver hitting my internet pole (about 8 of them fell) and drooping my phone and electricity. Sorry ><

Rev77.net Plugins Manager

Proud host of Vector.no-ip.info | VectorJBLS.no-ip.org Status: [img]http://rev77.net/ServerCheck/check.asp?query=check&server=VectorJBLS.no-ip.org_status.png\" border=\"0\" class=\"linked-image\" /]

Shito-Ryu Karate-Do Genbu-Kai Rank: 8th Kyu (White belt, one stripe)

Rev77.Net Remote Support (Double-Click my name only if you were told to)

If the above link doesn't work, or if you use Vista, try this alternate link.

Noob ~Vector

ArticWolve

  • Global Moderators
  • Hero Member
  • *****
  • Posts: 636
    • View Profile
    • http://
Help, me out.
« Reply #39 on: November 20, 2008, 04:27:42 PM »
He edited it after I reposted. It was wrong but oh well. I guess
Quote
This post has been edited by de80: Today, 07:08 PM
means nothing. Anyways, good job De80.
Quote
Darker then the darkest shade of night...
    A Rebel at heart... A criminal by mind
    All in the eyes of the beholder... is the truth to life
    But Th---The Only---The One and Only True Master of Death is the Reaper itself
[/color]
[/color]
[div align=\'center\'][img]http://img261.imageshack.us/img261/9411/mydesktopce6.jpg\" border=\"0\" class=\"linked-sig-image\" /][img]http://www.danasoft.com/sig/238153.jpg\" border=\"0\" class=\"linked-sig-image\" /][/div]                     [div align=\'center\']    Click ME for my forums. You know you want to click ME. Come on CLICK ME DAMN IT! But don't click THIS!![/div]

de80

  • Sr. Members
  • Full Member
  • ***
  • Posts: 148
    • View Profile
Help, me out.
« Reply #40 on: November 20, 2008, 04:34:56 PM »
Ok, well now i want to try something, im gona need help but this is what i want to do, i do

-shitaddclan (clan name)

And it will shitlist every buddy in that clan, im gona probly need some help
[div align=\'center\']New To VBS World trying to learn.
 [/div]

ArticWolve

  • Global Moderators
  • Hero Member
  • *****
  • Posts: 636
    • View Profile
    • http://
Help, me out.
« Reply #41 on: November 20, 2008, 04:39:31 PM »
The beta does this already. I have no clue on how to do that one......
Quote
Darker then the darkest shade of night...
    A Rebel at heart... A criminal by mind
    All in the eyes of the beholder... is the truth to life
    But Th---The Only---The One and Only True Master of Death is the Reaper itself
[/color]
[/color]
[div align=\'center\'][img]http://img261.imageshack.us/img261/9411/mydesktopce6.jpg\" border=\"0\" class=\"linked-sig-image\" /][img]http://www.danasoft.com/sig/238153.jpg\" border=\"0\" class=\"linked-sig-image\" /][/div]                     [div align=\'center\']    Click ME for my forums. You know you want to click ME. Come on CLICK ME DAMN IT! But don't click THIS!![/div]

Vector

  • Administrator
  • Hero Member
  • *****
  • Posts: 550
    • View Profile
    • http://clanmage.phost.ws
Help, me out.
« Reply #42 on: November 20, 2008, 04:51:23 PM »
Yes, this is complicated for a beginner.

Shadow, GetInternalDataByUsername(Username, 0) will get the clan tag of the user that joined.

If you need any help, just ask me what each function does.

Consider this:

Code: [Select]
'cb
'0.1
'&Clan ban:Vector

'// Add the clans you want banned here.
Const ClanTags = Array("", "", "", "")

Sub cb_Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString)
  If InArray(ClanTags, GetInternalDataByUsername(Username, 0)) Then
    AddQ "/ban " & Username & " Clan banned"
  End If
End Sub

Function InArray(arr, Item)
  For i=0 to Ubound(arr)
    If Lcase(arr(i)) = Lcase(Item) Then
      InArray = True
      Exit Function
    End If
  Next

  '// If this line is reached, the user's clan is not banned.
  InArray = False
End Function

I don't have the patience to explain exactly how you do this. Please ask me, and I will answer any questions you may have.
« Last Edit: November 20, 2008, 04:52:05 PM by Vector »
I am an Unofficial StealthBot Technician, an Unofficial StealthBot scripter, among other things. See my about page for more info.

Quote from: ArticWolve
Sorry I went down. Had internet problems with a cracker-jack-licensed driver hitting my internet pole (about 8 of them fell) and drooping my phone and electricity. Sorry ><

Rev77.net Plugins Manager

Proud host of Vector.no-ip.info | VectorJBLS.no-ip.org Status: [img]http://rev77.net/ServerCheck/check.asp?query=check&server=VectorJBLS.no-ip.org_status.png\" border=\"0\" class=\"linked-image\" /]

Shito-Ryu Karate-Do Genbu-Kai Rank: 8th Kyu (White belt, one stripe)

Rev77.Net Remote Support (Double-Click my name only if you were told to)

If the above link doesn't work, or if you use Vista, try this alternate link.

Noob ~Vector

de80

  • Sr. Members
  • Full Member
  • ***
  • Posts: 148
    • View Profile
Help, me out.
« Reply #43 on: November 20, 2008, 05:56:37 PM »
Code: [Select]
'cb
'0.1
'&Clan ban:Vector

'// Add the clans you want banned here.
Const ClanTags = Array("", "", "", "")

Sub cb_Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString)
  If InArray(ClanTags, GetInternalDataByUsername(Username, 0)) Then
    AddQ "-shitadd " & Username & " Clan banned"
  End If
End Sub

Function InArray(arr, Item)
  For i=0 to Ubound(arr)
    If Lcase(arr(i)) = Lcase(Item) Then
      InArray = True
      Exit Function
    End If
  Next

  '// If this line is reached, the user's clan is not banned.
  InArray = False
End Function

Would this shit list them?
[div align=\'center\']New To VBS World trying to learn.
 [/div]

Ace

  • Administrators
  • Full Member
  • ***
  • Posts: 227
    • View Profile
    • http://
Help, me out.
« Reply #44 on: November 20, 2008, 06:00:18 PM »
AddQ "-shitadd " & Username & " Clan banned"


Quote
Would this shit list them?

Yes, see above.
« Last Edit: November 20, 2008, 06:01:06 PM by 7thAce »
[img]http://zeus.cooltext.com/images/9ff/9fff41541771f1d8f564cabff80fd40cfb587413.jpg\" border=\"0\" class=\"linked-image\" /][img]http://209.85.12.232/13848/49/pip/admin.png\" border=\"0\" class=\"linked-image\" /]