StealthBot.net: Resolved: How do you create databases? - StealthBot.net

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Resolved: How do you create databases? And read them, and pull information off of them...

#26 User is offline   SierraKomodo Icon

  • Warn Status: 99.9%
  • PipPipPip
  • Group: Members
  • Posts: 192
  • Joined: January-01 10

Posted March 02, 2010 - 02:25 AM

Alright, doing what Tuck did I've gotten passed that error and now come across this:

Quote

[06:23:43 PM] Database does not exist at: C:\Users\Scott\AppData\Roaming\StealthBot\ACSRiggor_\Data.mdb - Creating database
[06:23:43 PM] Scripting runtime error '424' in DBTest: (line 35; column 0)
[06:23:43 PM] Object required: 'dbConn'
[06:23:43 PM] Offending line: >>
[06:23:43 PM] Scripting runtime error '424' in DBTest: (line 35; column 0)
[06:23:43 PM] Object required: 'dbConn'
[06:23:43 PM] Offending line: >>


Just out of curiousity, why does it give the same error twice?

#27 User is offline   The-Black-Ninja Icon

  • The Sex
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,526
  • Joined: August-01 09

Posted March 02, 2010 - 02:29 AM

Holy fuck, Tuck, stop fixing my shit. Let me get to it.

@SierraKomodo: What does your line 35 read? Also, I've updated the script since your last error find, so please re-download it.

#28 User is offline   SierraKomodo Icon

  • Warn Status: 99.9%
  • PipPipPip
  • Group: Members
  • Posts: 192
  • Joined: January-01 10

Posted March 02, 2010 - 02:30 AM

Lol.. What I have is your updated version, after restarting my bot and deleting the data.mdb and data.ldb files like he said. (Disabling the script wouldn't let me delete the files)

#29 User is offline   The-Black-Ninja Icon

  • The Sex
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,526
  • Joined: August-01 09

Posted March 02, 2010 - 02:34 AM

Do you have version 1.2? Oh wait, I see the error. It's quite gay, gimme a sec.

#30 User is offline   SierraKomodo Icon

  • Warn Status: 99.9%
  • PipPipPip
  • Group: Members
  • Posts: 192
  • Joined: January-01 10

Posted March 02, 2010 - 02:42 AM

Yeah, I have the 1.2 up. Line 35 reads this:

dbConn.Execute("CREATE TABLE `users` (`name` varchar(30), `comments` Text)")

It's picking up an error on line 59 now though

Quote

[06:42:12 PM] Scripting runtime error '-2147352567' in DBTest: (line 59; column 0)
[06:42:12 PM] Offending line: >>
[06:42:12 PM] Scripting runtime error '-2147352567' in DBTest: (line 59; column 0)
[06:42:12 PM] Offending line: >>


Which reads:

If userExists > 0 Then

#31 User is offline   The-Black-Ninja Icon

  • The Sex
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,526
  • Joined: August-01 09

Posted March 02, 2010 - 02:45 AM

OMFG!!! Fucking copy and paste man, pissing me off, hang on again, it didn't copy the new stuff, it repasted the old shit.

There, line by line I had to check it. How sad is that? 2009 computer and it can't even copy and paste properly.

#32 User is offline   SierraKomodo Icon

  • Warn Status: 99.9%
  • PipPipPip
  • Group: Members
  • Posts: 192
  • Joined: January-01 10

Posted March 02, 2010 - 02:48 AM

Dang yall must go through alot when making these scripts.. And so far I havent been able to figure out how to fix any of it >.>

Quote

[06:46:21 PM] Scripting parsing error '1002' in DBTest.txt: (line 92; column 3)
[06:46:21 PM] Syntax error
[06:46:21 PM] Offending line: >> If Set rs = Nothing


92:: If Set rs = Nothing

Or it could be your copy+paste failed XD

#33 User is offline   The-Black-Ninja Icon

  • The Sex
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,526
  • Joined: August-01 09

Posted March 02, 2010 - 02:49 AM

No it all works, I just tested it. It's good to go. 1.4

Quote

[09:47:49 PM] Scripts loaded.
[09:47:50 PM] Zomg!! Hacker found!
[09:47:50 PM] Heather[Hang] reported as: Hacking n00b!


[09:47:56 PM] Scripts loaded.
[09:47:56 PM] Zomg!! Hacker found!
[09:47:56 PM] Heather[Hang] is already reported as a hacker. Retrieving info...
[09:47:56 PM] Heather[Hang] is reported as a hacker with the reason: Hacking n00b!


#34 User is offline   SierraKomodo Icon

  • Warn Status: 99.9%
  • PipPipPip
  • Group: Members
  • Posts: 192
  • Joined: January-01 10

Posted March 02, 2010 - 02:57 AM

Yep, it loads without a hitch. A couple questions about scripts and what not though:

1.) Shouldn't there be a line saying
Private GetHackerInfo(name) or GetHackerInfo() and
Private AddHacker(name, sComments) or AddHacker()?

