StealthBot.net: Shaman Rotation Script - StealthBot.net

Jump to content

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

Shaman Rotation Script version 1.3.6

#1 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted October 09, 2009 - 04:11 AM

Name: Rotation
Author: AwaKening
Version: 1.3.6

Description: Expand your shaman capabilities by demoting offline shaman to promote online shaman from a list.

Requirements: Stealthbot Version v2.7 Build 442+

Commands:

addshaman <username> <priority 0-100>
Priority is optional - 0 priority is given if none specified
adds specified user to the list

remshaman <username>
removes a user from the list

rotation
list the shamans on the rotation list

shamans
lists current shaman and rotational


Settings:

LeavesClanRemoveUser
Remove users from the rotational setting if they leave the clan; otherwise they would remain on the list with their priority intact
Default = True

userFlags
Members with any of these flags will be rotated in addition to the Rotational List
Default = Null

userAccess
Members with this access level or higher will be rotated in addition to the Rotational List
Default = Null

rotational
Shamans that will be rotated seperate by comma space
Priority can be given (0-100) by use of * (0 is assumed if none is specified)
Default = shaman1*0, shaman2*0, shaman3*1

minimumTime
Minutes a shaman has to be online before a new logon can bump them
Default = 120

Additional Notes:
Chieftan rank is required by the bot for this script to function!
Settings can be changed in scripts.ini (please look at settings for details)

NEW SETTINGS:
userAccess and userFlags in scripts.ini to allow rotations by flag/access levels
Changing either of these 2 settings requires a script reload to take effect

Priorities have been added to specified rotational shamans. You can add a priority by simply using the /addshaman feature and specifying the priority even if the user is already listed. Lets say AwaKening is on the rotation with no priority specified. I will just type
/addshaman awakening 10
or
/addshaman awakening*10

If multiple shamans are online with equal priorities, then the promotion will be determined by time online. User will not be promoted unless the time is greater than the threshhold setting "minimumTime"

Updates:
' 1.3.6
'    - Added setting to remove a user from rotation if they leave the clan (true by default)
'    - Fixed priority demotions when bot is reloading script or logging on
' 1.3.5
'    - Minor code improvements that bugged me
'    - Added cint to priority check that may have been affecting priority promotions
' 1.3.4
'    - Bot will now make needed promotions/demotions when logging on or reloading
' 1.3.3
'    - Fixed priority promotions when a shaman logs off and others are waiting
' 1.3.2
'    - Made shamans Public for use in other scripts
' 1.3.1
'    - Fixed priority setting in scripts.ini showing more than once on some users
'    - Fixed rotational shaman by flags
'    - Minor code improvements
' 1.3.0
'    - Priority can now be added to a shaman 0-100
'    - Removed some repeat item updates and shortened code
'    - Added a promotion sub to cleanup some of the ShamanLoggedOn Sub
'    - Lots of recoding to work with priorities
' 1.2.1
'    - Fixed an error from occuring due to loading shaman from list that left the clan
'    - Rotation command will now list users that have flags or access req if used
' 1.2.0
'    - Added version to settings
'    - Created Functions Add and RemoveShaman to clean up the Command Event
'    - Added command shamans (alias shaman) to list permanent and rotational shaman
' 1.1.4
'    - Fixed Error Line 173 when removing a shaman that is not in the clan anymore
'    - Fixed Error Line 294 (Problem with rotational shaman being removed from clan)
' 1.1.3
'    - Added a delay between demoting and promoting a new shaman to avoid errors
'    - Won't try to promote peons in clan under 1 week anymore
'    - Added AddChat's for all promotion/demotions of the usernames (mostly for debugging)
' 1.1.2
'    - Fixed initial shaman loading when bot firstrun
' 1.1.1
'    - Fixed promotion from peon to Shaman (Thanks Pyro)
'    - Fixed an error in Event_ClanMemberList with initial login
' 1.1.0
'    - Fixed an error with demoting a shaman more than once after logging off (Thanks raylu)
'    - Added userFlags and userAccess setting to allow rotations by Flag or Access Level
'    - Fixed an error from occuring when a non-clan member is on the rotation list
'      (Scripting runtime error '9' in Rotation: (line 265; column 2))
' 1.0.4
'    - Fixed an error promoting an online candidate shaman when another logs off
'    - Fixed a bunch of dictionary item rank updates
'    - Disabled some functionality in script reload temporarily
' 1.0.3
'    - Fixed offline shaman demotions
'    - Fixed multiple promotion attempts for same user
' 1.0.2
'    - Tied in with ClanSafety script to prevent users from re-logging to get shaman
' 1.0.1
'    - Changed CreateCommand method due to a new bug in SB

Attached File(s)



