StealthBot.net: Auto-Op Script - StealthBot.net

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Auto-Op Script Version 1.00 R-01

#1 User is offline   SierraKomodo Icon

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

Posted March 13, 2010 - 06:29 AM

Name: Auto-Op (AOP)
Author: SierraKomodo, with some help from TheBlackNinja
Version: 1.00 R-01
Description: Automatically gives users OP status based on username, access, or rank.

Commands:
No commands have been programmed into this script

How-to:
  • Once this script has been added to your bot's script folder, and loaded, open up Scripts.ini.
  • Under [AOP] find the line 'aop_set'
  • Depending on how you want the bot to determine if a user is to receive OP status, enter a 1 (determines by username) a 2 (determines by access number) or a 3 (determines by users flag)
  • Based on whether you put a 1, 2, or 3 in the line 'aop_set' you will either edit 'aop_user' (for 1); 'aop_access' (for 2); or 'aop_flag' (for 3).
  • For 'aop_user' you can only list one username. It is not case sensitive.
  • For 'aop_access' give only one access number - The bot will attempt to give OP status to any user with access equivalent to or above this number.
  • For 'aop_flag' give a flag letter, preferably only one flag. I have not tested if this is case sensitive or not.
  • Reload your scripts, and it should work without a hitch.


To-Do List:
  • Provide support for CRS Ranks
  • Provide support for multiple usernames

Attached File(s)


This post has been edited by SierraKomodo: March 13, 2010 - 06:31 AM


#2 User is offline   Novynn Icon

  • Silver Member
  • PipPipPipPipPip
  • Group: Senior Members
  • Posts: 873
  • Joined: October-07 09

Posted March 13, 2010 - 06:39 AM

Just a small thing:
'// If set to Username...
  If CInt(GetSettingsEntry("aop_set")) = 1 Then
    If LCase(Username) = LCase(GetSettingsEntry("aop_user")) Then
      Command BotVars.Username, "/op " & Username, True
      AddChat vbYellow, "AOP Script: ", vbGreen, Username & " has recieved OP status."
     Else
    End If
   Else

  End If


You don't need the "else" if you're not using them.

Also, to remove the amount of lines, you can do an if statement that exits the sub.

Example:
'// If set to Username...
  If Not CInt(GetSettingsEntry("aop_set")) = 1 Then Exit Sub
    If LCase(Username) = LCase(GetSettingsEntry("aop_user")) Then
      Command BotVars.Username, "/op " & Username, True
      AddChat vbYellow, "AOP Script: ", vbGreen, Username & " has recieved OP status."
  End If


#3 User is offline   SierraKomodo Icon

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

Posted March 13, 2010 - 06:45 AM

Ah, right. The 'Else' parts were there from when I was testing and had the AddChats in to tell me if an 'If' failed on me.

Also, having it exit the sub on failing the aop_set=1 check would make the script not check for the other possible values, right?

And it wont let me edit my first post so I'll have to reupload new versions as I change it then.

Page 1 of 1
  • 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