Not sure if the variables are supposed to be in there or not.. But all the scripts I poke through seem to have things like that.

2.) Why do some subs/variables have Public and some have Private? What exactly is the difference there?

#35 User is offline   The-Black-Ninja Icon

  • The Sex
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,526
  • Joined: August-01 09

Posted March 02, 2010 - 03:38 AM

1) Nope, I'm calling subs for both those actions. You don't need to declare subs or functions of any kind.

2) Public means it's available throughout the script and other scripts can use the same variable, if you set the other scripts to do that, otherwise, Private just means it's for that script and that script alone. Public subs are subs like Event_Whatever, or Timer subs, anything you make up yourself can be private if you want.

#36 User is offline   SierraKomodo Icon

  • Warn Status: 99.9%
  • PipPipPip
  • Group: Members
  • Posts: 192
  • Joined: January-01 10

Posted March 13, 2010 - 06:01 PM

When creating a table for a database.. How would I set up a column that does a True/False entry, and how would I tell the script to write true/false?

#37 User is offline   The-Black-Ninja Icon

  • The Sex
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,526
  • Joined: August-01 09

Posted March 13, 2010 - 10:32 PM

You can use the Yes/No data type.

http://www.w3schools...l_datatypes.asp

#38 User is offline   SierraKomodo Icon

  • Warn Status: 99.9%
  • PipPipPip
  • Group: Members
  • Posts: 192
  • Joined: January-01 10

Posted March 15, 2010 - 05:03 AM

Ok, I'm having this small issue when coding a script, which I can't figure out how to solve:

Quote

[10:00:54 PM] -- Eriseth [109ms] has joined the channel using StarCraft: Brood War (0 wins).
[10:00:54 PM] Scripting runtime error '-2147217900' in Identifier Script: (line 76; column 0)
[10:00:54 PM] [Microsoft][ODBC Microsoft Access Driver] Syntax error in string in query exp​ression '1')'.
[10:00:54 PM] Offending line: >>


This is the script so far:

Script("Name") = "Identifier Script"
Script("Author") = "Sierra.Komodo"
Script("Major") = 1
Script("Minor") = 00
Script("Revision") = 0
Script("Description") = "Provides an improvement to StealthBot's channel protection and safelist system."

'// Placeholder for notes and instructions

Public idsConn      '// Connection to the database.
Public idsDBPath      '// Path to the database.
Private idsFSO        '// FileSystemObject

