StealthBot.net: SharedQ Script - StealthBot.net

Jump to content

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

SharedQ Script version 2.1.9

#1 User is offline   AwaKening Icon

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

Posted October 22, 2009 - 07:49 PM

Name: SharedQ
Author: AwaKening
Version: 2.1.9

Description: Share your bot's Queue among other bots to avoid flooding.

Requirements: Stealthbot Version v2.7+

Commands: none

Settings:
All settings can be found in scripts.ini
Settings dialogs will display on the first time run


sharePublic
Y/N share public output messages

shareWhispers
Y/N share whispered messages

shareEmotes
Y/N share emoted messages

shareMod
Y/N share Moderation commands

whisperUsers
Whispers to any of these users will not be shared

sqChannel
Set a channel name here if you want to share your queue only while in this channel

maxMessageLen
Split Messages over specified length

Additional Notes:
No commands are necessary to run this script
Simply Load the script into any/all bots you would like sharing the queue

There is always a small posibility you could get a repeated phrase. Out of order has been fixed!

Changelogs:

' v2.1.9 updated 11/23/2010
'       - Bot will not share messages if the queue is empty and not delayed
' v2.1.8 updated 11/22/2010
'       - Fixed a bug with messages longer than 223 characters
'       - Changed delay to prevent bot from grabbing messages too soon
' v2.1.7 updated 07/15/2010
'       - Fixed split messages when whispered or emoted
' v2.1.6 updated 07/14/2010
'       - Added setting to split up messages over a certain length
' v2.1.5 updated 06/28/2010
'       - Second attempt to fix same bot from grabbing all the messages (moved setdelay)
' v2.1.4 updated 06/24/2010
'       - Removed an extra delay that was left in the timer
'       - Fixed an issue with bot grabbing too many messages
' v2.1.3 updated 05/16/2010
'       - setDelay moved to the top of MessageQueued Sub (to help with slow messages)
'       - If bot is closed/reloaded with a queued message, it will now unlock the message for another bot
' v2.1.2 updated 05/09/2010
'       - Fixed illegal assignment errors
' v2.1.1 updated 05/07/2010
'       - Queued messages if bot is kicked offline will be reset in the queue file to be taken
' v2.1.0 updated 05/06/2010
'       - Created SharedQ Class and moved most private subs/functions
'       - Added a line in the sharedq file to indicate if message is pending (should fix message order)
' v2.0.8 updated 05/05/2010
'       - Changed Skips to use equation: cInt(Len(Message)/100+1)
'       - Changed the queue timer
' v2.0.7 updated 11/28/2009
'       - Added Event_ChannelJoin to eliminate the need to check channel in the timer
'         (should help slightly with duplicate messages)
'       - Changed the timer from 1000ms to 1500ms
'       - Added /clan command to sharedq
'       - Added check to see if bot is a channel op before it pulls a moderation command from the sharedq
' v2.0.6 updated 11/15/2009
'       - Fixed problem with queue backing up if no channel was specified in settings
' v2.0.5 updated 11/14/2009
'       - Added channel check before grabbing a message from the queue
' v2.0.4 updated 11/10/2009
'       - Added Queued variable to make the bot skip interval if message received
'        (should help with the out of order messages until SB is updated with queue.credits)
'       - Added ignore public output messages setting
'       - Fixed occasional error message: Scripting runtime error '62' in SharedQ: (line 234; column 1)
' v2.0.3 updated 10/23/2009
'       - Added Setting to ignore whispered messages
'       - Added Setting to ignore emoted messages
'       - Added Setting to ignore whispered messages to specified users
'       - Added Setting to share Moderation commands
'       - Fixed cq and scq commands
' v2.0.2 updated 10/22/2009
'       - Added a setting for shared channel
'       - Added a check for filesize before opening the queue file
'       - Fixed queueFile Location
' v2.0.0 updated 10/22/2009
'       - Completely reworked the sharing method

Attached File(s)



#2 User is offline   Parrothead Icon

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

Posted October 22, 2009 - 08:50 PM

I put this on both my bots, reloaded it, but it didn't split anything when I spammed the spacebar on one of the bots and rejoined the channel for greet whispers.

I didn't get any type of error.

This post has been edited by Parrothead: October 22, 2009 - 08:50 PM


#3 User is offline   AwaKening Icon

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

Posted October 22, 2009 - 09:01 PM

Are you getting any output at all, or you just mean that one bot is taking all the payload?



#4 User is offline   Parrothead Icon

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

Posted October 22, 2009 - 09:18 PM

Both bots take their own payload. I don't get any output at all; but I do get the purple text at the beginning saying it is loaded.

Is there any type of requirement for another bot to say the message, like does there need to be 5 messages backed up before anything is split?

