Guest User

SC Remastered Bot API Helper

a guest
Dec 10th, 2020
40
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Script("Name")          = "SC Remastered Bot API Helper"
  2. Script("Abbreviation"= "SCRBAPIH"
  3. Script("Author")        = "Fpa-rF- and PsYChiC-rF-"
  4. Script("Category")      = "Utility"
  5. Script("Major")         = 1
  6. Script("Minor")         = 0
  7. Script("Revision")      = 1
  8. Script("Description")   = "SC Remastered Bot API Helper"
  9.  
  10. '
  11. ' SCRIPT COMMANDS
  12. ' ===============
  13. ' /autobot  - CONNECTS BOT USING CAPIDAPTOR
  14.  
  15. ' SCRIPT SETTINGS
  16. ' ===============
  17. 'ENTER YOUR REQUIRED APIKEY (Get API key from email after /register-bot command in bnet chat)
  18. Public apikey : apikey = ""
  19.  
  20. 'https://davnit.net/projects/capidaptor/
  21. 'PATH TO CAPIDAPTOR EXE - MUST BE IN A WORKING DIRECTORY
  22. Public capidaptor_path : capidaptor_path = "C:\PATH\TO\capidaptor.exe"
  23.  
  24. Sub connectTimer_Timer()
  25.     connectTimer.Enabled = False
  26.     Set wShell = CreateObject("WScript.Shell")
  27.     statusCode = wShell.Run(capidaptor_path, 1, True)
  28. End Sub
  29.  
  30. Public Sub Event_Load()
  31.    
  32.     CreateObj "LongTimer", "connectTimer"
  33.     connectTimer.Interval = 1
  34.     connectTimer.Enabled = False
  35.    
  36.     'DoEvents
  37.     If OpenCommand("autobot") Is Nothing Then
  38.         With CreateCommand("autobot")
  39.             .Description = "SC Remastered Bot API Helper"
  40.             '.RequiredRank = 0
  41.             .Save
  42.         End With
  43.     End If
  44.  
  45.  
  46. End Sub
  47.  
  48. Public Sub Event_Command(Command)
  49.  
  50.     If LCase(Command.Name) = "autobot" Then
  51.         AddChat &H99CC00, "Loading CAPIDAPTOR Bot - Please Wait"
  52.         OpenCAPIDAPTOR()
  53.         LoadAPIKey()
  54.     End If
  55.    
  56. End Sub
  57.  
  58. Private Sub OpenCAPIDAPTOR()
  59.  
  60.     connectTimer.Enabled = True
  61.  
  62. End Sub
  63.  
  64. Private Sub LoadAPIKey()
  65.     Call Command(BotVars.Username, "/setserver localhost", True)
  66.     Call Command(BotVars.Username, "/setname " & apikey, True)
  67.     Call Command(BotVars.Username, "/setpass nopassword", True)
  68.     Call Command(BotVars.Username, "/connect", True)
  69. End Sub
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×