Sub Event_Load()
  AddChat 10010100, "IDS: ", 10010010, "Sierra.Komodo's Identifier Script Version " & Script("Major") & "." & Script("Minor") & " Revision " & Script("Revision") & " Loaded."
  If GetSettingsEntry("Version") = vbNullString Then
    WriteSettingsEntry "Version", "1.00 R0                    '// Don't edit this line. It won't change anything anyway, it's for your reference."
    WriteSettingsEntry "'// Number of times an unidentified user can join before being banned instead of kicked.", vbNullString
    WriteSettingsEntry "IDS_Chances", 1
    WriteSettingsEntry "'// Message used for each successive kick.", vbNullString
    WriteSettingsEntry "IDS_KickMsg", "You need to be identified before entering this channel [%c joins left before ban]"
    WriteSettingsEntry "'// Message used when the script bans a user.", vbNullString
    WriteSettingsEntry "IDS_BanMsg", "You need to be identified before entering this channel [0 joins left. Banned]"
    
    Call CleanINI()
    
  End If
  
  Call CreateCmds()
  
  idsDBPath = BotPath() & "IdentifierData.mdb"
  Set idsFSO = CreateObject("Scripting.FileSystemObject")
  If Not idsFSO.FileExists(idsDBPath) Then
    ids_create_database
   Else
    ids_connect
  End If
  
  Set rs = idsConn.Execute("SELECT COUNT(*) FROM `users`")
  If rs.Fields(0) = 0 Then
    idsConn.Execute("INSERT INTO `users` (`name`, `comment`, `identifier_name`) " & _
    "Values ('" & BotVars.Username & "', 'Bot Console', '" & BotVars.Username & "')")
    
    AddChat 10010100, "IDS: ", 10010010, "Bot Console has been added as the first identified user."
  End If
End Sub


Sub Event_Userjoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString, Banned)

  '// Check if user is identified
  Set rs = idsConn.Execute("SELECT COUNT(*) FROM `users` WHERE `name`='" & Username & "'")
  '// If not identified...
  If rs.Fields(0) = 0 Then
    '// Check is user is in unidentified database
    Set rs = idsConn.Execute("SELECT COUNT(*) FROM `unidentified` WHERE `name`='" & Username & "'")
    '// If in unidentified database...
    If rs.Fields(0) <> 0 Then
      '// Get 'chances'
      Set rs = idsConn.Execute("SELECT * FROM `unidentified` WHERE `name`='" & Username & "'")
      chances = rs.Fields(1)
        '// If chances is below maximum chances...
        If chances < GetSettingsEntry("ids_Chances") Then
          '// Update chances
          idsConn.Execute("UPDATE `unidentified` SET `chances` = '" & chances + 1 & "'")
          '// Kick user
          Call idsKick(username, chances)
         '// If chances is equal to or above maximum chances...
         Else
          '// Ban user
          Call idsBan(username)
        End If
     '// If not in unidentified database...
     Else
      '// Add to unidentified database
      idsConn.Execute("INSERT INTO `unidentified` (`name`, `chances`)" & _
      "Values ('" & Username & "', " & 1 & "')")
      '// Kick user
      Call idsKick(Username)
    End If
    
  End If
End Sub


Private Sub idsKick(Username)

  Command BotVars.Username, "/kick " & Username & GetSettingsEntry("IDS_KickMsg")
End Sub


Private Sub idsBan(Username)

  Command BotVars.Username, "/ban " & Username & GetSettingsEntry("IDS_BanMsg")
End Sub


Sub ids_create_database()

  Set Catalog = CreateObject("ADOX.Catalog")
  Catalog.Create "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type=5;Data Source=" & idsDBPath
  
  ids_connect()
  
  idsConn.Execute("CREATE TABLE `users` (`name` varchar(30) NOT NULL, `comment` Text, `identifier_name` varchar(30) NOT NULL)")
  idsConn.Execute("CREATE TABLE `unidentified` (`name` varchar(30) NOT NULL, `chances` Integer NOT NULL)")
End Sub


Sub ids_connect()

  Set idsConn = CreateObject("ADODB.connection")
  dsn = "Driver={Microsoft Access Driver (*.mdb)};Dbq=" & idsDBPath
  idsConn.ConnectionString = dsn
  
  idsConn.Open
End Sub


Public Sub Event_Command(Command)

  If Command.IsLocal Then Command.Username = BotVars.Username
  
  Select Case LCase(Command.Name)
    Case "idsremove":     Call idsremovecmd(Command, Command.Username)
    Case "idsadd":        Call idsaddcmd(Command, Command.Username)
  End Select
