StealthBot.net: Clan Rank Script FAQs (crs) - StealthBot.net

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Clan Rank Script FAQs (crs)

#1 User is offline   The-Black-Ninja Icon

  • The Sex
  • Icon
  • Group: Scripting Moderators
  • Posts: 2,526
  • Joined: August-01 09

Posted September 23, 2009 - 12:13 AM


Clan Rank Script FAQ


Okay, I downloaded the CRS and I haven't reloaded my script, now what do I do?


I get an " Error Number 9: Subscript out of range " whenever someone joins or I try to use any commands.


I get errors that look like one of these:

Scripting runtime error '-2147217904' in crs: (line xxx; column x)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
Offending line: >>


Scripting runtime error '-2147217900' in crs: (line xxxx; column 0)
[Microsoft][ODBC Microsoft Access Driver] The INSERT INTO statement contains the following unknown field name: 'whatever'. Make sure you have typed the name correctly, and try the operation again.
Offending line: >>



I get this message whenever I reload the script:
"ERROR: Your " numRanks " does not match up with your maximum crsRank value or your maximum crsRankAccess value."



How do I add members?


How do I create a database?


Where is all my member data/greet information stored?


How do I customize/turn off how much access each rank recieves?


How can I add a greet?


What are all the greet variables?


How do I change the greet from a whisper to something else?


How do I use the Anti-flood settings for my greets?


How do I delete a greet?


How do I delete/add ranks?


How do I set up an "auto-ban" rank so it bans certain users when they join?


How do I customize my rank names?


I set my rank access, but members still can't use ANY commands!!


I don't like the names of the commands, how do I change them?


How do I make the CRS greet people in all chat instead of whisper?


I accidently messed up my database when I was manually editing it. Is there a way to fix this?


How do I view my database?


How do I delete my database?