#2 User is offline   CCC Icon

  • Hey
  • PipPipPip
  • Group: Members
  • Posts: 155
  • Joined: September-11 09

Posted October 09, 2009 - 08:29 AM

So far so good Thanks for a nice script :D

#3 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted October 09, 2009 - 03:13 PM

Just noticed I had the wrong file attached somehow. It's fixed now.

Updated @9:21am pacific to fix a bug with demoting offline shaman.

#4 User is offline   Shubit Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 32
  • Joined: September-13 09

Posted October 09, 2009 - 09:10 PM

For me it isn't running. The bot doesn't promote or demote anything :(

I had a short look into the source and line 56 you are splitting with ",", shouldn't you split with ", "?

#5 User is offline   The-Black-Ninja Icon

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

Posted October 09, 2009 - 09:16 PM

It all depends how he stores the variable. If it were to be stored like this:
A = "User, User, User"
Then it would be split by Split(A, ", "), however, if it's stored as
A = "User1,User2,User2"
Then the it's split by Split(A, ",")

Is your Shaman chief? If not, the bot needs to be chief in order to demote.

#6 User is offline   Shubit Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 32
  • Joined: September-13 09

Posted October 09, 2009 - 09:55 PM

Using the addshaman and delshaman command the script uses ", " to split.
Of course my bot is chieftain.

Oh in the first post he wrote: "Edit: Found some bugs I'm working out. I'll repost it soon"
Maybe we should just wait XD

#7 User is offline   cline Icon

  • define the code
  • PipPip
  • Group: Members
  • Posts: 10
  • Joined: October-09 09

Posted October 09, 2009 - 09:58 PM

nice Script i see :D

#8 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted October 09, 2009 - 11:53 PM

Sorry guys, I hadn't tested it real thoroughly and came across some issues. I've taken care of everything I could find and reposted the download above.

Check back for updates because I'll still be adding in some more functionality.

#9 User is offline   Shubit Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 32
  • Joined: September-13 09

Posted October 10, 2009 - 09:20 AM

Yeah, now it is running. Thanks!

#10 User is offline   Gulf80 Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 38
  • Joined: October-08 09

Posted October 10, 2009 - 09:42 AM

Thanks very good! +Rep

#11 User is offline   VJain Icon

  • Nobody
  • PipPip
  • Group: Members
  • Posts: 33
  • Joined: September-10 09

Posted October 10, 2009 - 10:25 AM

Script looks good.

I just have a feature suggestion.

Would it be possible to use a Flag for this? I feel it would be easier so then it's integrated with the Database system.

~VJ

#12 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted October 10, 2009 - 04:32 PM

View PostVJain, on 10 October 2009 - 04:25 AM, said:

Script looks good.

I just have a feature suggestion.

Would it be possible to use a Flag for this? I feel it would be easier so then it's integrated with the Database system.

~VJ


You mean rotate according to flags rather than a username list? Easy enough, but there's a function in Stealth that needs to be fixed. Hopefully 52 gets it fixed next build and I'll add that feature in.

#13 User is offline   VJain Icon

  • Nobody
  • PipPip
  • Group: Members
  • Posts: 33
  • Joined: September-10 09

Posted October 10, 2009 - 06:43 PM

View PostAwaKening, on 10 October 2009 - 12:32 PM, said:

You mean rotate according to flags rather than a username list? Easy enough, but there's a function in Stealth that needs to be fixed. Hopefully 52 gets it fixed next build and I'll add that feature in.


Awesome, thanks!

#14 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted October 14, 2009 - 05:00 AM

1.1.0 New features and bug fixes

' - Fixed an error with demoting a shaman more than once after logging off (Thanks raylu)
' - Added userFlags and userAccess setting to allow rotations by Flag or Access Level
' - Fixed an error from occuring when a non-clan member is on the rotation list
' (Scripting runtime error '9' in Rotation: (line 265; column 2))

userAccess and userFlags have to be changed in Scripts.ini if you wish to use them
A script Reload is necessary for these 2 changes to take effect

You must also update your Stealthbot to Build 442 or greater for either of these settings to work due to a bug in Build 441
Check here for build updates

#15 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted October 14, 2009 - 05:57 PM

Updated to 1.1.1 this morning for a couple of minor changes. Make sure to read the previous post on 1.1.0 and update your build still.

#16 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted October 18, 2009 - 05:27 AM

1.1.2

Minor update to fix intial shaman rotation loading on bot first run.

#17 User is offline   Parrothead Icon

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

Posted November 10, 2009 - 11:11 PM

This plugin quit working for me.

[06:09:48 PM] Shaman Rotation is Active
[06:09:48 PM] C(TRIVIA) was added to the shaman rotation
[06:09:57 PM] -- C(Trivia) has left the channel.
[06:09:58 PM] That user is not logged on.
[06:09:59 PM] <C(BOT)#2> C(Trivia) has logged off battle.net.
[06:10:11 PM] <C(HOST) admin C(Trivia) has joined the channel.>
[06:10:11 PM] -- C(Trivia) [47ms] has joined the channel using WarCraft III: The Frozen Throne (Level: 0, icon tier Random, peon icon, in clan C).

No promotion or anything.

This post has been edited by Parrothead: November 10, 2009 - 11:16 PM


#18 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted November 11, 2009 - 02:59 AM

I was having a small issue with demotion/promotion happening too fast and the promotion would fail; therefore I added in a 1.5 second delay between them. I haven't had an issue since. Been testing for 2 weeks now. Redownload from the top post. Hopefully that was your issue.

Issue #2 you could be having. If you use my ClanSafety script also, check and see if the rotational shaman are locked out. Scripts.ini and search for locked=. Anyone listed after that will never get demotions until you clear it. You might need to raise the threshhold.

#19 User is offline   Parrothead Icon

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

Posted November 11, 2009 - 03:12 AM

Working fantastic now (method 1) ! Thank you :) .