This post has been edited by Parrothead: October 22, 2009 - 09:23 PM


#5 User is offline   AwaKening Icon

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

Posted October 22, 2009 - 09:23 PM

I'm a little confused by what you're saying. Are you getting any messages displayed at all, or are they just getting lost all together?

Just updated the script to 2.0.1; although I'm not having any problems with it running on mine.

I suppose it could be the file location. Open the script and find the following line:
Private Const queueFile = "%SYSTEMROOT%SharedQ.txt"

try chaning the location to something like:
Private Const queueFile = "C:\SharedQ.txt"

make sure that you use that same line in both your bots.

#6 User is offline   Parrothead Icon

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

Posted October 22, 2009 - 09:33 PM

Changing the file type to C:\SharedQ.txt worked perfectly! Thanks a lot AwaKening, I've been needing this for a few weeks now.

#7 User is offline   AwaKening Icon

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

Posted October 22, 2009 - 10:11 PM

Wow, that was my fault. Thanks, and fixed 2.0.2.



#8 User is offline   SuI(C)IdE Icon

  • Full Member
  • PipPipPip
  • Group: Banned
  • Posts: 103
  • Joined: September-11 09

Posted October 22, 2009 - 10:15 PM

How the hell do you download it / where do you download it from? I see no option. O_O
Posted Image

SuI[C]IdE's DotA League Script Author.

Interested in a high quality DotA League Script, for the cheapest price? MSN / Email me @ [email protected] | Paypal ~ Fast & Secure.

#9 User is offline   AwaKening Icon

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

Posted October 22, 2009 - 10:42 PM

You probably was checking while I was updating the file. Should be there now.

#10 User is offline   CCC Icon

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

Posted October 23, 2009 - 11:23 AM

Was just wondering if it
* Splits the queue on bans/kicks
* Whispers

#11 User is offline   AwaKening Icon

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

Posted October 23, 2009 - 03:04 PM

View PostFoxInTheBox, on 23 October 2009 - 05:23 AM, said:

Was just wondering if it
* Splits the queue on bans/kicks
* Whispers


It doesn't split any commands except /w and /me. I'm actually putting an update out today that gives you settings to disable them as well, and specify users that you don't want to share whispers to.

#12 User is offline   joe x86 Icon

  • Emergency Programmer Hologram
  • PipPipPip
  • Group: Moderators
  • Posts: 319
  • Joined: September-06 09

Posted October 23, 2009 - 04:16 PM

Splitting kickbanunban would be amazing for moderation. Having automoderation on only one bot and using SplitQueue should single-handedly negate all issues with double bans.
Swift, Ruby, Objective-C, JavaScript (the good parts)