End Sub


Private Sub idsRemoveCmd(Command, user)

  If Command.IsValid Then
    If Command.HasAccess Then
      name = Command.Args
      
      Set rs = idsConn.Execute("SELECT COUNT(*) FROM `users` WHERE `name`='" & name & "'")
      If rs.Fields(0) <> 0 Then
        crsConn.Execute("DELETE FROM `members` WHERE `name`='" & name & "'")
        Command.Respond """ " & name & " "" has been removed from the IDS database."
       Else
        Command.Respond """ " & name & " "" was not found in the IDS database."
      End If
    End If
  End If
End Sub


Private Sub idsAddCmd(Command, user)

  If Command.IsValid Then
    If Command.HasAccess Then
      cmdArr = Split(Command.Args)
      
      Set rs = idsConn.Execute("SELECT COUNT(*) FROM `users` WHERE `name`='" & name & "'")
      If rs.Fields(0) = 0 Then
        
        idsConn.Execute("INSERT INTO `users` (`name`, `comment`, `identifier_name`) " & _
        "Values ('" & cmdArr(0) & "', '" & cmdArr(1) & "', '" & Username & "')")
        Set rs = idsConn.Execute("SELECT COUNT(*) FROM `unidentified` WHERE `name`='" & cmdArr(0) & "'")
        If rs.Fields(0) <> 0 Then
          idsConn.Execute("DELETE FROM `unidentified` WHERE `name`='" & cmdArr(0) & "'")
        End If
       Else
        Command.Respond """ " & name & " "" is already in the IDS database."
      End If
    End If
  End If
End Sub


Private Sub CreateCmds
  Set cmd = OpenCommand("idsAdd")
  If cmd Is Nothing Then
    Set cmd = CreateCommand("idsAdd")
    With cmd
      .Description = "Adds a user to the identified database."
      .RequiredRank = 60
      
      .Save
    End With
  End If
  
  Set cmd = OpenCommand("idsRemove")
  If cmd Is Nothing Then
    Set cmd = CreateCommand("idsRemove")
    With cmd
      .Description = "Removes a user from the identified database."
      .RequiredRank = 60
      .Save
    End With
  End If
End Sub

Private Sub CleanINI  '// Removes the " = " after the commented out lines that this script makes. Taken from TheBlackNinja's CRS script.

   Set fso = CreateObject("Scripting.FileSystemObject")
   Set File = fso.OpenTextFile(BotPath & "scripts\scripts.ini", 1, True)
      data = Split(File.ReadAll, vbNewLine)
   File.Close


   tMatch = False
   For i = 0 To UBound(data) -1
      If tMatch Then
         If Left(data(i), 3) = "'//" Then
            line = line & Split(data(i), "=")(0) & vbNewLine
         ElseIf InStr(data(i), "[") > 0 AND InStr(data(i), "]") > 0 Then
            tMatch = False
            line = line & data(i) & vbNewLine
         Else
            line = line & data(i) & vbNewLine
         End If
      Else
         If data(i) = "[Identifier Script]" Then
            tMatch = True
            line = line & data(i) & vbNewLine
         Else
            line = line & data(i) & vbNewLine
         End If
      End If
   Next

   fso.DeleteFile(BotPath & "scripts\scripts.ini")
   temp = Split(line, vbNewLine)
   For i = 0 To Ubound(temp) -1
      Set File = fso.OpenTextFile(BotPath & "scripts\scripts.ini", 8, True)
         File.WriteLine temp(i)
      File.Close
   Next
End Sub

Sub Event_Close()

  idsConn.Close
End Sub


This post has been edited by SierraKomodo: March 15, 2010 - 05:04 AM


#39 User is offline   The-Black-Ninja Icon

  • The Sex
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,526
  • Joined: August-01 09

Posted March 15, 2010 - 12:04 PM

      idsConn.Execute("INSERT INTO `unidentified` (`name`, `chances`)" & _
      "Values ('" & Username & "', " & 1 & ")")


#40 User is offline   AwaKening Icon

  • how do ya like me now
  • PipPipPipPipPip
  • Group: Members
  • Posts: 977
  • Joined: August-20 09

Posted March 15, 2010 - 05:50 PM

There's more that will error.

Line 64:
idsConn.Execute("UPDATE `unidentified` SET `chances` = '" ' chances + 1 ' "'")
to
idsConn.Execute("UPDATE `unidentified` SET `chances` = `chances` + 1")

Line 76:
The one Ninja showed you


You also did this in a FEW places: (make sure to fix all of them)
Command.Respond """ " ' name ' " "" has been removed from the IDS database."

