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

Jump to content

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

Clan Rank Script (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:11 AM

Clan Rank Script

Author: The-Black-Ninja
Version: 1.19 Revision 1
Description: Extends Battle.net's clan capabilities.

Commands:
These are the full command names, much shorter aliases can be set in the command manager.

Notes:
  • crsAdmin commands are for the console only.
  • crsGreet commands are bundled together. By default, the crsGreet command is 200 access.
  • crsQRanks commands are bundled together. By default, the crsQRanks command is 200 access.
  • Commands will not work if the user issuing the commands is not in the CRS database.


crsAdmin [override] [field name] [username] [new entry] = Set's the user's database field to the specified entry. DO NOT use this command if you don't know what you're doing.
crsAdmin [members] (#) = Lists all the members in the database. If a rank # is supplied, the list will be filtered by that criteria.
crsAdmin [resetdb] = Deletes your database and resets it in the blink of an eye. No more having to close your bot, losing your ops and other important data, and deleting the file yourself.
crsAdmin [massrank] [probation / peon / grunt / shaman] [rank #] = Mass sets users from your clan with a specified clan ranking to the numerically specified crs rank.

crsCmds = Lists the CRS commands a user can use for their access level.
crsDemote [username] (#) (reason) = Demotes a user by # ranks. If # is omitted, user will be demoted 1 rank. 200 access.
crsDisable [username] (reason) = Demotes a user to the lowest rank immediately. 200 access.

crsGreet [on] = Enables the greeting of clan members and non-members.
crsGreet [off] = Disables the greeting of clan members and non-members.
crsGreet [mem] [on] = Enables the greeting of clan members.
crsGreet [mem] [off] = Disables the greeting of clan members.
crsGreet [mem] [Greeting] = Sets the greet message on-the-fly for clan members.
crsGreet [nmem] [on] = Enables the greeting of non-clan members.
crsGreet [nmem] [off] = Disables the greeting of non-clan members.
crsGreet [nmem] [Greeting] = Sets the greet message on-the-fly for non-clan members.
crsGreet [#] [Greeting] = Sets the greeting for the specified CRS rank.

crsMemInfo [Username] = Displays a spefified CRS user's join date and date/time last active. 200 access.
crsPromote [username] (#) (reason) = Promotes a user by # ranks. If # is omitted, user will be promoted 1 rank. 200 access.

crsQRanks [find] [rank or rank #] = Lists members having the specified rank.
crsQRanks {list} = Lists all rank names.
crsQRanks [info] [rank or rank #] = Detailed information about the specified rank.

crsRank [info] [username] = Displays the specified CRS member's rank. 200 access.
crsRankInfo [username] = Displays previous & current ranks, date/time of last promotion, and name of last promoter for a specificied CRS user. 200 access.
crsRankStats [username] = Displays days in clan, number of recruits, and days since last logged into channel for a spefified CRS user. 200 access.
crsRemove [username] = Removes a member from the database. 200 access.
crsRestore [username] (reason) = Restores the user's rank to their previous rank. 200 access.
crsSet [username] (#) (reason) = Sets the username to the specified rank. If rank # is omitted, the user will be set at the lowest rank. 200 access.


Example Usages:
If you already have users in the database and you've added/removed ranks, there is no need to close the bot in order to delete the database. Within the console, type:

Quote

/crsAdmin resetdb

This will delete the database, create a new database with your bot console as the first member without having to close the bot, and does so as fast as it would take to read a setting from an ini file (super fast!).



Important Notes:

  • You MUST REMOVE your crs PLUGIN from your /plugins folder.
  • It's also a good idea to remove your MemberData.mdb from the Stealthbot folder as well to avoid any conflicts. If you must, you can manually re-enter the data from the two files.
  • Please read the FAQs found below this post for detailed instructions on how to manage this script as it has significant changes/upgrades from the previous version.
  • Command aliases and access/flags can be edited in the Command Manager, not the script itself.
  • Please view the Command Manager to see the command limitations.
  • CRS FAQs can be viewed here: http://www.stealthbo...cript-faqs-crs/

Attached File(s)



#2 User is offline   The-Black-Ninja Icon

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

Posted October 13, 2009 - 08:56 PM

I don't mean to bump, but the 1.8 version has some anti-spam settings for greet messages.

The following instructions are for users who are upgrading from a previous version ONLY!! (Not upgrading from the plugin, but if you're upgrading this script). If this is your first time downloading it, ignore this message.

What you will need to do, in addition to replacing the script file, open up your scripts.ini and in the [crs] section, insert this code:
'//  Anti-flood settings for the greet message."
  '//  greet_bufferTime - If users join within these seconds, they will not be greeted.
 '//  greet_coolDown - Users will need to wait these amount of seconds before they will be greeted again. 1800 sec = 30 mins
 '//  greet_queueExit - If the queue load gets to this number, the bot will not greet until the queue decreases.
 greet_bufferTime=7
 greet_coolDown=1800
 greet_queueExit=4
Between these entries:
nm_greet=Welcome %0 to %c. Your ping is %pms.
 '//  Rank specific greet messages.
So it looks like:
nm_greet=Welcome %0 to %c. Your ping is %pms.
  '//  Anti-flood settings for the greet message."
 '//  greet_bufferTime - If users join within these seconds, they will not be greeted.
 '//  greet_coolDown - Users will need to wait these amount of seconds before they will be greeted again. 1800 sec = 30 mins
 '//  greet_queueExit - If the queue load gets to this number, the bot will not greet until the queue decreases.
 greet_bufferTime=7
 greet_coolDown=1800
 greet_queueExit=4
  '//  Rank specific greet messages.
Then save the file.

#3 User is offline   Tower Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 56
  • Joined: September-11 09

Posted October 13, 2009 - 09:24 PM

View PostThe-Black-Ninja, on 13 October 2009 - 02:56 PM, said:

I don't mean to bump, but the 1.8 version has some anti-spam settings for greet messages.

The following instructions are for users who are upgrading from a previous version ONLY!! If this is your first time downloading it, ignore this message.

What you will need to do, in addition to replacing the script file, open up your scripts.ini and in the [crs] section, insert this code:
'//  Anti-flood settings for the greet message."
 '//  greet_bufferTime - If users join within these seconds, they will not be greeted.
 '//  greet_coolDown - Users will need to wait these amount of seconds before they will be greeted again. 1800 sec = 30 mins
 '//  greet_queueExit - If the queue load gets to this number, the bot will not greet until the queue decreases.
 greet_bufferTime=7
 greet_coolDown=1800
 greet_queueExit=4
Between these entries:
nm_greet=Welcome %0 to %c. Your ping is %pms.
 '//  Rank specific greet messages.
Then save the file.



awesome nice work, heather!

#4 User is offline   BloodSe3ker Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: October-13 09

Posted October 14, 2009 - 11:44 PM

When i run this script i get this
[16:43:39.690] Scripting runtime error '13' in crs: (line 255; column 0)
[16:43:39.703] Type mismatch: 'CInt'
[16:43:39.711] Offending line: >>
Idk why.

#5 User is offline   The-Black-Ninja Icon

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

Posted October 15, 2009 - 12:46 AM

Make sure you insert the INI stuff in your scripts.ini file.

#6 User is offline   BloodSe3ker Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: October-13 09

Posted October 15, 2009 - 01:19 AM

View PostThe-Black-Ninja, on 14 October 2009 - 04:46 PM, said:

Make sure you insert the INI stuff in your scripts.ini file.

I'm a total noob what are the ini stuff?, i can find scripts.ini file

#7 User is offline   The-Black-Ninja Icon

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

Posted October 15, 2009 - 02:04 AM

In your bot, click the Scripting drop down menu and click " Open Scripts Folder ". Your scripts.ini should be in that folder. Open up the ini, find the [crs] section and follow the instructions in my post above.

#8 User is offline   BloodSe3ker Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: October-13 09

Posted October 15, 2009 - 02:14 AM

View PostThe-Black-Ninja, on 14 October 2009 - 06:04 PM, said:

In your bot, click the Scripting drop down menu and click " Open Scripts Folder ". Your scripts.ini should be in that folder. Open up the ini, find the [crs] section and follow the instructions in my post above.

now i feel stupid what am i suppose to insert to the crs section?

#9 User is offline   The-Black-Ninja Icon

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

Posted October 15, 2009 - 02:16 AM

Read post #2.

#10 User is offline   BloodSe3ker Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: October-13 09

Posted October 15, 2009 - 02:25 AM

View PostThe-Black-Ninja, on 14 October 2009 - 06:16 PM, said:

Read post #2.

Thanks TBN you the best :)

#11 User is offline   DemonHunter Icon

  • Full Member
  • PipPipPip
  • Group: Members
  • Posts: 176
  • Joined: September-12 09

Posted October 15, 2009 - 06:07 AM

I'm gonna try this script now, thx Ninja (is it ok to call u ninja?)
EDIT:It works flawlessly great job

This post has been edited by DemonHunter: October 15, 2009 - 06:18 AM


#12 User is offline   The-Black-Ninja Icon

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

Posted October 15, 2009 - 06:17 AM

Line 139 was missing a " , vbNullString " at the end, but other then that, you shouldn't be getting those other errors. I've updated the script in my post.

#13 User is offline   DemonHunter Icon

  • Full Member
  • PipPipPip
  • Group: Members
  • Posts: 176
  • Joined: September-12 09

Posted October 15, 2009 - 06:20 AM

Lol, sry I was too hasty yo edit and you saw my first editions but it's working now. i forgot to config it :P

#14 User is offline   DemonHunter Icon

  • Full Member
  • PipPipPip
  • Group: Members
  • Posts: 176
  • Joined: September-12 09

Posted October 16, 2009 - 01:53 AM

When I try to use .crsset Dem0n_Hunter <rank> i get this error:
[06:52:36 PM] Scripting runtime error '-2147217904' in crs: (line 1441; column 0)
 [06:52:36 PM] [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
 [06:52:36 PM] Offending line: >> 
 [06:52:36 PM] Scripting runtime error '-2147217904' in crs: (line 1441; column 0)
 [06:52:36 PM] [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
 [06:52:36 PM] Offending line: >> 
 [06:52:36 PM] Scripting runtime error '-2147217904' in crs: (line 1441; column 0)
 [06:52:36 PM] [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
 [06:52:36 PM] Offending line: >> 



#15 User is offline   The-Black-Ninja Icon

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

Posted October 16, 2009 - 01:58 AM

Quote

/crsset Dem0n_Hunter 10
[09:58:19 PM] " Dem0n_Hunter " has been added as a new member with the rank of 10 - Creed Probation Lvl 3


#16 User is offline   DemonHunter Icon

  • Full Member
  • PipPipPip
  • Group: Members
  • Posts: 176
  • Joined: September-12 09

Posted October 16, 2009 - 01:59 AM

Oh, I thought I have to put the name :P I'm terribly sry

#17 User is offline   DemonHunter Icon

  • Full Member
  • PipPipPip
  • Group: Members
  • Posts: 176
  • Joined: September-12 09

Posted October 16, 2009 - 04:13 AM

sigh, I can't edit so don't blame me for dp
I've changed the access of a few ranks and changed their names but I didn't change the numbers of them so basicly my ranks are like this:
crsRanks(1) = "Chieftain"               : crsRankAccess(1) = 200
   crsRanks(2) = "Shaman"                  : crsRankAccess(2) = 80
   crsRanks(3) = "Grunt"                   : crsRankAccess(3) = 50
   crsRanks(4) = "Peon"                    : crsRankAccess(4) = 30
   crsRanks(5) = "Eliminator"              : crsRankAccess(5) = 10
   crsRanks(6) = "Slayer"                  : crsRankAccess(6) = 10
   crsRanks(7) = "Murderer"                : crsRankAccess(7) = 10
   crsRanks(8) = "Creed Probation Lvl 5"   : crsRankAccess(8) = 10
   crsRanks(9) = "Creed Probation Lvl 4"   : crsRankAccess(9) = 10
   crsRanks(10) = "Creed Probation Lvl 3"  : crsRankAccess(10) = 10
   crsRanks(11) = "Creed Probation Lvl 2"  : crsRankAccess(11) = 10
   crsRanks(12) = "Creed Probation Lvl 1"  : crsRankAccess(12) = 10
   crsRanks(13) = "Thug"                   : crsRankAccess(13) = 10
   crsRanks(14) = "Banned"                 : crsRankAccess(14) = 0



and then I've done the /crsadmin massrank grunt 3
and it added all the grunts to rank 3 so 50 access.
then I changed the access of .crscmds to 20 ranks but no one can use the command. is there something wrong?

This post has been edited by DemonHunter: October 16, 2009 - 04:17 AM


#18 User is offline   The-Black-Ninja Icon

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

Posted October 16, 2009 - 04:39 AM

Does crscmds work from within the bot console?

#19 User is offline   DemonHunter Icon

  • Full Member
  • PipPipPip
  • Group: Members
  • Posts: 176
  • Joined: September-12 09

Posted October 16, 2009 - 04:40 AM

yes, and I can use it with my own account too cuz I have 200 rank in the database

#20 User is offline   The-Black-Ninja Icon

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

Posted October 16, 2009 - 04:50 AM

I can't seem to duplicate this. Ensure that the grunts were added to the database with the appropriate rank and check to see if the grunts actually got their access set on the bot.

#21 User is offline   DemonHunter Icon

  • Full Member
  • PipPipPip
  • Group: Members
  • Posts: 176
  • Joined: September-12 09

Posted October 16, 2009 - 04:52 AM

Wait, do you mean I have to add everyone manually to the database? cuz I'm wondering what the massrank is for?

#22 User is offline   The-Black-Ninja Icon

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

Posted October 16, 2009 - 04:56 AM

No, do a simple crsRankInfo <user> and a /whois <user> to make sure they're at the proper crs rank and the proper access level on the bot.

#23 User is offline   DemonHunter Icon

  • Full Member
  • PipPipPip
  • Group: Members
  • Posts: 176
  • Joined: September-12 09

Posted October 16, 2009 - 05:14 AM

Well for crsrankinfo i get this
[10:12:49 PM] " vdl-host " is ranked #3 (previously #3), last promoted on 15/10/2009 7:54:22 PM by VDL-BOT.


and for /whois i get this
[10:13:07 PM] There was no such user found.

cuz the bot didn't add anyone to it's database dunno why

#24 User is offline   The-Black-Ninja Icon

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

Posted October 16, 2009 - 05:18 AM

What you need to do is go into the scripts.ini, in the crs section, and you need to enable the aa_on option. Once you do that, run the massrank command again. The users should get their access to the bot this time, you'll know this because you'll see that green, inbot text telling the person was given X access.

#25 User is offline   DemonHunter Icon

  • Full Member
  • PipPipPip
  • Group: Members
  • Posts: 176
  • Joined: September-12 09

Posted October 16, 2009 - 07:50 AM

Woot it worked now. TBN ur the best, I saw the green text last time but it went way faster cuz it didn't actually add the names to my database.
You should add that to your FAQ cuz it's off by default and many people might not know it like me

This post has been edited by DemonHunter: October 16, 2009 - 08:03 AM


  • (9 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • 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