IPB

Welcome Guest ( Log In | Register )

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 
Reply to this topicStart new topic
> ventrilo plugin doesnt work oo, oo
FoxInTheBox
post Sep 26 2009, 10:57 AM
Post #1


Foxxy
***

Group: Members
Posts: 271
Joined: 10-July 09
Member No.: 52,383



Why doesnt this do anything :S
CODE

'cmd
'1.0
Private Const cmd_ventrilo = "ventrilo"
Private Const cmd_access = 10
Private Const cmd_command = "cmd" '// Command to do this.
Private Const cmd_limit = 5 '// Seconds each user has to wait before using the command again
Private cmd_userDic '// Define dictionary variable

Sub cmd_Event_Load()

Set cmd_userDic = CreateObject("Scripting.Dictionary") '// Set variable to the dictionary object
cmd_userDic.CompareMode = 1 '// Set the dictionary to ignore upper and lower case
End Sub


Sub cmd_Event_UserTalk(Username, Flags, Message, Ping)

GetDBEntry Username, MyAccess, MyFlags
if lcase(message) = lcase(BotVars.Trigger & cmd_command) then
If cmd_userDic.Exists(Username) Then '// If they've used the command before
If DateDiff("s", cmd_userDic.Item(Username), Now) < cmd_limit Then '// If they've used the command within the allowable time limit
Exit Sub
Else
cmd_userDic.Remove Username '// Remove their entry from the dictionary
End If
End If

If myAccess < 0 Then
Dsp 3, "1", Username, VBRed
ElseIf myAccess >= 0 AND myAccess < 5 Then
Dsp 3, "2", Username, VBRed
ElseIf myAccess >= 5 AND myAccess < 10 Then
Dsp 3, "3", Username, VBRed
ElseIf myAccess >= 10 AND myAccess < 20 Then
Dsp 3, "4", Username, VBRed
ElseIf myAccess >= 20 AND myAccess < 35 Then
Dsp 3, "5", Username, VBRed
ElseIf myAccess >= 35 AND myAccess < 40 Then
Dsp 3, "6", Username, VBRed
ElseIf myAccess >= 40 AND myAccess < 45 Then
Dsp 3, "7", Username, VBRed
ElseIf myAccess >= 45 AND myAccess < 50 Then
Dsp 3, "8", Username, VBRed
ElseIf myAccess >= 50 AND myAccess < 55 Then
Dsp 3, "9", Username, VBRed
ElseIf myAccess >= 55 AND myAccess < 80 Then
Dsp 3, "10", Username, VBRed
Else
'// List all the commands
End If

cmd_userDic.Item(Username) = Now '// Add their name to the dictionary with the time they issued the command
End If
End Sub

Sub cmd_Event_UserTalk(Username, Flags, Message, Ping)

GetDBEntry Username, MyAccess, MyFlags
if access < cmd_Access then exit sub
if lcase(message) = lcase(BotVars.Trigger & cmd_ventrilo) then
If cmd_userDic.Exists(Username) Then '// If they've used the command before
If DateDiff("s", cmd_userDic.Item(Username), Now) < cmd_limit Then '// If they've used the command within the allowable time limit
Exit Sub
Else
cmd_userDic.Remove Username '// Remove their entry from the dictionary
End If
End If

If myAccess < 999 Then
Dsp 3, "ventrilo", Username, VBRed
End If

cmd_userDic.Item(Username) = Now '// Add their name to the dictionary with the time they issued the command
End If
End Sub


--------------------
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Sep 26 2009, 09:58 PM
Post #2


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



Wow, such a good topic title...fixed.

Also, it doesn't work because something is wrong. Try explaining the problem more and I can give you more of an answer.


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
FoxInTheBox
post Sep 27 2009, 02:37 AM
Post #3


Foxxy
***

Group: Members
Posts: 271
Joined: 10-July 09
Member No.: 52,383



It doesnt do anything mhmm.


--------------------
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Sep 27 2009, 10:42 AM
Post #4


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



...

You've got two usertalk subs? Why? What's it supposed to do? If your access is less than 999, display "ventrilo"? That means anyone with an access of less than 999 will see their commands being listed, AND the word ventrilo.


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
FoxInTheBox
post Sep 27 2009, 11:09 AM
Post #5