______________________________________________________________________________



  • Q: I get an " Error Number 9: Subscript out of range " whenever someone joins or I try to use any commands.

    Quote

    [11:36:55 PM] PressedEnter Call Error On File> C:\Program Files\StealthBot\plugins\crsClanRankScript.txt
    [11:36:55 PM] Error Number: 9 Description: Subscript out of range


  • A: You have changed the number of ranks without updating this line in your crsClanRankScript.txt file:

    Quote

    '// ========= This line needs to be changed after you've altered the amount of ranks you have ============

    numRanks = 13 '// Highest number of ranks. Change this value after adding or removing ranks.
    See the number 13? Change that number to the highest rank you have; if you have crsRanks(28), then that 13 will be changed to 28. After you've changed that line, save the file, and reload the script by hitting Scripting > Reload Scripts.

    If you're still receiving the error, the most likely reason this is happening is because you modified the number of existing ranks AFTER you had already added members. ALL changes to the number of existing ranks should be made before you add ANY members. To fix this error you must do the following type this command from your bot console:

    Quote

    /crsadmin resetdb
    Doing this fixes the error, but it also erases all your rank data, so you will need to re-add all of your members.

    Note: After adding members, changing the actual names of the existing ranks is perfectly acceptable and can be done so without fear of causing errors, long as you don't change the number of ranks.


  • Q: I get the message "ERROR: Your " numRanks " does not match up with your maximum crsRank value or your maximum crsRankAccess value. Consult this post for information on this error: " whenever I reload the script.
  • A: You have changed the number of ranks without updating this line in your crsClanRankScript.txt file:

    Quote

    '// ========= This line needs to be changed after you've altered the amount of ranks you have ============

    numRanks = 13 '// Highest number of ranks. Change this value after adding or removing ranks.
    See the number 13? Change that number to the highest rank you have; if you have crsRanks(28), then that 13 will be changed to 28. After you've changed that line, save the file, and reload the script by hitting Scripting > Reload Scripts.


  • Q: I get an errors that look like one of these:

    Scripting runtime error '-2147217904' in crs: (line xxx; column x)
    [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
    Offending line: >>

    Scripting runtime error '-2147217900' in crs: (line xxxx; column 0)
    [Microsoft][ODBC Microsoft Access Driver] The INSERT INTO statement contains the following unknown field name: 'whatever'. Make sure you have typed the name correctly, and try the operation again.
    Offending line: >>

  • A: You are using an old version of the MemberData.mdb database. This can happen if, once you've downloaded the new Stealthbot, you type: /getplugin crs. Doing this will get you an old version of the plugin and anything relating to the new CRS will not apply to you.

    In order to fix this, you must do go into your Stealthbot folder. Inside your bot, go to Scripting > Open Scripts Folder and this will take you to your Scripts folder. Jump back one folder and this will be where your MemberData.mdb file is stored. Close your bot, delete the file, then place the updated CRS script from the CRS thread into the scripts folder. Open the bot back up and you should get some coloured text that tells you a new database is created.


  • Q: Okay, I downloaded the CRS and I haven't reloaded my script, now what do I do?
  • A: First, you want to make sure your ranks are set up correctly. Open up your crsClanRankScript.txt from your /scripts folder and find the text line " crsRanks(1) ". This is where the ranks start. If you're okay with having 13 ranks, all you need to do is rename them and set the ranks' access in the adjacent column. If you want to add more ranks, simply add new ranks to the list while remembering to keep increasing the numbers as you go along. Now that we have our ranks, scroll up a few lines to find this line:

    Quote

    numRanks = 13 '// Highest number of ranks. Change this value after adding or removing ranks.
    Change the number 13 to match the amount of ranks you have. If you added ranks to make 15 total ranks, change the 13 to a 15. Save the file but don't reload the script yet.

    Now that we've set up our ranks, lets open our scripts.ini file that's found in the /scripts folder, scroll down until you see a line that says " [crs] ", and edit the settings. The settings have explanations that go along with them, so alter the settings as you see fit. For a list of greet variables, consult this post: What are all the greet variables?. Save the file once you're done.

    We've got our ranks set the way we want and we have our settings all set so finally we can reload our script and get on with our lives! Let's add members by visiting this link: How do I add members?


  • Q: How do I add members?
  • A: Fortunately, the database is already set up and ready to use as soon as you reload your script. Since the bot console is automatically added to the database as the first member, all you need to do is use the crsSet command from within the console to add new members to the database. Ideally, you would want to set the members who are able to invite new members first so you don't have to keep adding members from the bot's console.


  • Q: Where is all my member data stored?
  • A: All member data is stored in the file MemberData.mdb, located in your Stealthbot folder.

    All greet settings are found in the scripts.ini file, located in your Stealthbot/scripts/ folder, under the section " [crs] ".


  • Q: How do I customize/turn off how much access each rank recieves?
  • A: To customize the access for each rank, open up your crsClanRankScript.txt from the /scripts folder, scroll down until you find where all the crsRanks are defined and look at the adjacent column for the values after " crsRankAccess(#) = ". These values will be the amount of access the rank will recieve.

    If you wish to have users gain access only, the values should look like this:
    • crsRankAccess(10) = 10

    If you wish to have users gain flags only, the values should look like this:
    • crsRankAccess(10) = "G"

    If you wish to have users gain both access and flags, the values should look like this:
    • crsRankAccess(#) = "10 G"


    The following is from chewyb_13's idea :)
    If you wish to have users automatically assigned to a group, the values should look like this:
    • crsRankAccess(#) = "--group Whatever"

    If you wish to have users gain access and be automatically assigned to a group, the values should look like this:
    • crsRankAccess(#) = "10 --group Whatever"

    If you wish to have users gain access, flags, and be automatically assigned to a group, the values should look like this:
    • crsRankAccess(#) = "10 G --group Whatever"


    To turn off the CRS auto-access feature, navigate to the [crs] settings, found in the scripts.ini file in your /scripts folder, and change the value belonging to " aa_on " to False. Save the file and close. To let CRS remove the user from the bot's database in addition to removing them from the CRS database when removing a user, set aa_rem_on to True.

    Note: If you've set either value to true and the script isn't giving/removing access, check to see if the set and rem commands are enabled in the Command Manager.


  • Q: How can I add a greet?
  • A: Open up your Command Manager and navigate to the CRS commands. From there, expand the crsGreet command and click on the arguments. In the Description window is where you will find how to add greets for specific ranks.

    If you want to add a greet for a specific username, open up your scripts.ini file and navigate to the [crs] section. Underneath the last setting entry, write their username, followed by the = sign, then the greet for that user and save your changes; no need to reload the script. To remove this greet, simply delete that entire line from the file. For example, say "Enabled=True" was my last entry for the [crs] section:

    Quote

    greet_queueExit=4
    '// Rank specific greet messages.
    ***=***
    Enabled=True
    The-Black-Ninja=Why hello! This is your unique greet!
    [afk]
    Enabled=False



  • Q: What are all the greet variables?
  • A:
    '// - Greet Variables:
    '// %0 = joiner's Username
    '// %r = joiner's rank name
    '// %u = joiner's rank value
    '// %m = Current member count
    '// %n = clan name
    '// %c = Current channel
    '// %1 = Current Bot Username
    '// %t = Current time
    '// %d = Current date
    '// %v = Current bot version
    '// %a = joiner's Db access
    '// %f = joiner's Db flags
    '// %p = joiner's ping

    After you've added the greet, the greet will be stored in the scripts.ini file, found in the Stealthbot/scripts folder, under the " [crs] " section. You can also edit the greets manually here as well, provided that you DO NOT REMOVE the " m_greet " or the " nm_greet " lines.

    To see how to add greets, click: How can I add a greet?
    To see how to delete greets, click: How do I delete a greet?


  • Q: How do I change the greet from a whisper to something else?
  • A: Navigate to the [crs] settings, found in the scripts.ini file in your /scripts folder. You will eventually come across the m_greet_dsp setting and the *_dsp settings are what determines how the greet will be displayed (explanations are provided).


  • Q: How do I delete a greet?
  • A: Navigate to the [crs] settings, found in the scripts.ini file in your /scripts folder. To delete rank specific greets, find the lines:

    Quote

    '// Rank specific greet messages.
    ***=***
    The lines below that follow the format: rank = greeting. To delete a greet for a rank, simply delete the entire line. Save the file and close.

    To delete greets for member and nonmember greets, you MUST NOT remove the " m_greet " or the " nm_greet " lines. In order to make the script not greet members or non-members, open up your Command Manager and navigate to the CRS commands. From there, expand the crsGreet command and click on the arguments. In the Description window is where you will find how to turn on and turn off greets for members and non-members.


  • Q: How do I delete/add ranks?
  • A: Note: Adding or removing ranks require you to delete your database, forcing you to re-add your members again. If you have Microsoft Access or any other database program that can open a mdb file, it is reccomended that you make a backup of your existing database so you can re-add your members manually by referencing your backup database so you don't lose all their data, except their rank since the ranks have changed.

    In order to add more ranks, open up your crsClanRankScript.txt file in the /scripts folder and find the line " crsRanks(1) ". This is where the ranks start. Simply add new ranks to the list while remembering to keep increasing the numbers as you go along; crsRanks(14), crsRanks(15), et. Now that we have our ranks, scroll up a few lines to find this line:

    Quote

    numRanks = 13 '// Highest number of ranks. Change this value after adding or removing ranks.
    Change the number 13 to match the amount of ranks you have. If you added ranks to make 15 total ranks, change the 13 to a 15. Save the file but don't reload the script yet, from your bot console, type the command:

    Quote

    /crsadmin resetdb

    Your database will be empty except for your bot console, so you will need to re-add your members again.

    To delete ranks, follow the process above, but instead of adding more ranks, you're removing the ranks, so you will need to adjust all those crsRanks(10) numbers so they're back in logical order again.


  • Q: How do I customize my rank names?
  • A: Note: Changing the names of ranks do not require you to delete your database.

    Open up your crsClanRankScript.txt file in the /scripts folder and find the line " crsRanks(1) ". This is where the ranks start. Unlike adding and removing the ranks, you're only going to modify the names, so you only need to edit the rank names in the quotes. There is no need to change the numbering system when renaming ranks. After you're done changing the names, save the file and reload the script.

    If you want to add or remove ranks, please click here for that FAQ: How do I delete/add ranks?


  • Q: I set my rank access, but members still can't use ANY commands!!
  • A: Open up your Command Manager, navigate to the CRS commands and set the required access (called " Rank ") for the command to correspond with your rank access settings. ALWAYS be sure you click the Save Changes button when you're done editing each command.

    If they STILL can't use any commands, then go into the scripts.ini, in the [crs] section, set the aa_on setting to True, save the file and use the command to set their rank again. This ini setting will ensure that when they change ranks, their access to the bot will change accordingly.


    How do I make the CRS greet people in all chat instead of whisper?

  • Q: How do I make the CRS greet people in all chat instead of whisper?
  • A: Open up your scripts.ini file and navigate to the [crs] area. Find the line that says "'// Member greet display type; ". Underneath that line is where you will change the greet value and underneath that line is where you would change the non-member greet display type.
    1 = All Chat
    2 = Emote
    3 = Whisper


  • Q: I don't like the names of the commands, how do I change them?
  • A: Open up your Command Manager, navigate to the CRS commands, click on the command you wish to change, and find the box " Custom Alias ". In this text box, type in the name you want the command to have and click the plus ( + ) button. This will make it so that the command will respond to the default command, as well as the alises you give it. ALWAYS be sure you click the Save Changes button when you're done editing each command.

    Note: When you add aliases to command names, you do not need to edit any settings within the script file. The command will behave like it would if you were using the default command; same restrictions, same required arguments, etc.


  • Q: How do I use the Anti-flood settings for my greets?
  • A: If your bot runs trivia and greets people at the same time, the bot's queue can get fairly high, so you would want to inrease the greet_queueExit variable so the bot doesn't accumulate a backlog of greets ontop of anything else, preventing flood and ipbans.

    If your channel experiences frequent visitors in a short amount of time, you would increase the greet_bufferTime so that the bot will have some time to "cool down" from greets, instead of greeting 5 people who join at once.

    To prevent users from joining and re-joining your channel, expecting greets every time, you can increase the greet_coolDown so that users will need to wait that amount of time before getting greeted again.


  • Q: How do I set up an "auto-ban" rank so it bans certain users when they join?
  • A: Edit your ranks so that the lowest rank is called "Banned". Now, when you set users to that rank, they will be banned when they join the channel with a reason, depending on which command you used to set the user to that rank.

    To view how to edit ranks, visit this link: How do I delete/add ranks?


  • Q: I accidently messed up my database when I was manually editing it. Is there a way to fix this?
  • A: If you set the setting " backupNum " in the scripts.ini file under the [crs] section to a -1 or any other number above 0, the script will automatically make a backup of your database when you close the bot or reload the script, and place it in the folder " CRS Database Backups " located in your Stealthbot folder. If you haven't added or removed any of the ranks since your last backup, you can delete your MemberData.mdb file from your Stealthbot folder, copy the backup database over to the Stealthbot folder and rename it " MemberData ". If your Windows requires you to place an extension on the file, the exension is .mdb


  • Q: How do I view my database?
  • A: Open it with Microsoft Access, which is included with Microsoft Office.

    If you don't want to install office, you can download a .mdb file viewer. (see Google)


  • Q: How do I delete my database?
  • A: If you totally screwed up your database beyond recognition and you don't have any backups, from your bot console, type the command:

    Quote

    /crsadmin resetdb

    You now have a breand new database, with your bot being automatically added as the first member.

    To view how to add members, visit this link: How do I add members?

    To view how to set the script to create backups of your database, visit this link: I accidently messed up my database when I was manually editing it. Is there a way to fix this?

This post has been edited by The-Black-Ninja: September 23, 2010 - 12:10 AM


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

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