Should look like this:
Command.Respond name & " has been removed from the IDS database."


This stuff was just at quick glance. Might be more errors, idk.

Edit (found more)
Command BotVars.Username, "/kick " & Username & GetSettingsEntry("IDS_KickMsg")
to
Command BotVars.Username, "/kick " & Username & " " & GetSettingsEntry("IDS_KickMsg")

Command BotVars.Username, "/ban " & Username & GetSettingsEntry("IDS_BanMsg")
to
Command BotVars.Username, "/ban " & Username & " " & GetSettingsEntry("IDS_BanMsg")

#41 User is offline   SierraKomodo Icon

  • Warn Status: 99.9%
  • PipPipPip
  • Group: Members
  • Posts: 192
  • Joined: January-01 10

Posted March 16, 2010 - 12:51 AM

Alright, I'll fix those up, test out the whole thing, then post it up if it works without a hitch

#42 User is offline   AwaKening Icon

  • how do ya like me now
  • PipPipPipPipPip
  • Group: Members
  • Posts: 977
  • Joined: August-20 09

Posted March 16, 2010 - 03:16 AM

I have marked this topic as resolved. If you did not receive a satisfactory response please reply and provide as much relevant information as possible.

#43 User is offline   SierraKomodo Icon

  • Warn Status: 99.9%
  • PipPipPip
  • Group: Members
  • Posts: 192
  • Joined: January-01 10

Posted March 19, 2010 - 04:52 AM

Figured it'd just be easier to post in this thread than make a new one for you guys to poke through -

I'm back to my hacker database, but now I'm coming up with a new error that only seems to appear when I'm trying to set a table with 'Integers':

Quote

[09:35:27 PM] Scripting runtime error '-2147217900' in Sierra Squadron Database: (line 176; column 0)
[09:35:27 PM] [Microsoft][ODBC Microsoft Access Driver] Syntax error in field definition.
[09:35:27 PM] Offending line: >>


The script in it's current form:
Script("Name") = "Sierra Squadron Database"
Script("Author") = "Sierra.Komodo"
Script("Major") = 1
Script("Minor") = 00
Script("Revision") = 0
Script("Description") = "Custom Database Script designed for SierraCom."

'// Extended Description
'//
'//
'// Commands
'//
'//
'// Known Bugs
'//
'//
'// To-Do List
'//
'//


Public ssConn        '// Connection to the database.
Public ssDBPath      '// Path to the database.
Private SSRStep       '// Contains current report step
Private SSRTitle
Private SSRHost
Private SSRRealm
Private ssFSO        '// FileSystemObject


Sub Event_Load()
  Version = Script("Major") & "." & Script("Minor") & " R" & Script("Revision")
  AddChat 10010200, "SSDB: ", 10010020, "Sierra.Komodo's " & Script("Name") & " Version " & Version & " Loaded."
  
  If GetSettingsEntry("Version") = vbNullString Then
    AddChat 10010200, "SSDB: ", 10010020, "Writing settings entries..."
    WriteSettingsEntry "Version", Version & "                    '// Don't edit this line. It won't change anything anyway, it's for your reference."
    
    Call CleanINI()
    
  End If
  
  AddChat 10010200, "SSDB: ", 10010020, "Checking commands, writing if needed..."
  Call CreateCmds()
  
  ssDBPath = BotPath() & "SSDBData.mdb"
  Set ssFSO = CreateObject("Scripting.FileSystemObject")
  If Not ssFSO.FileExists(ssDBPath) Then
    ss_create_database
    AddChat 10010200, "SSDB: ", 10010020, "Sierra Squadron Database created."
   Else
    ss_connect
    AddChat 10010200, "SSDB: ", 10010020, "Sierra Squadron Database loaded."
  End If