This post has been edited by Parrothead: November 11, 2009 - 03:13 AM


#20 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted November 29, 2009 - 08:10 PM

Updated to 1.1.4 to fix a couple of rarely occuring errors.

#21 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted January 21, 2010 - 12:06 AM

Updated to 1.2.0 to add command (shamans)
Full changelog listed above.

Edit: updated to 1.2.1 to fix a bug and make one more change.

#22 User is offline   Rich Icon

  • Coke is not a drug, It's a Soda : )
  • PipPip
  • Group: Members
  • Posts: 66
  • Joined: September-13 09

Posted February 19, 2010 - 04:55 AM

It errors with game specific conventions on chiefton with this script.

/addshaman [email protected]
[08:49:43 PM] Scripting runtime error '9' in Rotation: (line 208; column 1)
[08:49:43 PM] Subscript out of range
[08:49:43 PM] Offending line: >>
[08:49:43 PM] Scripting runtime error '9' in Rotation: (line 208; column 1)
[08:49:43 PM] Subscript out of range
[08:49:43 PM] Offending line: >>
[08:49:43 PM] Scripting runtime error '9' in Rotation: (line 208; column 1)
[08:49:43 PM] Subscript out of range
[08:49:43 PM] Offending line: >>


Edit: Nvm it errors, but still works perfectly, thank you :)

This post has been edited by Rich: February 19, 2010 - 05:06 AM

Posted Image
24/7 Stealthbot user since Sept. 2008 in channel Clan Soda @ USWest.

#23 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted February 19, 2010 - 04:21 PM

View PostRich, on 18 February 2010 - 09:55 PM, said:

It errors with game specific conventions on chiefton with this script.

/addshaman [email protected]
[08:49:43 PM] Scripting runtime error '9' in Rotation: (line 208; column 1)
[08:49:43 PM] Subscript out of range
[08:49:43 PM] Offending line: >>
[08:49:43 PM] Scripting runtime error '9' in Rotation: (line 208; column 1)
[08:49:43 PM] Subscript out of range
[08:49:43 PM] Offending line: >>
[08:49:43 PM] Scripting runtime error '9' in Rotation: (line 208; column 1)
[08:49:43 PM] Subscript out of range
[08:49:43 PM] Offending line: >>


Edit: Nvm it errors, but still works perfectly, thank you Posted Image


Is this a wc3 clan or something else? I'm just wondering why you're having to use @Lordaeron. I don't get this error, and I'm thinking it's something game specific related. Also, does it happen everytime you add a shaman, and on Script Reload?

#24 User is offline   Rich Icon

  • Coke is not a drug, It's a Soda : )
  • PipPip
  • Group: Members
  • Posts: 66
  • Joined: September-13 09

Posted March 02, 2010 - 03:53 AM

it doesn't happen when script is reloaded, just when adding a shaman, but yeah it still works, so it's ok :)

and i do have game specific conventions so even though i have it on a WC3 chiefton i still have to type [email protected] to add the correct users to the shaman list.
Posted Image
24/7 Stealthbot user since Sept. 2008 in channel Clan Soda @ USWest.

#25 User is offline   ko12n Icon

  • Full Member
  • PipPipPip
  • Group: Members
  • Posts: 102
  • Joined: December-13 09

Posted April 08, 2010 - 12:01 AM

when i type .shamans it says:

Online Shaman:
Rotational Shaman:

is there a way to get rid of the rotation line?
Posted Image

  • (2 Pages)
  • +
  • 1
  • 2
  • 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