iPhone Xs Max
MacBook Pro (2019, 15", 6-core i7, 16GB RAM, 256GB SSD)
Lenovo TS140 (Ubuntu, 6TB mirrored boot zpool, Xeon E3-1231, 32GB ECC RAM, RTX 2070)

#13 User is offline   AwaKening Icon

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

Posted October 23, 2009 - 06:18 PM

Updated with additional settings

View Postjoe x86, on 23 October 2009 - 10:16 AM, said:

Splitting kickbanunban would be amazing for moderation. Having automoderation on only one bot and using SplitQueue should single-handedly negate all issues with double bans.


Good thought. It's in there as a setting now.

#14 User is offline   DemonHunter Icon

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

Posted October 29, 2009 - 07:45 AM

Good job awakening, I'm gonna use this for my bots on PvPGN since I can have more than 1 bot per cd key hehe

#15 User is offline   Castigate Icon

  • Newbie
  • PipPip
  • Group: Beta Testers
  • Posts: 16
  • Joined: August-26 09

Posted October 29, 2009 - 05:52 PM

Out of curiosity, could I host a file on a webserver that I can write to, have the bots read from the webserver so that essentially, I have them all using a www.blah.com/text.txt

#16 User is offline   AwaKening Icon

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

Posted October 31, 2009 - 11:44 PM

It wouldn't function well as a txt. This was designed for local use only. You'd want to redesign it to use mysql in conjunction with your server. I don't really see why you'd use bots on different servers and have a need for something like this.

#17 User is offline   InsaneFirebat Icon

  • Group: Members
  • Posts: 83
  • Joined: September-12 09

Posted November 09, 2009 - 02:56 PM

Pure genius for my trivia bot. works perfect! thx

[07:19:49 PM] Scripting runtime error '62' in SharedQ: (line 234; column 1)
 [07:19:49 PM] Input past end of file
 [07:19:49 PM] Offending line: >> 
 [07:19:49 PM] Scripting runtime error '62' in SharedQ: (line 234; column 1)
 [07:19:49 PM] Input past end of file
 [07:19:49 PM] Offending line: >> 
 [07:19:49 PM] [BNCS] 10054 -- The connection is reset by remote side
 [07:19:49 PM] [BNCS] Disconnected.
 [07:19:49 PM] ST: Stopping...
 [07:19:49 PM] [BNCS] The Battle.net server has terminated your connection.
 [07:19:49 PM] [BNCS] Attempting to reconnect in 1 second...


anything u can do about that?
Fear the fearsome fury of the forest fawn! Posted Image Clan [email protected]
Posted Image

#18 User is offline   Castigate Icon

  • Newbie
  • PipPip
  • Group: Beta Testers
  • Posts: 16
  • Joined: August-26 09

Posted November 10, 2009 - 07:45 AM

View PostAwaKening, on 31 October 2009 - 11:44 PM, said:

It wouldn't function well as a txt. This was designed for local use only. You'd want to redesign it to use mysql in conjunction with your server. I don't really see why you'd use bots on different servers and have a need for something like this.

In that case would you mind doing so? I don't mind waiting, I just have 5 bots ran over different PC's

#19 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 - 03:14 AM

View PostInsaneFirebat, on 09 November 2009 - 07:56 AM, said:

Pure genius for my trivia bot. works perfect! thx

[07:19:49 PM] Scripting runtime error '62' in SharedQ: (line 234; column 1)
[07:19:49 PM] Input past end of file
[07:19:49 PM] Offending line: >> 
[07:19:49 PM] Scripting runtime error '62' in SharedQ: (line 234; column 1)
[07:19:49 PM] Input past end of file
[07:19:49 PM] Offending line: >> 
[07:19:49 PM] [BNCS] 10054 -- The connection is reset by remote side
[07:19:49 PM] [BNCS] Disconnected.
[07:19:49 PM] ST: Stopping...
[07:19:49 PM] [BNCS] The Battle.net server has terminated your connection.
[07:19:49 PM] [BNCS] Attempting to reconnect in 1 second...


anything u can do about that?


How often and when is this happening? It's possible that the file is being cleared before it tries to display, and this could happen occasionally, but it shouldn't be often. I do have a fix for the occasional error here, but I'm really waiting for the next SB release when I can check queue credits.

@Castigate
I don't plan on making this compatible for remote use as of right now. Sorry.

#20 User is offline   CCC Icon

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

Posted November 15, 2009 - 12:13 PM

Hmhm Could you add so its possible to shareq on bans and unban only`? oO

#21 User is offline   AwaKening Icon

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

Posted November 15, 2009 - 06:17 PM

Updated version 2.0.5.

Addresses the occasional error message and adds another setting. You could tell it to share nothing except for the commands (ban, kick, unban). Just go into scripts.ini. Let me know if you can't figure it out, but it's pretty simple.

#22 User is offline   InsaneFirebat Icon

  • Group: Members
  • Posts: 83
  • Joined: September-12 09

Posted November 16, 2009 - 02:12 AM

Your update was full of fail for me... when i reloaded scripts, the bots quit responding altogether. decided to check it out many hours later. i deleted the updated script and put the old one in its place. when i reloaded the scripts for the 3 bots... it went crazy sending all the responses and trivia questions at a VERY fast rate. the second and third bots kicked in just in time to save it from flooding out. everything was backed up in the queue from the last like 5+ hours. i watched it send all its messages for about 5 minutes before deciding to clear the queue. you may want to make another update for the script. I'm using the older version in the meantime.

Edit: Added log of such craziness...
Spoiler

This post has been edited by InsaneFirebat: November 16, 2009 - 02:20 AM

Fear the fearsome fury of the forest fawn! Posted Image Clan [email protected]
Posted Image

#23 User is offline   AwaKening Icon

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

Posted November 16, 2009 - 06:18 AM

I think I know the problem. If the channel wasn't set to anything particular, then it wouldn't display the messages. Then your queue backed up. Try redownloading newest version.



#24 User is offline   InsaneFirebat Icon

  • Group: Members
  • Posts: 83
  • Joined: September-12 09

Posted November 16, 2009 - 06:45 AM

OK seems to be working now. thx for the update
Fear the fearsome fury of the forest fawn! Posted Image Clan [email protected]
Posted Image

#25 User is offline   InsaneFirebat Icon

  • Group: Members
  • Posts: 83
  • Joined: September-12 09

Posted November 20, 2009 - 01:39 AM

Sorry for the double post...
Finding it hard to phrase this... uh.. lets say i got 2 kinds of bots (both stealthbot v2.7.1) one is moderation, and the other is trivia. At the moment, the trivia bots are using your SharedQ script. But I would like my moderation bot to share its queue (separate from the trivia) with its own "helper bot"? Is that possible?
Fear the fearsome fury of the forest fawn! Posted Image Clan [email protected]
Posted Image

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