Foxxy
***

Group: Members
Posts: 271
Joined: 10-July 09
Member No.: 52,383



didnt know how i could add ventrilo cmd :S


--------------------
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Sep 27 2009, 11:11 AM
Post #6


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



WOW, please start being more specific or I'm not going to help you; I don't want to be asking 20 questions for something you can do in 1 post:
QUOTE
What's it supposed to do? If your access is less than 999, display "ventrilo"? That means anyone with an access of less than 999 will see their commands being listed, AND the word ventrilo.
What is this new command supposed to be doing?


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
FoxInTheBox
post Sep 27 2009, 11:31 AM
Post #7


Foxxy
***

Group: Members
Posts: 271
Joined: 10-July 09
Member No.: 52,383



If someone type .ventrilo and have enough access:
Private Const cmd_access = 10
Then it will show
Dsp 3, "ventrilo", Username, VBRed
And it will work with the spam limit

This post has been edited by FoxInTheBox: Sep 27 2009, 11:40 AM


--------------------
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Sep 27 2009, 11:40 AM
Post #8


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



CODE
'cmd
'1.0
Private Const cmd_ventrilo = "ventrilo"
Private Const cmd_access = 10
Private Const cmd_command = "cmd" '// Command to do this.
Private Const cmd_limit = 5       '// Seconds each user has to wait before using the command again
Private cmd_userDic  '// Define dictionary variable

Sub cmd_Event_Load()

   Set cmd_userDic = CreateObject("Scripting.Dictionary")  '// Set variable to the dictionary object
   cmd_userDic.CompareMode = 1  '// Set the dictionary to ignore upper and lower case
End Sub


Sub cmd_Event_UserTalk(Username, Flags, Message, Ping)

   GetDBEntry Username, MyAccess, MyFlags
  
   Select Case Lcase(Message)
      Case cmd_command  
         If cmd_CheckSpam(Username) Then Exit Sub

         If myAccess < 0 Then
            Dsp 3, "1", Username, VBRed  
         ElseIf myAccess >= 0 AND myAccess < 5 Then
            Dsp 3, "2", Username, VBRed
         ElseIf myAccess >= 5 AND myAccess < 10 Then
            Dsp 3, "3", Username, VBRed
         ElseIf myAccess >= 10 AND myAccess < 20 Then
            Dsp 3, "4", Username, VBRed
         ElseIf myAccess >= 20 AND myAccess < 35 Then
            Dsp 3, "5", Username, VBRed
         ElseIf myAccess >= 35 AND myAccess < 40 Then
            Dsp 3, "6", Username, VBRed
         ElseIf myAccess >= 40 AND myAccess < 45 Then
            Dsp 3, "7", Username, VBRed
         ElseIf myAccess >= 45 AND myAccess < 50 Then
            Dsp 3, "8", Username, VBRed
         ElseIf myAccess >= 50 AND myAccess < 55 Then
            Dsp 3, "9", Username, VBRed
         ElseIf myAccess >= 55 AND myAccess < 80 Then
            Dsp 3, "10", Username, VBRed
         Else
            '// List all the commands
         End If
        
         cmd_userDic.Item(Username) = Now  '// Add their name to the dictionary with the time they issued the command
        
      Case cmd_ventrilo    
         If cmd_CheckSpam(Username) Then Exit Sub

         If myAccess < 999 Then
            Dsp 3, "ventrilo", Username, VBRed  
         End If
        
         cmd_userDic.Item(Username) = Now
   End Select
End Sub


Private Function cmd_CheckSpam(Username)

   If cmd_userDic.Exists(Username) Then  '// If they've used the command before
      If DateDiff("s", cmd_userDic.Item(Username), Now) < cmd_limit Then  '// If they've used the command within the allowable time limit
         cmd_CheckSpam = True
      Else
         cmd_userDic.Remove Username  '// Remove their entry from the dictionary
         cmd_CheckSpam = False
      End If
   End If
End Function


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 17th February 2020 - 03:37 PM
Skin by Andrea
Website Legal Information | Hosted by LunarPages