End Sub


Private Sub CreateCmds
  Set cmd = OpenCommand("ReportStart")
  If cmd Is Nothing Then
    Set cmd = CreateCommand("ReportStart")
    With cmd
      .Description = "Orders the script to begin a game report."
      .RequiredRank = "-1"
      
      .Save
    End With
  End If
  
  Set cmd = OpenCommand("ReportEnd")
  If cmd Is Nothing Then
    Set cmd = CreateCommand("ReportEnd")
    With cmd
      .Description = "Orders the script to terminate a game report."
      .RequiredRank = "-1"
      
      .Save
    End With
  End If
  
  Set cmd = OpenCommand("Report")
  If cmd Is Nothing Then
    Set cmd = CreateCommand("Report")
    With cmd
      .Description = "Placeholder for report entries."
      .RequiredRank = "-1"
      
      .Save
    End With
  End If

End Sub


Public Sub Event_Command(Command)

  If Command.IsLocal Then Command.Username = BotVars.Username
  
  Select Case LCase(Command.Name)
    Case "reportstart":     Call reportstartcmd(Command, Command.Username)
    Case "reportend":       Call reportendcmd(Command, Command.Username)
    Case "report":          Call reportcmd(Command, Command.Username)
  End Select
End Sub


Private Sub reportstartcmd(Command, user)
  cmdArr = Split(Command.Args)
  
  Command.Respond "Please give the realm for the report (Syntax: /report realm)"
  SSRID = 1
  SSRStep = 1
  

End Sub


Private Sub reportcmd(Command, user)

  If Command.IsValid Then
    If Command.HasAccess Then
      cmdArr = Command.Args
      
      If SSRStep = 0 Then
      
        Command.Respond "There is no active report. Please use the ReportStart command."
      End If

      If SSRStep = 3 Then
      
        SSRHost = cmdArr
        Command.Respond "Host set to: " & SSRHost
        Command.Respond "Initial database information is now being written..."
        ssConn.Execute("INSERT INTO `report` (`id`, `requested`, `realm`, `title`, `host`)" & _
                       "VALUES (" & 1 & ", " & 0 & ", '" & SSRRealm & "', '" & SSRTitle & "', '" & SSRHost & "')")
        SSRStep = 4
      End If
      If SSRStep = 2 Then
      
        SSRTitle = cmdArr
        Command.Respond "Title set to: " & SSRTitle
        Command.Respond "Please give the game host (Syntax: /report host)"
        SSRStep = 3
      End If
      If SSRStep = 1 Then
      
        SSRRealm = cmdArr
        Command.Respond "Realm set to: " & SSRRealm
        Command.Respond "Please give the game title (Syntax: /report title)"
        SSRStep = 2
      End If
    End If
  End If

End Sub


Private Sub reportendcmd(command, user)

  If SSRStep > 0 Then
    SSRStep = 0
    Command.Respond "Report cancelled"
   Else
    Command.Respond "No report in progress"
  End If

End Sub


