Author Topic: [Resolved] Getting an error on stealthbot  (Read 3356 times)

zammy

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • http://kaspar.risk.ee
[Resolved] Getting an error on stealthbot
« on: October 25, 2008, 07:14:34 AM »
Hi, im using hlleague script with SB and it worked perfect before but now it gives me errors every time user join or tryes to send a cmd to bot,   the regular bot cmd's work but still it show errors in bot but the hl cmd's dont work at all...

 [17:01:18] UserJoins Call Error On File> C:\Program Files\StealthBot\plugins\hlHeroicLeague.plug
 [17:01:18] Error Number: 424   Description: Object required


 [16:49:12] <Sh1tL1kE[EstL]@Northrend> .mp3
 [16:49:12] UserTalk Call Error On File> C:\Program Files\StealthBot\plugins\hlHeroicLeague.plug
 [16:49:12] Error Number: 424   Description: Object required
 [16:49:12] <To Sh1tL1kE[EstL]@Northrend> Current MP3: (Winamp not loaded)

Ace

  • Administrators
  • Full Member
  • ***
  • Posts: 227
    • View Profile
    • http://
[Resolved] Getting an error on stealthbot
« Reply #1 on: October 25, 2008, 01:44:01 PM »
Moved to heroic league.
[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\" /]

Hero

  • Administrator
  • Hero Member
  • *****
  • Posts: 502
    • View Profile
    • http://rev7.net
[Resolved] Getting an error on stealthbot
« Reply #2 on: October 26, 2008, 01:57:19 PM »
Did you edit it at all?
Did you uninstall any programs recently?
Hero
AKA: HeroAssasin and Mike
- - - - -  - - -
Visit Clan R77
- - - - -  - - -
Please do not PM me with random questions. That is what I made these forums for.

Noob ~Vector

zammy

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • http://kaspar.risk.ee
[Resolved] Getting an error on stealthbot
« Reply #3 on: October 27, 2008, 01:48:49 AM »
Yes, i tryed to completly reinstall Hlleague too   even that didnt help.
Umm mby one game, it was call of duty 2 i think.

Hero

  • Administrator
  • Hero Member
  • *****
  • Posts: 502
    • View Profile
    • http://rev7.net
[Resolved] Getting an error on stealthbot
« Reply #4 on: October 27, 2008, 01:22:20 PM »
Try re-downloading the stealthbot plugin system and posting your script here so i can check for problems.
Hero
AKA: HeroAssasin and Mike
- - - - -  - - -
Visit Clan R77
- - - - -  - - -
Please do not PM me with random questions. That is what I made these forums for.

Noob ~Vector

zammy

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • http://kaspar.risk.ee
[Resolved] Getting an error on stealthbot
« Reply #5 on: October 28, 2008, 03:01:48 AM »
Re installin g it didnt fix, heres the code
[div class='codetop']CODE[/div][div class='codemain' style='height:200px;white-space:pre;overflow:auto']'hl
'0.53
'&Heroic League:Hero.A
'&
'&
'& A guide should show up in a second

'#################################
'############# README ############
'#################################
'#################################
'Please do not edit ANY code without permission.
'You can ask for customizations on the forums
'All settings you can change are located in the HL Plugin folder in the file Settings.ini
'Do not change anything in the DoNotTouchFolder, you could really mess things up.

' # # # # # # # #
'// ## ToDo # //
' # # # # # # # #
 '// Finish the Database functions
 '// Finish league functions
 '// Finish
 
 '# # # # #
 '# LATER #
 '# # # # #
   '// Ranks?
   '// Game spam
   '// Multi Channel
 
   

' # # # # # # # # # # # #
'// ## CHANGELOG ## //
' # # # # # # # # # # # #
'// 0.53 ##
  '// Removed ELO
  '// Removed message variables because they do nothing yet.
'// 0.37 ##
  '// Completed GameBan
'// 0.36 ##
  '// Big Beta To Non-Beta Fix
'// 0.35 ##
  '// Added timer to check for closed database
  '// Fixed Update
  '// Added stats to update (Kinda confusing)
'// 0.34 ##
  '// Finished StartGame
  '// Finished Abort
  '// Finished Sign
  '// Finished Out
  '// Finished Slots Left
  '// Finished Force
  '// Allowed Force settings
  '// Created hl Executer
   '// -hlexec <rs/sql> <query>
  '// Vouching done
'// 0.21 ##
  '// Finished Top Command
  '// Finished Bottom Command
  '// Started startgame
  '// Started cancelgame
  '// Started signin
  '// Started Signout
'// 0.20 ##
  '// Fixed Command input
  '// Fixed Update
'// 0.19 ## 4/28/2008
  '// Rewrote and now finished command input.
  '// '
  '// Created automated command thingy
  '// COmmand settings ALL done
   '// On/Off during game
   '// Enabled/Disbled
   '// Aliases
   '// Access OR Flags
  '// Added a PHelp help stuff.
  '// Rewrote lots of functions
  '// Added debugging class
  '// Changed to just 1 class instead of 2 (hlLeague and hlChannel now hlLeague
'// 0.14 ## 4/20/2008
  '// Command Input / Alias control
  '// Ability to make Flag access
  '// Started real commands
'// 0.011 ## 4/15/2008
   '// Wrote Empty DB functions
   '// Close Game Sub
   '// Created quick pressed enter sub
   '// Fixed a stupid mistake in usertalk
   '// Other functions/subs
'// 0.09 ## 4/7/2008
   '// Made SaveGame ability
   '// Saves games and reloads them later
   '// Added/Removed Some settings
   '//
'// 0.07 ## 3/28/2008
   '// Added Update ability
   '// Made it tell if your versionis old new or beta on load
'// 0.03 ## 3/24/2008
   '// Create the class. Began subs.
   '// Added Settings
   '// Debugged
   '// Found unusual syntax error on "Private SelectedIndex"
'// 0.02 ## 3/2/2008
   '// Added Creation of Files
'// 0.01 ## 3/20/2008
   '// Started New XML Version
'#################################
'#################################
'#################################


Public HL_VER, HL_BETA, HL_VS
'************
HL_VER = 0.53
HL_BETA = 0.54
'************

Public Const vbLB = 13395456

Public hlFSO, hlRS, hlSQL
Set hlFSO = CreateObject("Scripting.FileSystemObject")
Set hlSQL = CreateObject("ADODB.Connection")
Set hlRS = CreateObject("ADODB.RecordSet")

Public hlLeague, hlDebug
Public HL_CURRENT_PROFILE, HL_LEAGUE_DB, _
  HL_ALL_COMMANDS, HL_GAMES_PRE, HL_SETTINGS_INI, _
  HL_ALLOW_GAMES, HL_STORAGE_INI, HL_MAIN_FOLDER, _
  HL_UPDATE_SITE, HL_MULTI_CHAN, HL_DEF_MODE, HL_TRIGGER, _
  HL_EMOTE, HL_CLAN, HL_VOUCH_MES, HL_VOUCH_ENA, HL_1LINETEAMS
 

HL_MAIN_FOLDER = BotPath & "HL Plugin\"
HL_SETTINGS_INI = HL_MAIN_FOLDER & "Settings.ini"
HL_STORAGE_INI = HL_MAIN_FOLDER & "Do Not Touch\Storage.ini"
HL_LEAGUE_DB = HL_MAIN_FOLDER & "League Functions\League.MDB"

HL_UPDATE_SITE = "http://rev77.net/f/p/u/hlHeroicLeague.txt"
HL_UPDATE_SITE_NON_BETA = "http://rev77.net/f/p/u/hlHeroicLeague.txt"

HL_TRIGGER = "/"

Public UPDATE_WAITING
UPDATE_WAITING = False

Public HL_DEBUG_ON
'**************
HL_DEBUG_ON = True
'**************

Sub hl_Event_Load()
  WriteConfigEntry "Connection", "Reload", "False", HL_STORAGE_INI
  AddChat vbLB, "----------------------------------------------------------------"
  AddChat vbLB, "Loaded ?cbHeroic League Plugin?cb on " & BotVars.Username & " at " & Time & "."
  AddChat vbLB, "Plugin by ?cbHero.A?cb"
  AddChat vbLB, "My Extreme Thanks to ?cbTheBlackNinja?cb, Smokie!, Night-Guardian, Vector, HearthCore, Periodic, Connection_Lost, And everyone else who has helped."
  AddChat vbLB, "Version ?cb" & HL_VER  & "?cb | Status: ?cb" & hl_Updater("Status")
  AddChat vbLB, "----------------------------------------------------------------"
  '*****************
 
  AddChat vbLB, "Loading Handlers.."
  Set hlLeague = New hlLeagueManager
  Set hlDebug = New Debugging
  AddChat vbLB, "Loaded!"
 


 
  ' Files, Folders, Settings
  AddChat vbLB, "Checking for required files.."
  Dim CreatedFiles, hlFold
  CreatedFiles = 0
  If Not hlFSO.FolderExists(HL_MAIN_FOLDER) Then
   Set hlFold = hlFSO.CreateFolder(HL_MAIN_FOLDER)
   CreatedFiles = CreatedFiles + 1
   Set hlFold = Nothing
  End If
  If Not hlFSO.FolderExists(HL_MAIN_FOLDER & "League Functions") Then
   Set hlFold = hlFSO.CreateFolder(HL_MAIN_FOLDER & "League Functions")
   CreatedFiles = CreatedFiles + 1
   Set hlFold = Nothing
  End If
  If Not hlFSO.FolderExists(HL_MAIN_FOLDER & "Do Not Touch") Then
   Set hlFold = hlFSO.CreateFolder(HL_MAIN_FOLDER & "Do Not Touch")
   CreatedFiles = CreatedFiles + 1
   Set hlFold = Nothing
  End If
  If Not hlFSO.FileExists(HL_SETTINGS_INI) Then
   Set hlFile = hlFSO.CreateTextFile(HL_SETTINGS_INI)
   CreatedFiles = CreatedFiles + 1
   hlFile.WriteLine " # # # # # # # # SETTINGS HELP # # # # # # # #"
   hlFile.WriteLine "CMD_commands - All the commands you can do to use CMD"
   hlFile.WriteLine "CMD_access - Access to use the command - ""ACCESS OR Flags"" - ""50"" - ""50 OR A"" - ""-1 OR A"""
   hlFile.WriteLine "CMD_enabled - Is this command on? Can you use it?"
   hlFile.WriteLine "CMD_allowed_during_game - Can this be used while people are signing into a game"
   hlFile.WriteLine "  #  #  #  #  #  #  #  #  #  #  #  #  #  #  # "
'    hlFile.WriteLine "  #  #  #  #  MESSAGE VARIABLES  #  #  #  #  "
'    hlFile.WriteLine "%u - User to use command"
'    hlFile.WriteLine "%pool - Current pool"
'    hlFile.WriteLine "%gn - Current Gamename"
'    hlFile.WriteLine "%clan - Your clan"
'    hlFile.WriteLine "%spotsleft - Spots left in a game"
'    hlFile.WriteLine "%1 %2 %3 and so on (up to 5). - Arguments - ""!kick bob sucker!"" (%1 = bob | %2 = sucker!)"
'    hlFile.WriteLine "%statsexp - User experience"
'    hlFile.WriteLine "%statswins - User Wins"
'    hlFile.WriteLine "%statsloss - User losses"
'    hlFile.WriteLine "%mode - Current game mode"
'    hlFile.WriteLine "%host - Current game host"
'    hlFile.WriteLine " # # # # # # # # # # # # # # # # # # # # # # #"
   hlFile.Close
   Set hlFile = Nothing
  End If
  If Not hlFSO.FileExists(HL_STORAGE_INI) Then
   Set hlFile = hlFSO.CreateTextFile(HL_STORAGE_INI)
   CreatedFiles = CreatedFiles + 1
   hlFile.Close
   Set hlFile = Nothing
  End If
  AddChat vbLB, "Created " & CreatedFiles & " required file(s)!"
 
  DB_Created = False
  If Not hlFSO.FileExists(HL_LEAGUE_DB) Then
   AddChat vbLB, "?cbDatabase missing! Creating..."
   Call hl_DB("All")
   DB_Created = True
  End If
  If Not DB_Created Then
   AddChat vbLB, "?cbConnecting to Database...."
   Call hl_DB("Connect")
  End If
 
  AddChat vbLB, "?cbCreating Connection timer.."
  TimerInterval "hl", "dbconn", 30
  TimerEnabled "hl", "dbconn", True
  AddChat vbLB, "?cbTimer created!"
 
  AddChat vbLB, "Checking for required settings..."
  Dim RetrievedSettings, CreatedSettings
  RetrievedSettings = 0
  CreatedSettings = 0
  CreatedSettings = CreatedSettings + hl_CreateCommands()
  If GetConfigEntry("General", "Game Prefix", HL_SETTINGS_INI) = vbNullString Then
   WriteConfigEntry "General", "Game Prefix", "dota", HL_SETTINGS_INI
   CreatedSettings = CreatedSettings + 1
   HL_GAMES_PRE = GetConfigEntry("General", "Game Prefix", HL_SETTINGS_INI)
   RetrievedSettings = RetrievedSettings + 1
  Else
   HL_GAMES_PRE = GetConfigEntry("General", "Game Prefix", HL_SETTINGS_INI)
   RetrievedSettings = RetrievedSettings + 1
  End If
  If GetConfigEntry("Special Commands", "FORCEReportGame_acc", HL_SETTINGS_INI) = vbNullString Then
   WriteConfigEntry "Special Commands", "FORCEReportGame_acc", "60", HL_SETTINGS_INI
   CreatedSettings = CreatedSettings + 1
  End If
  If GetConfigEntry("Special Commands", "FORCECancelGame_acc", HL_SETTINGS_INI) = vbNullString Then
   WriteConfigEntry "Special Commands", "FORCECancelGame_acc", "60", HL_SETTINGS_INI
   CreatedSettings = CreatedSettings + 1
  End If
  If GetConfigEntry("General", "Emote All", HL_SETTINGS_INI) = vbNullString Then
   WriteConfigEntry "General", "Emote All", "True", HL_SETTINGS_INI
   CreatedSettings = CreatedSettings + 1
   HL_EMOTE = GetConfigEntry("General", "Emote All", HL_SETTINGS_INI)
   RetrievedSettings = RetrievedSettings + 1
  Else
   HL_EMOTE = GetConfigEntry("General", "Emote All", HL_SETTINGS_INI)
   RetrievedSettings = RetrievedSettings + 1
  End If
  If GetConfigEntry("General", "Display Teams on 1-line", HL_SETTINGS_INI) = vbNullString Then
   WriteConfigEntry "General", "Display Teams on 1-line", "True", HL_SETTINGS_INI
   CreatedSettings = CreatedSettings + 1
   HL_1LINETEAMS = GetConfigEntry("General", "Display Teams on 1-line", HL_SETTINGS_INI)
   RetrievedSettings = RetrievedSettings + 1
  Else
   HL_1LINETEAMS = GetConfigEntry("General", "Display Teams on 1-line", HL_SETTINGS_INI)
   RetrievedSettings = RetrievedSettings + 1
  End If
  If GetConfigEntry("General", "ChannelName",  HL_SETTINGS_INI) = vbNullString Then
   WriteConfigEntry "General", "ChannelName", "Clan dota", HL_SETTINGS_INI
   CreatedSettings = CreatedSettings + 1
   CHANNEL_NAME = GetConfigEntry("General", "ChannelName", HL_SETTINGS_INI)
   RetrievedSettings = RetrievedSettings + 1
  Else
   CHANNEL_NAME = GetConfigEntry("General", "ChannelName", HL_SETTINGS_INI)
   RetrievedSettings = RetrievedSettings + 1
  End If
  If GetConfigEntry("General", "DefaultMode",  HL_SETTINGS_INI) = vbNullString Then
   WriteConfigEntry "General", "DefaultMode", "AREM", HL_SETTINGS_INI
   CreatedSettings = CreatedSettings + 1
   HL_DEF_MODE = GetConfigEntry("General", "DefaultMode", HL_SETTINGS_INI)
   RetrievedSettings = RetrievedSettings + 1
  Else
   HL_DEF_MODE = GetConfigEntry("General", "DefaultMode", HL_SETTINGS_INI)
   RetrievedSettings = RetrievedSettings + 1
  End If
  If GetConfigEntry("Vouch", "Enabled",  HL_SETTINGS_INI) = vbNullString Then
   WriteConfigEntry "Vouch", "Enabled", "True", HL_SETTINGS_INI
   CreatedSettings = CreatedSettings + 1
   HL_VOUCH_ENA = GetConfigEntry("Vouch", "Enabled", HL_SETTINGS_INI)
   RetrievedSettings = RetrievedSettings + 1
  Else
   HL_VOUCH_ENA = GetConfigEntry("Vouch", "Enabled", HL_SETTINGS_INI)
   RetrievedSettings = RetrievedSettings + 1
  End If
  If GetConfigEntry("Vouch", "Not Vouched Message",  HL_SETTINGS_INI) = vbNullString Then
   WriteConfigEntry "Vouch", "Not Vouched Message", "You are not vouched", HL_SETTINGS_INI
   CreatedSettings = CreatedSettings + 1
   HL_VOUCH_MES = GetConfigEntry("Vouch", "Not Vouched Message", HL_SETTINGS_INI)
   RetrievedSettings = RetrievedSettings + 1
  Else
   HL_VOUCH_MES = GetConfigEntry("Vouch", "Not Vouched Message", HL_SETTINGS_INI)
   RetrievedSettings = RetrievedSettings + 1
  End If
  If GetConfigEntry("General", "Clan Name",  HL_SETTINGS_INI) = vbNullString Then
   WriteConfigEntry "General", "Clan Name", "Clan XXX", HL_SETTINGS_INI
   CreatedSettings = CreatedSettings + 1
  Else
   HL_CLAN = GetConfigEntry("General", "Clan Name",  HL_SETTINGS_INI)
   RetrievedSettings = RetrievedSettings + 1
  End If
 
  AddChat vbLB, "Created " & CreatedSettings & " setting(s)!"
  AddChat vbLB, "Loaded " & RetrievedSettings & " setting(s)!"


  AddChat vbLB, "----------------------------------------------------------------"
  AddChat vbLB, "Completed! Plugin ready to go"
  AddChat vbLB, "----------------------------------------------------------------"
 
  If GetConfigEntry("Update", "Updated", HL_STORAGE_INI) = "True" Then
   AddChat vbLB, "?cbAN UPDATE HAS OCCURED"
   AddChat vbLB, "Lines Added: ?cb" & GetConfigEntry("Update", "Lines", HL_STORAGE_INI)
   AddChat vbLB, "Version Change: ?cb" & GetConfigEntry("Update", "Change", HL_STORAGE_INI)
   AddChat vbLB, "Thank you for using the plugin."
   WriteConfigEntry "Update", "Updated", "False", HL_STORAGE_INI
   AddChat vbLB, "----------------------------------------------------------------"
  End If
 
  If Len(GetBotVersion) < 45 Then
   Set hlFile = hlFSO.OpenTextFile(GetMyPath("hl"), 1)
   If InStr(hlFile.ReadAll, "Sub hl_Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString, Banned)") > 29800 Then
     AddChat vbYellow, "Updating to non-beta"
     hl_Updater "Non-Beta"
     AddChat vbYellow, "Updated to non-beta"
     AddChat vbYellow, "Please reload your script"
   End If
   hlFile.Close
  End If
 

End Sub

Function ParseMessage(Text, Username, Args)
  Pm = Replace(Text, "%u", Username)
  'Pm = Replace(Pm, "%1", Args(1))
  'Pm = Replace(Pm, "%2", Args(2))
  'Pm = Replace(Pm, "%3", Args(3))
  'Pm = Replace(Pm, "%4", Args(4))
  'Pm = Replace(Pm, "%5", Args(5))
  Pm = Replace(Pm, "%pool", hlLeague.GetPool)
  Pm = Replace(Pm, "%gn", hlLeague.GetSelectedGame)
  Pm = Replace(Pm, "%clan", HL_CLAN)
  Pm = Replace(Pm, "%mode", hlLeague.GameInfo(hlLeague.GetSelectedGame, "mode"))
  Pm = Replace(Pm, "%host", hlLeague.GameInfo(hlLeague.GetSelectedGame, "host"))
  ParseMessage = Pm
End Function

Sub hl_DB(Query)
  Select Case Query
   Case "All"
     Call hl_DB("Create")
     Call hl_DB("Connect")
     Call hl_DB("Tables")
     AddChat vbLB, "?cbAll database creation completed"
   Case "Create"
      Set cObj = CreateObject("ADOX.Catalog")
      cObj.Create "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type=5;Data Source=" & HL_LEAGUE_DB
     AddChat vbLB, "?cbCreated Database!"
   Case "Connect"
      hlSQL.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & HL_LEAGUE_DB
      hlSQL.Open
      AddChat vbLB, "?cbConnected to Database!"
   Case "Tables"
      hlSQL.Execute "CREATE TABLE `games` (`gn` varchar, `host` varchar, `type` varchar, `mode` varchar, `selected` varchar, `active` varchar, `created` varchar, `pool` varchar, `scourge` varchar, `sentinel` varchar)"
     AddChat vbLB, "?cbCreated Table `Games` in database!"
     hlSQL.Execute "CREATE TABLE `players`(`name` varchar, `exp` int, `wins` int, `losses` int, `vouched` varchar, `ingame` varchar, `gamename` varchar, `banned` varchar)"
     AddChat vbLB, "?cbCreated Table `Players` in database!"
   Case "Disconnect"
      hlSQL.Close
      AddChat vbLB, "?cbDisconnected from database!"
  End Select
End Sub

Function hl_CreateCommands()
  CreatedCmds = 0
   For Each CMD In hlLeague.Commands
   If GetConfigEntry("Commands", CMD & "_commands", HL_SETTINGS_INI) = vbNullString Then
     WriteConfigEntry "Commands", CMD & "_commands", hlLeague.GetAliases(CMD, True), HL_SETTINGS_INI
     CreatedCmds = CreatedCmds + 1
   End If
   If GetConfigEntry("Commands", CMD & "_access", HL_SETTINGS_INI) = vbNullString Then
     WriteConfigEntry "Commands", CMD & "_access", hlLeague.GetAccess(CMD, True), HL_SETTINGS_INI
     CreatedCmds = CreatedCmds + 1
   End If
   If GetConfigEntry("Commands", CMD & "_allowed_during_game", HL_SETTINGS_INI) = vbNullString Then
     WriteConfigEntry "Commands", CMD & "_allowed_during_game", hlLeague.GetAllowed(CMD, True), HL_SETTINGS_INI
     CreatedCmds = CreatedCmds + 1
   End If
   If GetConfigEntry("Commands", CMD & "_enabled", HL_SETTINGS_INI) = vbNullString Then
     WriteConfigEntry "Commands", CMD & "_enabled", hlLeague.GetEnabled(CMD, True), HL_SETTINGS_INI
     CreatedCmds = CreatedCmds + 1
   End If
  Next
  hl_CreateCommands = CreatedCmds
End Function

Sub hl_dbconn_Timer()
  If hlSQL.State = 0 AND GetConfigEntry("Connection", "Reload", HL_STORAGE_INI) <> "True" Then
   AddChat vbLB, "?cbYou are not connected to the Database!"
   AddChat vbLB, "?cbReconnecting..."
   Call hl_DB("Connect")
  End If
End Sub

Sub hl_Event_PressedEnter(Text)
  If Text = "/phelp hl" Then
   Set hlFile = hlFSO.OpenTextFile(HL_SETTINGS_INI, 1)
   X = False
   Do While Not hlFile.AtEndOfStream
     line = hlFile.ReadLine
     If line = "[" & HL_CURRENT_PROFILE & "]" Then
      X = True
     End If
     If X AND InStr(line, "[") > 0 AND line <> "[" & HL_CURRENT_PROFILE & "]" Then
      X = False
     End If
     If X Then
      Settings = Settings & vbTab & line & vbNewLine
     End If
   Loop
   Help = vbNewLine & vbTab & "-------------------------" & vbNewLine & _
   vbTab & "HL Plugin - Private Guide" & vbNewLine & _
   vbTab & "-------------------------" & vbNewLine & _
   vbTab & "- - - - - - - - - - - - -" & vbNewLine & _
   vbTab & "      SETTINGS       " & vbNewLine & _
   vbTab & "- - - - - - - - - - - - -" & vbNewLine & _
   vbTab & "Your settings are stored in a file called hlsettings.ini" & vbNewLine & _
   vbTab & "This File is found in your HL Plugin folder." & vbNewLine & _
   vbTab & "The complete path to the settings file is: " & HL_SETTINGS_INI & vbNewLine & _
   vbTab & "Displaying all your current settings..." & vbNewLIne & _
   vbTab & "- - - - - - - - - - - - -" & vbNewLine & _
        Settings & _
   vbTab & "- - - - - - - - - - - - -" & vbNewLine & _
   vbTab & "-------------------------"
   AddChat vbLB, Help
  End If
  Call hl_CommandInput(BotVars.Username, Text, 4)
End Sub

Function GetMyPath(Prefix)
  Dim tmpPath, gFile, gFSO, gFolder, gFilePath, gFileContent
  GetMyPath = vbNullString
  tmpPath = BotPath() & "plugins\"
  Set gFSO = CreateObject("Scripting.FileSystemObject")
  Set gFolder = gFSO.GetFolder(tmpPath)
  For Each gFilePath In gFolder.Files
   Set gFile = gFSO.OpenTextFile(gFilePath, 1)
   If Not gFile.AtEndOfStream Then
     gFileContent = Split(gFile.ReadAll, vbNewLine)
     If LCase(Mid(gFileContent(0), 2)) = LCase(Prefix) Then
      GetMyPath = gFilePath
     End If
   End If
   gFile.Close
   Set gFile = Nothing
  Next
End Function

Sub hl_CommandInput(Username, Text, dspID)
  '// BASIC CHECKS
  If Len(Text) <= 1 Then Exit Sub
  If Left(Text, Len(BotVars.Trigger)) <> BotVars.Trigger AND Left(Text, 1) <> "/" Then Exit Sub
  '// UPDATER
  If Trim(Text) = "//yes" Then
   VetoThisMessage
   If UPDATE_WAITING Then
     AddChat vbLB, "Updating... WARNING!! THIS MAY TAKE A WHILE. HIT CONTINUE ON ALL ABORTION MESSAGES"
     hl_Updater "Update"
     AddChat vbLB, "Update completed successfully."
     AddChat vbLB, "You have gone from ?cb" & HL_VER & "?cb to ?cb" & hl_Updater("ServerVer")
     Ver = hl_Updater("ServerVer")
     WriteConfigEntry "Update", "Change", Ver - HL_VER, HL_STORAGE_INI
     'AddChat vbLB, "Auto reloading script..."
     'ExecuteGlobal "Call ReloadScript"
     AddChat vbLB, "Please reload your script."
   End If
   Exit Sub
  ElseIf Trim(Text) = "//no" Then
   VetoThisMessage
   If UPDATE_WAITING Then
     UPDATE_WAITING = False
     AddChat vbLB, "Canceled Update"
   End If
   Exit Sub
  End If
  If Trim(Text) = "/update hl" Then
   VetoThisMessage
   Ver = hl_Updater("ServerVer")
   If Ver <= HL_VER Then
     UPDATE_WAITING = True
     AddChat vbLB, "You are already updated. You would be going from ?cb" & HL_VER & "?cb to ?cb" & Ver
     AddChat vbLB, "To update anyway type ""//yes"" to cancel type ""//no"""
   Else
     AddChat vbLB, "Updating... WARNING!! THIS MAY TAKE A WHILE. HIT CONTINUE ON ALL ABORTION MESSAGES"
     hl_Updater "Update"
     AddChat vbLB, "Update completed successfully."
     AddChat vbLB, "You have gone from ?cb" & HL_VER & "?cb to ?cb" & hl_Updater("ServerVer")
     'AddChat vbLB, "Auto reloading script..."
     AddChat vbLB, "Please reload your script."
   End If
   Exit Sub
  End If
  hlCmd = False
  '// ARGS AND ACCESS
  If dspID = 4 Then
   If Left(Text, 2) = "//" Then
     VetoThisMessage
     Args = Split(Mid(Trim(Text), 3), " ")
     dspID = 1
   Else
     Args = Split(Mid(Trim(Text), 2), " ")
   End If
  Else
   Args = Split(Mid(Trim(Text), 2), " ")
  End If
  GetDBEntry Username, uAccess, uFlags
  '// Emote?
  If HL_EMOTE <> "False" Then
   If dspID = 1 Then
     dspID = 2
   End If
  End If
  '// EXECUTE
  If LCase(Args(0)) = "hlexec" AND uAccess > 190 Then
   If LCase(Args(1)) = "rs" Then
     If LCase(Args(2)) = "close" Then
      hlRS.Close
      Dsp dspId, "RecordSet Closed", Username, vbLB
      Exit Sub
     End If
     hlRS.Open LCase(Mid(Text, Len(Args(1)) + Len(Args(2)) + 1 + 3)), hlSQL
     If hlRS.EOF Then
      Dsp dspID, "Not Found", Usernmae, vbRed
      hlRS.Close
      Exit Sub
     End If
     Dsp dspID, hlRS.GetString(,,"|","||"," "), Username, vbLB
     hlRS.Close
   ElseIf LCase(Args(1)) = "sql" Then
     hlSQL.Execute Mid(Text, Len(Args(0)) + Len(Args(1)) + 1 + 3)
     Dsp dspID, "Completed Query", Username, vbLB
   ElseIf LCase(Args(1)) = "disc" Then
     Call hl_DB("Disconnect")
     Dsp dspID, "Disconnected from DB", Username, vbLB
   ElseIf LCase(Args(1)) = "conn" Then
     Call hl_DB("Connect")
     Dsp dspID, "Connected to DB", Username, vbLB
   ElseIf LCase(Args(1)) = "glo" Then
     ExecuteGlobal Mid(Text, Len(Args(0)) + 7)
     Dsp dspID, "ExecutedGlobal: """ & Mid(Text, Len(Args(0)) + 7) & """", Username, vbLB
   Else
     Execute Mid(Text, Len(Args(0)) + 3)
     Dsp dspID, "Executed: """ & Mid(Text, Len(Args(0)) + 3) & """", Username, vbLB
   End If
   Exit Sub
  End If
  '// COMMANDS
  For Each CMD In hlLeague.Commands
   '// Is it an alias?
   ali = hlLeague.GetAliases(CMD, False)
   For Each Alias In Split(ali, "|")
     If LCase(Args(0)) = LCase(Alias) Then
      hlCmd = True
     End If
   Next
   If hlCmd Then  
     If dspID = 4 Then VetoThisMessage
     '// Is it enabled?
     If hlLeague.GetEnabled(CMD, False) <> "True" Then
      '// Dsp dspID, "Command (" & CMD & " | " & Args(0) & ") Disabled!", Username, vbYellow
      Exit Sub
     End If
     '// Do you have correct access?
     acc = hlLeague.GetAccess(CMD, False)
     hlDebug.Write vbLB, "Your Access: " & uAccess & " | And Flags: " & uFlags
     If UBound(acc) > 0 Then
      nAccess = CInt(acc(0))
      hlDebug.Write vbLB, "Needed Access: " & nAccess
      nFlags = acc(1)
      hlDebug.Write vbLB, "Needed Flags: " & nFlags
      If uAccess < nAccess Then Exit Sub
      If InStr(LCase(uFlags), LCase(nFlags)) = 0 Then Exit Sub
     Else  
      nAccess = CInt(acc(0))
      hlDebug.Write vbLB, "Needed Access: " & nAccess
      If uAccess < nAccess Then Exit Sub
     End If
     '// Can you use this while a game is being made?
     If hlLeague.GetSelectedGame <> vbNullString Then
      If hlLeague.GetAllowed(CMD, False) <> "True" Then
        Dsp dspID, "Sorry you cannot use " & Args(0) & " while a game is going", Username, vbLB
        Exit Sub
      End If
     End If
     hlCmd = False
     Call hl_CommandUsed(Username, CMD, Args, dspID)
     Exit Sub
   Else
     hlDebug.Write vbLB, "Not the " & CMD & " command"
   End If
  Next
End Sub

Sub hl_CommandUsed(Username, CMD, Args, dspID)
  hlDebug.Write vbLB, "You have the required access"
  hlDebug.Write vbLB, CMD & " Used by " & Username
  hlDebug.Write vbLB, "Calling Command Sub..."
  Argstr = ""
  For Each arg In Args
   Argstr = Argstr & arg & "|"
  Next
  Argstr = Left(Argstr, Len(Argstr) - 1)
  Execute "Call hl_" & CMD & "_cmd(""" & Argstr & """, """ & Username & """, " & dspID & ")"
End Sub

Sub hl_Games_cmd(Argstr, Username, dspID)
  Args = Split(Argstr, "|")
  Games = hlLeague.GetActiveGames
  If Games = vbNullString Then
   Dsp dspID, "No Games", Username, vbLB
  Else
   Dsp dspID, Games, Username, vbLB
  End If
End Sub

Sub hl_StartGame_cmd(Argstr, Username, dspID)
  Args = Split(Argstr, "|")
  hlDebug.Write vbLB, "StartGame Called"
  Selected = hlLeague.GetSelectedGame
  If Selected <> vbNullString Then
   Dsp dspID, "There is a game going already. Please wait for that one to be made", Username, vbLB
   Exit Sub
  End If
  If hlLeague.IsBanned(Username) Then
   Dsp 3, "You are banned from games", Username, vbLB
   Exit Sub
  End If
  Host = Username
  If InStr(hlLeague.GetActiveGames, Host) > 0 Then
   Dsp dspID, "You are already hosting a game", Username, vbLB
   Exit Sub
  End If
  If hlLeague.InGame(Host) Then
   Dsp dspID, "You are already in a game", Username, vbLB
   Exit Sub
  End If
  If UBound(Args) < 1 Then
   Mode = HL_DEF_MODE
  Else
   Mode = Args(1)
  End If
  Mode = UCASE(Mode)
  GN = HL_GAMES_PRE & hlLeague.GetGameCount + 1
  hlLeague.CreateNormalGame GN, Host, Mode
  hlLeague.SignInPlayer hlLeague.GetSelectedGame, Username
  Dsp dspID, "A " & HL_CLAN & " game is begginning! | GN: " & GN & " | Host: " & Host & " | Mode: " & Mode, Username, vbLB
  HL_VS = 10
End Sub

Sub hl_CancelGame_cmd(Argstr, Username, dspID)
  Args = Split(Argstr, "|")
  hlDebug.Write vbLB, "CancelGame Called"
  Selected = hlLeague.GetSelectedGame
  If Selected = vbNullString Then
   Dsp dspID, "There is no game to " & Args(0) & "/Cancel", Username, vbLB
   Exit Sub
  End If
  If UBound(Args) > 0 Then
   If LCase(Args(1)) = "--force" Then
     GetDBEntry Username, uAcc, uFlags
     acc = Split(GetConfigEntry("Special Commands", "FORCECancelGame_acc", HL_SETTINGS_INI))
     If UBound(acc) > 0 Then
      nAccess = CInt(acc(0))
      hlDebug.Write vbLB, "Needed Access: " & nAccess
      nFlags = acc(2)
      hlDebug.Write vbLB, "Needed Flags: " & nFlags
      If uAcc < nAccess Then Exit Sub
      If InStr(LCase(uFlags), LCase(nFlags)) = 0 Then Exit Sub
     Else  
      nAccess = CInt(acc(0))
      hlDebug.Write vbLB, "Needed Access: " & nAccess
      If uAcc < nAccess Then Exit Sub
     End If
     hlLeague.CloseGame(Selected)
     Dsp dspID, "Game Force Aborted.", Username, vbLB
     Exit Sub
   End If
  End If
  Host = hlLeague.GameInfo(Selected, "host")
  If LCase(Host) <> LCase(Username) Then
   Dsp dspID, "You are not the host!", Username, vbLB
   Exit Sub
  End If
  hlLeague.CloseGame(Selected)
  Dsp dspID, "Game aborted.", Username, vbLB
End Sub

Sub hl_ReportGame_cmd(Argstr, Username, dspID)
  Args = Split(Argstr, "|")
  hlDebug.Write vbLB, "ReportGame Called"
  ' UBound(Args)
  If UBound(Args) > 2 Then
   ' 1
   If LCase(Args(3)) = "--force" Then
     GetDBEntry Username, uAcc, uFlags
     acc = Split(GetConfigEntry("Special Commands", "FORCEReportGame_acc", HL_SETTINGS_INI))
     If UBound(acc) > 0 Then
      nAccess = CInt(acc(0))
      hlDebug.Write vbLB, "Needed Access: " & nAccess
      nFlags = acc(2)
      hlDebug.Write vbLB, "Needed Flags: " & nFlags
      If uAcc < nAccess Then Exit Sub
      If InStr(LCase(uFlags), LCase(nFlags)) = 0 Then Exit Sub
     Else  
      nAccess = CInt(acc(0))
      hlDebug.Write vbLB, "Needed Access: " & nAccess
      If uAcc < nAccess Then Exit Sub
     End If
     If hlLeague.GameInfo(Args(1), "host") = vbNullString Then
      Dsp dspID, "That game does not exist.", Username, vbLB
      Exit Sub
     ElseIf hlLeague.GameInfo(Args(1), "active") = "False" Then
      Dsp dspID, "That game is already reported.", Username, vbLB
      Exit Sub
     ElseIf hlLeague.GameInfo(Args(1), "selected") = "True" Then
      Dsp dspID, "That game is being made right now.", Username, vbLB
      Exit Sub
     End If
     If Args(2) = "2" Then
      winner = "scourge"
     ElseIf Args(2) = "1" Then
      winner = "sentinel"
     ElseIf InStr(LCase(Args(2)), "sen") > 0 Then
      winner = "sentinel"
     ElseIf InStr(LCase(Args(2)), "sc") > 0 Then
      winner = "scourge"
     Else
      Dsp dspID, "That is not a valid winner", Username, vbLB
      Exit Sub
     End If
     If winner = "sentinel" Then
      Wplayers = hlLeague.GetPlayersByTeam(Args(1), "sentinel")
      Lplayers = hlLeague.GetPlayersByTeam(Args(1), "scourge")
     ElseIf winner = "scourge" Then
      Wplayers = hlLeague.GetPlayersByTeam(Args(1), "scourge")
      Lplayers = hlLeague.GetPlayersByTeam(Args(1), "sentinel")
     End If
     Wplayers = Left(Wplayers, Len(Wplayers) - 3)
     Lplayers = Left(Lplayers, Len(Lplayers) - 3)
     WPlay = Split(WPlayers, ";")
     Lplay = Split(LPlayers, ";")
     For i = LBound(WPlay) To UBOund(WPlay)
      wp = WPlay(i)
      cwins = hlLeague.GetStats(wp, "wins")
      closs = hlLeague.GetStats(wp, "losses")
      cexp = hlLeague.GetStats(wp, "exp")
      nwins = cwins + 1
      hlLeague.UpdateStats wp, "wins", nwins
        If nwins > closs Then
         nexp = cexp + 40
        Else
         nexp = cexp + 30
        End If
      hlLeague.UpdateStats wp, "exp", nexp
      hlLeague.MarkAsNotInGame wp
     Next
     For i = LBound(LPlay) To UBound(LPlay)
      lp = LPlay(i)
      cwins = hlLeague.GetStats(lp, "wins")
      closs = hlLeague.GetStats(lp, "losses")
      cexp = hlLeague.GetStats(lp, "exp")
      nloss = closs + 1
      hlLeague.UpdateStats lp, "losses", nloss
      If cwins > nloss Then
        nexp = cexp - 30
      Else
        nexp = cexp - 20
      End If
      hlLeague.UpdateStats lp, "exp", nexp
      hlLeague.MarkAsNotInGame lp
     Next
     hlLeague.MarkAsCompleted Args(1)
     Dsp dspID, "Reported winner " & winner & " for game " & Args(1) & "!", Username, vbLB
   End If
  ElseIf UBound(Args) = 2 Then
   ' 1
   If hlLeague.GameInfo(Args(1), "host") = vbNullString Then
     Dsp dspID, "That game does not exist.", Username, vbLB
     Exit Sub
   ElseIf hlLeague.GameInfo(Args(1), "active") = "False" Then
     Dsp dspID, "That game is already reported.", Username, vbLB
     Exit Sub
   ElseIf hlLeague.GameInfo(Args(1), "selected") = "True" Then
     Dsp dspID, "That game is being made right now.", Username, vbLB
     Exit Sub
   End If
   If hlLeague.GameInfo(Args(1), "host") <> Username Then
     Dsp dspID, "You are not the host of that game.", Username, vbLB
   End If
   If Args(2) = "2" Then
     winner = "scourge"
   ElseIf Args(2) = "1" Then
     winner = "sentinel"
   ElseIf InStr(LCase(Args(2)), "sen") > 0 Then
     winner = "sentinel"
   ElseIf InStr(LCase(Args(2)), "sc") > 0 Then
     winner = "scourge"
   Else
     Dsp dspID, "That is not a valid winner", Username, vbLB
     Exit Sub
   End If
     If winner = "sentinel" Then
      Wplayers = hlLeague.GetPlayersByTeam(Args(1), "sentinel")
      Lplayers = hlLeague.GetPlayersByTeam(Args(1), "scourge")
     ElseIf winner = "scourge" Then
      Wplayers = hlLeague.GetPlayersByTeam(Args(1), "scourge")
      Lplayers = hlLeague.GetPlayersByTeam(Args(1), "sentinel")
     End If
     Wplayers = Left(Wplayers, Len(Wplayers) - 3)
     Lplayers = Left(Lplayers, Len(Lplayers) - 3)
     WPlay = Split(WPlayers, ";")
     Lplay = Split(LPlayers, ";")
     For i = LBound(WPlay) To UBOund(WPlay)
      wp = WPlay(i)
      cwins = hlLeague.GetStats(wp, "wins")
      closs = hlLeague.GetStats(wp, "losses")
      cexp = hlLeague.GetStats(wp, "exp")
      nwins = cwins + 1
      hlLeague.UpdateStats wp, "wins", nwins
        If nwins > closs Then
         nexp = cexp + 40
        Else
         nexp = cexp + 30
        End If
      hlLeague.UpdateStats wp, "exp", nexp
      hlLeague.MarkAsNotInGame wp
     Next
     For i = LBound(LPlay) To UBound(LPlay)
      lp = LPlay(i)
      cwins = hlLeague.GetStats(lp, "wins")
      closs = hlLeague.GetStats(lp, "losses")
      cexp = hlLeague.GetStats(lp, "exp")
      nloss = closs + 1
      hlLeague.UpdateStats lp, "losses", nloss
      If cwins > nloss Then
        nexp = cexp - 30
      Else
        nexp = cexp - 20
      End If
      hlLeague.UpdateStats lp, "exp", nexp
      hlLeague.MarkAsNotInGame lp
     Next
     hlLeague.MarkAsCompleted Args(1)
     Dsp dspID, "Reported winner " & winner & " for game " & Args(1) & "!", Username, vbLB
  Else
   Dsp dspID, "More info required", Username, vbLB
  End If
End Sub

Sub hl_Vouch_cmd(Argstr, Username, dspID)
  Args = Split(Argstr, "|")
  If hlLeague.IsVouched(Args(1)) Then Exit Sub
  hlLeague.Vouch(Args(1))
  Dsp dspID, "Vouched " & Args(1) & "!", Username, vbLB
End Sub

Sub hl_UnVouch_cmd(Argstr, Username, dspID)
  Args = Split(Argstr, "|")
  If Not hlLeague.IsVouched(Args(1)) Then Exit Sub
  hlLeague.RemVouch(Args(1))
  Dsp dspID, "Unvouched " & Args(1) & "!", Username, vbLB
End Sub

Sub hl_Teams_cmd(Argstr, Username, dspID)
  hlDebug.Write vbLB, "Pool Called"
  Args = Split(Argstr, "|")
  If UBound(Args) < 1 Then
   If hlLeague.GetPlayerCount(hlLeague.GetSelectedGame) = 0 Then
     Dsp dspID, "There are no players in " & hlLeague.GetSelectedGame, Username, vbLB
     Exit Sub
   End If  
   cpool = hlLeague.GetPool
   cpool = Left(cpool, Len(cpool) - 1)
   cpool = Replace(cpool, ";", ", ")
   Dsp dspID, "Current pool (" & hlLeague.GetSelectedGame & "): " & cpool, Username, vbLB
  Else
   If hlLeague.GameInfo(Args(1), "host") = vbNullString Then
     Dsp dspID, "That game does not exist", Username, vbLB
     Exit Sub
   ElseIf LCase(Args(1)) = LCase(hlLeague.GetSelectedGame) Then
     If hlLeague.GetPlayerCount(hlLeague.GetSelectedGame) = 0 Then
      Dsp dspID, "There are no players in " & hlLeague.GetSelectedGame, Username, vbLB
      Exit Sub
     End If  
     cpool = hlLeague.GetPool
     cpool = Left(cpool, Len(cpool) - 1)
     Dsp dspID, "Current pool (" & hlLeague.GetSelectedGame & "): " & cpool, Username, vbLB
     Exit Sub
   End If
   host = hlLeague.GameInfo(Args(1), "host")
   team1 = hlLeague.GameInfo(Args(1), "sentinel")
   team2 = hlLeague.GameInfo(Args(1), "scourge")
   team1 = Left(team1, Len(team1) - 1)
   team2 = Left(team2, Len(team2) - 1)
   Dsp dspID, Args(1) & " | Hosted By: " & host, Username, vbLB
   If HL_1LINETEAMS = "False" Then
     Dsp dspID, "Sentinel: " & Replace(team1, ";", ", "), Username, vbLB
     Dsp dspID, "Scourge: " & Replace(team2, ";", ", "), Username, vbLB
   Else
     Dsp dspID, "Sentinel: " & Replace(team1, ";", ", ") & " :|: " & "Scourge: " & Replace(team2, ";", ", "), Username, vbLB
   End If
  End If
End Sub
 
Sub hl_SignIn_cmd(Argstr, Username, dspID)
  Args = Split(Argstr, "|")
  hlDebug.Write vbLB, "SignIn Called"
  Selected = hlLeague.GetSelectedGame
  If Selected = vbNullString Then
   Dsp dspID, "There is no game to " & Args(0) & "/SignIn to", Username, vbLB
   Exit Sub
  End If
  If hlLeague.InGame(Username) Then
   Exit Sub
  End If
  If hlLeague.IsBanned(Username) Then
   Dsp 3, "You are banned from games", Username, vbLB
   Exit Sub
  End If
  hlLeague.SignInPlayer Selected, Username
  pleft = HL_VS - hlLeague.GetPlayerCount(Selected)
  Dsp dspID, Username & " (" & hlLeague.GetStats(Username, "exp") & ") signed in; " & pleft & " slots left.", Username, vbLB
  If pleft = 0 Then
   Call hl_FULLGAME(dspID)
  End If
End Sub

Sub hl_SetTeams_cmd(Argstr, Username, dspID)
  Args = Split(Argstr, "|")
  If hlLeague.GetSelectedGame = vbNullString Then
   Dsp dspID, "No game is being played", Username, vbLB
  Else
   If Lcase(hlLeague.GameInfo(hlLeague.GetSelectedGame, "host")) = LCase(Username) Then
     HL_VS = CInt(Args(1))
     x = Args(1) / 2
     x = x & "vs" & x
     Dsp dspID, "Set the player count to " & Args(1) & " this game is now a " & x, username, vbLB
   Else
     Dsp dspID, "You are not the host", Username, vbLB
   End If
  End If
End Sub

Sub hl_FULLGAME(dspID)
  Game = hlLeague.GetSelectedGame
  Dsp dspID, "The game is full! | GN: " & Game & " | Mode: " & hlLeague.GameInfo(Game, "mode"), Username, vbLB
  ' 1
  Teams = hlLeague.GenerateTeams(Game)
  ' 1
  Team = Split(Teams, "/|\")
  Sen = Replace(Left(Team(0), Len(Team(0)) - 2), ";", ", ")
  Sc = Replace(Left(Team(1), Len(Team(1)) - 2), ";", ", ")
  If HL_1LINETEAMS = "True" Then
   Dsp dspID, "Sentinel: " & Sen & " :|: Scourge: " & Sc, Username, vbLB
  Else
   Dsp dspID, "Sentinel: " & Sen, Username, vbLB
   Dsp dspID, "Scourge: " & Sc, Username, vbLB
  End If
  hlLeague.MarkAsPlaying Game, Team(0), Team(1)
End Sub
 
Sub hl_SignOut_cmd(Argstr, Username, dspID)
  Args = Split(Argstr, "|")
  hlDebug.Write vbLB, "SignOut Called"
  Selected = hlLeague.GetSelectedGame
  If Selected = vbNullString Then
   Dsp dspID, "There is no game to " & Args(0) & "/SignOut of", Username, vbLB
   Exit Sub
  End If
  If Not hlLeague.InSpecificGame(Username, Selected) Then Exit Sub
  hlLeague.SignOutPlayer Selected, Username
  pleft = HL_VS - hlLeague.GetPlayerCount(Selected)
  Dsp dspID, Username & "(" & hlLeague.GetStats(Username, "exp") & ") signed out; " & pleft & " slots left.", Username, vbLB
End Sub

Sub hl_Stats_cmd(Argstr, Username, dspID)
  Args = Split(Argstr, "|")
  hlDebug.Write vbLB, "Stats Called"
  If UBound(Args) < 1 Then
   cexp = hlLeague.GetStats(Username, "exp")
   cwins = hlLeague.GetStats(Username, "wins")
   closs = hlLeague.GetStats(Username, "losses")
   ' 1
   Dsp dspID, Username & " | Exp: " & cexp & "; Wins: " & cwins & "; Losses: " & closs, Username, vbLB
  Else
   cexp = hlLeague.GetStats(Args(1), "exp")
   cwins = hlLeague.GetStats(Args(1), "wins")
   closs = hlLeague.GetStats(Args(1), "losses")
   ' 1
   Dsp dspID, Args(1) & " | Exp: " & cexp & "; Wins: " & cwins & "; Losses: " & closs, Username, vbLB
  End If
End Sub

Sub hl_TopScores_cmd(Argstr, Username, dspID)
  Args = Split(Argstr, "|")
  hlDebug.Write vbLB, "TopScores Called"
  Scores = hlLeague.OrganizeScores("High")
  If Scores = vbNullString Then
   Dsp dspID, "Sorry no users yet.", Username, vbLB
   Exit Sub
  End If
  Users = Split(Scores, "||")
  If UBound(Args) < 1 Then
   Top = 5
  Else
   Top = CInt(Args(1))
   If Top > 7 Then
     Top = 5
   ElseIf Top < 1 Then
     Top = 1
   ElseIf Top > UBound(Users) + 1 Then
     Top = UBound(Users) + 1
   End If
  End If
  str = "Top " & Top & ": "
  For i = 0 To Top - 1
   Score = Split(Users(i), "|")
   str = str & Score(0) & " (" & Score(1) & "), "
  Next
  str = Left(str, Len(str)-2)
  Dsp dspID, str, Username, vbLB
End Sub

Sub hl_GameBan_cmd(Argstr, Username, dspID)
  Args = Split(Argstr, "|")
  hlDebug.Write vbLB, "GameBan Called"
  If UBound(Args) > 0 Then
   If Not hlLeague.IsBanned(Args(1)) Then
     hlLeague.Ban Args(1)
     Dsp dspID, "GameBanned " & Args(1), Args(1), vbLB
   Else
     Dsp dspID, Args(1) & " is banned already"
   End If
  Else
   Dsp dspID, "Usage: " & BotVars.Trigger & Args(0) & " <user>", Username, vbLB
  End If
End Sub

Sub hl_Version_cmd(Argstr, Username, dspID)
  Args = Split(Argstr, "|")
  Dsp dspID, "Heroic League Plugin. Version: " & HL_VER & " By Hero.A", Username, vbLB
End Sub

Sub hl_UnGameBan_cmd(Argstr, Username, dspID)
  Args = Split(Argstr, "|")
  hlDebug.Write vbLB, "UnGameBan Called"
  If UBound(Args) > 0 Then
   If hlLeague.IsBanned(Args(1)) Then
     hlLeague.UnBan Args(1)
     Dsp dspID, "UnGameBanned " & Args(1), Args(1), vbLB
   Else
     Dsp dspID, Args(1) & " is not banned"
   End If
  Else
   Dsp dspID, "Usage: " & BotVars.Trigger & Args(0) & " <user>", Username, vbLB
  End If
End Sub

Sub hl_BottomScores_cmd(Argstr, Username, dspID)
  Args = Split(Argstr, "|")
  hlDebug.Write vbLB, "BottomScores Called"
  Scores = hlLeague.OrganizeScores("Low")
  If Scores = vbNullString Then
   Dsp dspID, "Sorry no users yet.", Username, vbLB
   Exit Sub
  End If
  Users = Split(Scores, "||")
  If UBound(Args) < 1 Then
   Bottom = 5
  Else
   Bottom = CInt(Args(1))
   If Bottom > 7 Then
     Bottom = 5
   ElseIf Bottom < 1 Then
     Bottom = 1
   ElseIf Bottom > UBound(Users) + 1 Then
     Bottom = UBound(Users) + 1
   End If
  End If
  str = "Bottom " & Bottom & ": "
  For i = 0 To Bottom - 1
   Score = Split(Users(i), "|")
   str = str & Score(0) & " (" & Score(1) & "), "
  Next
  str = Left(str, Len(str)-2)
  Dsp dspID, str, Username, vbLB
End Sub

Sub hl_Event_WhisperFromUser(Username, Flags, Message)
  Call hl_CommandInput(Username, Message, 3)
End Sub

Sub hl_Event_Usertalk(Username, Flags, Message, Ping)
  Call hl_CommandInput(Username, Message, 1)
End Sub

Sub hl_Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString)
  If Not hlLeague.UserInDB(User) Then
   hlSQL.Execute "INSERT INTO players VALUES ('" & User & "', '1000', '0', '0', 'False', 'False', '', 'False')"
  End If
  If HL_VOUCH_ENA Then
   If Not ( hlLeague.IsVouched(Username) AND IsSafelisted(Username) ) Then
     AddQ "/ban " & Username & " " & HL_VOUCH_MES
   End If
  End If
End Sub

Function hl_Updater(Query)
  Select Case Query
   Case "Status"
     Do
      If Not ScInet.StillExecuting Then
        content = ScInet.OpenUrl("" & HL_UPDATE_SITE)
        Scontent = Split(content, vbNewLine)
        nVer = CDbl(Mid(Scontent(1), 2))
        If HL_VER < nVer Then
         hl_Updater = "Old"
        ElseIf HL_VER = HL_BETA Then
         hl_Updater = "Beta"
        ElseIf HL_VER = nVer Then
         hl_Updater = "Current"
        End If
        again = False
      Else
        again = True
      End If
     Loop While again
   Case "ServerVer"
     Do
      If Not ScInet.StillExecuting Then
        content = ScInet.OpenUrl("" & HL_UPDATE_SITE)
        Scontent = Split(content, vbNewLine)
        nVer = CDbl(Mid(Scontent(1), 2))
        hl_Updater = nVer
        again = False
      Else
        again = True
      End If
     Loop While again
   Case "Update"
     Last = 0
     Do
      If Not ScInet.StillExecuting Then
        nPath = GetMyPath("hl")
        Set hlFile = hLFSO.OpenTextFile(nPath, 1)
        Count = hlFile.ReadAll
        Count = UBound(Split(Count, vbNewLine)) + 1
        hlFile.Close
        Set hlFile = hlFSO.CreateTextFile(nPath, True)
        content = ScInet.OpenUrl("" & HL_UPDATE_SITE)
        Scontent = Split(content, vbNewLine)
        Total = UBound(Scontent) + 1
        For j = LBound(Scontent) To UBound(Scontent)
         hlFile.WriteLine Scontent(j)
         Pre = (j + 1) / Total
         If Pre = 1 Then
           Pre = "100"
         Else
           Pre = CInt(Mid(Pre, 3, 2))
         End If
         If Pre = 25 OR Pre = 50 OR Pre = 75 OR Pre = 100 Then
           If Pre <> Last Then
            Last = Pre
            AddChat vbLB, Pre & "% completed"
           End If
         End If
        Next
        hlFile.Close
        again = False
      Else
        again = True
      End If
     Loop While again
     WriteConfigEntry "Update", "Updated", "True", HL_STORAGE_INI
     WriteConfigEntry "Update", "Lines", Total - Count, HL_STORAGE_INI
   Case "Non-Beta"
     Last = 0
     Do
      If Not ScInet.StillExecuting Then
        nPath = GetMyPath("hl")
        Set hlFile = hLFSO.OpenTextFile(nPath, 1)
        Count = hlFile.ReadAll
        Count = UBound(Split(Count, vbNewLine)) + 1
        hlFile.Close
        Set hlFile = hlFSO.CreateTextFile(nPath, True)
        content = ScInet.OpenUrl("" & HL_UPDATE_SITE_NON_BETA)
        Scontent = Split(content, vbNewLine)
        Total = UBound(Scontent) + 1
        For j = LBound(Scontent) To UBound(Scontent)
         hlFile.WriteLine Scontent(j)
         Pre = (j + 1) / Total
         If Pre = 1 Then
           Pre = "100"
         Else
           Pre = CInt(Mid(Pre, 3, 2))
         End If
         If Pre = 25 OR Pre = 50 OR Pre = 75 OR Pre = 100 Then
           If InStr(Last, Pre) = 0 Then
            Last = Last & ";" & Pre
            AddChat vbLB, Pre & "% completed"
           End If
         End If
        Next
        hlFile.Close
        again = False
      Else
        again = True
      End If
     Loop While again
     WriteConfigEntry "Update", "Updated", "True", HL_STORAGE_INI
     WriteConfigEntry "Update", "Lines", Total - Count, HL_STORAGE_INI
  End Select
End Function

Sub hl_Event_Close
  WriteConfigEntry "Connection", "Reload", "True", HL_STORAGE_INI
  AddChat vbLB, "Close or Reload detected!"
  AddChat vbLB, "?cbDisconnecting..."
  hl_DB "Disconnect"
End Sub


Class hlLeagueManager

  Private Sub Class_Initialize
   AddChat vbLB, "Successfully loaded the LeagueManager handler."
  End Sub
 
  '// `games` (`gn` varchar, `host` varchar, `type` varchar, `mode` varchar, `selected` varchar, `active` varchar, `created` varchar, `pool` varchar, `scourge` varchar, `sentinel` varchar'

  Public Sub SignInPlayer(GameName, User)
   If Not Me.UserInDB(User) Then
     hlSQL.Execute "INSERT INTO players VALUES ('" & User & "', '1000', '0', '0', 'False', 'False', '', 'False')"
   End If
   hlRS.Open "SELECT pool FROM games WHERE gn='" & GameName & "'", hlSQL
   hlSQL.Execute "UPDATE games SET pool='" & hlRS.Fields("pool") & User & ";' WHERE gn='" & GameName & "'"
   hlSQL.Execute "UPDATE players SET ingame='True', gamename='" & GameName & "' WHERE name='" & User & "'"
   hlRS.Close
  End Sub
 
  Public Function GetPool
   Game = Me.GetSelectedGame
   If Game = vbNullString Then Exit Function
   hlRS.Open "SELECT pool FROM games WHERE gn='" & Game & "'", hlSQL
   Pool = hlRS.GetString()
   GetPool = Left(Pool, Len(Pool) - 1)
   hlRS.Close
  End Function
 
  Public Sub MarkAsCompleted(GameName)
   hlSQL.Execute "UPDATE games SET active='False' WHERE LCase(gn='" & LCase(GameName) & "')"
  End Sub
   
 
  Public Sub MarkAsPlaying(GameName, Team1, Team2)
   hlSQL.Execute "UPDATE games SET selected='False', sentinel='" & Team1 & "', scourge='" & Team2 & "'"
  End Sub
 
  Public Sub SignOutPlayer(GameName, User)
   If Not Me.UserInDB(User) Then
     hlSQL.Execute "INSERT INTO players VALUES ('" & User & "', '1000', '0', '0', 'False', 'False', '', 'False')"
   End If
   hlRS.Open "SELECT pool FROM games WHERE gn='" & GameName & "'", hlSQL
   cpool = hlRS.Fields("pool")
   cpool = Replace(cpool, User & ";", "")
   hlRS.Close
   hlSQL.Execute "UPDATE games SET pool='" & cpool & "' WHERE gn='" & GameName & "'"
   hlSQL.Execute "UPDATE players SET ingame='False' WHERE name='" & User & "'"
  End Sub
 
  Public Function UserInDB(User)
   hlRS.Open "SELECT * FROM players WHERE name='" & User & "'", hlSQL
   If hlRS.EOF Then
     UserInDB = False
   Else
     UserInDB = True
   End If
   hlRS.Close
  End Function
 
  Public Function GameInfo(GameName, Query)
   hlRS.Open "SELECT * FROM games WHERE LCase(gn='" & LCase(GameName) & "')", hlSQL
   If hlRS.EOF Then
     GameInfo = vbNullString
   Else
     GameInfo = hlRS.Fields(Query)
   End If
   hlRS.Close
  End Function
 
  Public Function GenerateTeams(GameName)
   hlRS.Open "SELECT pool FROM games WHERE LCase(gn='" & LCase(GameName) & "')"
   people = hlRS.Fields("pool")
   people = Left(people, Len(people) - 1)
   ' people
   fp = ""
   hlRS.Close
   cpool = Split(people, ";")
   For i = LBound(cpool) To UBound(cpool)
     p = cpool(i)
     hlRS.Open "SELECT * FROM players WHERE LCase(name='" & LCase(p) & "')"
     fp = fp & p & "|" & hlRS.Fields("exp") & "||"
     hlRS.Close
   Next
   ' 1
   fp = Left(fp, Len(fp) - 2)
   players = Split(fp, "||")
   ' 1
   last = 2
   For i = LBound(players) To UBound(players)
     AddChat vbBlue, players(i)
     player = Split(players(i), "|")
     If last = 1 Then
      t2 = t2 & player(0) & ";"
      last = 2
     Else
      t1 = t1 & player(0) & ";"
      last = 1
     End If
   Next
   ' 1
   hlSQL.Execute "UPDATE games SET sentinel='" & t1 & "' WHERE LCase(gn='" & LCase(GameName) & "')"
   hlSQL.Execute "UPDATE games SET scourge='" & t2 & "' WHERE LCase(gn='" & LCase(GameName) & "')"
   ' 1
   GenerateTeams = t1 & "/|\" & t2
   ' 1
  End Function
   
 
  Public Function GetStats(User, Query)
   If Not Me.UserInDB(User) Then
     hlSQL.Execute "INSERT INTO players VALUES ('" & User & "', '1000', '0', '0', 'False', 'False', '', 'False')"
   End If
   hlRS.Open "SELECT * FROM players WHERE name='" & User & "'", hlSQL
   If hlRS.EOF Then
     GetStats = 0
   Else
     GetStats = hlRS.Fields(Query)
   End If
   hlRS.Close
  End Function
      
  Public Sub Ban(User)
   If Not Me.UserInDB(User) Then
     hlSQL.Execute "INSERT INTO players VALUES ('" & User & "', '1000', '0', '0', 'False', 'False', '', 'False')"
   End If
   hlSQL.Execute "UPDATE players SET banned='True' WHERE LCase(name='" & LCase(User) & "')"
  End Sub
 
  Public Sub UnBan(User)
   If Not Me.UserInDB(User) Then
     hlSQL.Execute "INSERT INTO players VALUES ('" & User & "', '1000', '0', '0', 'False', 'False', '', 'False')"
   End If
   hlSQL.Execute "UPDATE players SET banned='False' WHERE LCase(name='" & LCase(User) & "')"
  End Sub
 
  Public Function IsBanned(User)
   If Not Me.UserInDB(User) Then
     hlSQL.Execute "INSERT INTO players VALUES ('" & User & "', '1000', '0', '0', 'False', 'False', '', 'False')"
   End If
   hlRS.Open "SELECT name, banned FROM players"
   Do While Not hlRS.EOF
     x = InStr(hlRS.Fields("name"), "*")
     If x > 0 Then
      If Match(LCase(User), LCase(hlRS.Fields("name")), True) Then
        If hlRS.Fields("banned") <> "True" Then
         IsBanned = False
        Else
         IsBanned = True
         hlRS.Close
         Exit Function
        End If
      End If
     Else
      If LCase(hlRS.Fields("name")) = LCase(User) Then
        If hlRS.Fields("banned") <> "True" Then
         IsBanned = False
        Else
         IsBanned = True
         hlRS.Close
         Exit Function
        End If
      End If
     End If
     hlRS.MoveNext
   Loop
   hlRS.Close
  End Function
 
  Public Sub CreateNormalGame(GameName, Creator, Mode)
   If Not Me.UserInDB(Creator) Then
     hlSQL.Execute "INSERT INTO players VALUES ('" & Creator & "', '1000', '0', '0', '', 'False', '')"
   End If
   hlSQL.Execute "INSERT INTO games VALUES ('" & GameName & "', '" & Creator & "', 'Normal', '" & Mode & "', 'True', 'True', '" & Now() & "', '', '', '')"
  End Sub
 
  Public Sub CloseGame(GameName)
   hlRS.Open "SELECT pool FROM games WHERE gn='" & GameName & "'", hlSQL
   hlSQL.Execute "DELETE FROM games WHERE LCase(gn='" & LCase(GameName) & "')"
   hlSQL.Execute "UPDATE players SET ingame='False' WHERE gamename='" & GameName & "'&qu
« Last Edit: October 28, 2008, 05:01:08 AM by Hero »

1nFinity

  • Newbie
  • *
  • Posts: 1
    • View Profile
[Resolved] Getting an error on stealthbot
« Reply #6 on: October 29, 2008, 11:27:06 AM »
I get exactly the same error as mentioned above.


 UserJoins Call Error On File> C:\Program Files\StealthBot\plugins\hlHeroicLeague.plug
 Error Number: 424 Description: Object required.

I'll be looking forward when you have a solution to it

Hero

  • Administrator
  • Hero Member
  • *****
  • Posts: 502
    • View Profile
    • http://rev7.net
[Resolved] Getting an error on stealthbot
« Reply #7 on: October 31, 2008, 05:10:07 AM »
I will try to replicate this error.
Hero
AKA: HeroAssasin and Mike
- - - - -  - - -
Visit Clan R77
- - - - -  - - -
Please do not PM me with random questions. That is what I made these forums for.

Noob ~Vector

Reason

  • Global Moderators
  • Full Member
  • ***
  • Posts: 193
    • View Profile
    • http://Rev77.net/FailBot/latest.zip
[Resolved] Getting an error on stealthbot
« Reply #8 on: October 31, 2008, 08:35:55 PM »
Maybe they aren't using Beta? I'm not sure if this has to be Beta or not, i just know i got this error when i tried a beta script on 2.6R3
Quote
04:37:18 PM | ?Swamp_Demon15@Azeroth? make me 1..?
04:37:28 PM | ?MikeA@Azeroth? can you code in VB6, lol?
04:37:47 PM | ?MikeA@Azeroth? And do you know how to have sex while hanging from your little toe?
04:38:01 PM | ?MikeA@Azeroth? If no to either, I'm sorry, we can't take you.
04:38:11 PM | ?MikeA@Azeroth? Joel taught us all the second one.

Hero

  • Administrator
  • Hero Member
  • *****
  • Posts: 502
    • View Profile
    • http://rev7.net
[Resolved] Getting an error on stealthbot
« Reply #9 on: November 01, 2008, 12:39:34 PM »
This script should work on both bots.

I have replicated this error. I believe it is because I removed some old files from my server. An update will be available by tonight.
Hero
AKA: HeroAssasin and Mike
- - - - -  - - -
Visit Clan R77
- - - - -  - - -
Please do not PM me with random questions. That is what I made these forums for.

Noob ~Vector

Meteor

  • Newbie
  • *
  • Posts: 3
    • View Profile
[Resolved] Getting an error on stealthbot
« Reply #10 on: November 07, 2008, 10:26:13 AM »
Im still getting this error :'( I was just finishing setting up my leauge too

ArticWolve

  • Global Moderators
  • Hero Member
  • *****
  • Posts: 636
    • View Profile
    • http://
[Resolved] Getting an error on stealthbot
« Reply #11 on: November 07, 2008, 10:35:41 AM »
Still? Sounds like you have more then one account. He is still in the process of updating, so PLEASE give him some time.
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]

Meteor

  • Newbie
  • *
  • Posts: 3
    • View Profile
[Resolved] Getting an error on stealthbot
« Reply #12 on: November 07, 2008, 02:24:25 PM »
No thought me he fixed this for that guy so Im just saying I am still getting it but ok

kirby

  • Newbie
  • *
  • Posts: 2
    • View Profile
[Resolved] Getting an error on stealthbot
« Reply #13 on: November 07, 2008, 07:21:31 PM »
i also get that error 424 description : object thingy, it keeps happening nomatter what i do, how do u fix it?

ArticWolve

  • Global Moderators
  • Hero Member
  • *****
  • Posts: 636
    • View Profile
    • http://
[Resolved] Getting an error on stealthbot
« Reply #14 on: November 07, 2008, 07:21:52 PM »
Well, Hero is unavailable for full scripting support until Monday. I also know that he is working on Fail Bot with zone and doing something that requires a lot of time. So be patient and that is really all I can say.
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]