Sub ss_create_database()

  Set Catalog = CreateObject("ADOX.Catalog")
  Catalog.Create "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type=5;Data Source=" & ssDBPath
  
  ss_connect()
  ssConn.Execute("CREATE TABLE `report` (`id` Integer, `requested` Integer, `realm`, Text, `title` Text, `host` Text)")
  ssConn.Execute("CREATE TABLE `reportP` (`pcount` Integer, `p1name` Text, `p2name` Text, `p3name` Text, `p4name` Text, `p5name` Text, `p6name` Text, `p7name` Text, `p8name` Text)")
  ssConn.Execute("CREATE TABLE `reportS` (`scount` Integer, `s1name` Text, `s2name` Text, `s3name` Text, `s4name` Text, `s5name` Text, `s6name` Text, `s7name` Text, `s8name` Text)")
  ssConn.Execute("CREATE TABLE `reportH` (`hcount` Integer, `h1name` Text, `h2name` Text, `h3name` Text, `h4name` Text, `h5name` Text, `h6name` Text, `h7name` Text, `h8name` Text)")
  
  ssConn.Execute("CREATE TABLE `hackers` (`gateway` Text, `username` varchar(30), `offenses` Integer, `multicommand` Integer, `automine` Integer, `autoqueue` Integer, `maphack` Integer, `spoof` Integer, `drophack` Integer)")
  '// Gateway-0 Username-1 Offenses-2 SH-3 AutoMine-4 AutoQueue-5 MH-6 Spoof-7 DH-8
  ssConn.Execute("CREATE TABLE `spoofers` (`gateway` Text, `spoofname` Text, `truename` varchar(30), `ip` text)")
End Sub


Sub ss_connect()

  Set ssConn = CreateObject("ADODB.connection")
  dsn = "Driver={Microsoft Access Driver (*.mdb)};Dbq=" & ssDBPath
  ssConn.ConnectionString = dsn
  
  ssConn.Open
  
End Sub


Private Sub CleanINI  '// Removes the " = " after the commented out lines that this script makes. Taken from TheBlackNinja's CRS script.

   Set fso = CreateObject("Scripting.FileSystemObject")
   Set File = fso.OpenTextFile(BotPath & "scripts\scripts.ini", 1, True)
      data = Split(File.ReadAll, vbNewLine)
   File.Close


   tMatch = False
   For i = 0 To UBound(data) -1
      If tMatch Then
         If Left(data(i), 3) = "'//" Then
            line = line & Split(data(i), "=")(0) & vbNewLine
         ElseIf InStr(data(i), "[") > 0 AND InStr(data(i), "]") > 0 Then
            tMatch = False
            line = line & data(i) & vbNewLine
         Else
            line = line & data(i) & vbNewLine
         End If
      Else
         If data(i) = "[" & Script("Name") & "]" Then
            tMatch = True
            line = line & data(i) & vbNewLine
         Else
            line = line & data(i) & vbNewLine
         End If
      End If
   Next

   fso.DeleteFile(BotPath & "scripts\scripts.ini")
   temp = Split(line, vbNewLine)
   For i = 0 To Ubound(temp) -1
      Set File = fso.OpenTextFile(BotPath & "scripts\scripts.ini", 8, True)
         File.WriteLine temp(i)
      File.Close
   Next
End Sub


Sub Event_Close()
  AddChat 10020100, "SSDB: ", 10010020, "Closing Database..."
  ssConn.Close
End Sub



Also, if you're wondering why it seems orientated toward writing reports for games, this is because I'm planning to have the script put out a generated report for each game which can be added to an email sent to blizzard. The information on who's using what hacks are being gathered from BWHF and personal observations.

#44 User is offline   The-Black-Ninja Icon

  • The Sex
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,526
  • Joined: August-01 09

Posted March 19, 2010 - 02:10 PM

It's " INT ", not " Integer ".

#45 User is offline   SierraKomodo Icon

  • Warn Status: 99.9%
  • PipPipPip
  • Group: Members
  • Posts: 192
  • Joined: January-01 10

Posted March 20, 2010 - 12:42 AM

Ah, thanks. Figures it'd be something simple

Replacing Integer with INT still comes up with the same error

Scratch that - Restarting the bot fixed the issue.

Scratch that again - I was just stupid and forgot to delete the database.

Also, I found my problem - I had the line reading "`title`, text," when it should've been "`title` text,"

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users