IPB

Welcome Guest ( Log In | Register )

2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 
Reply to this topicStart new topic
> Queue++
AbsoluteMSTR
post Jun 12 2009, 01:51 PM
Post #1


Full Member
***

Group: Beta Testers
Posts: 125
Joined: 5-August 07
Member No.: 27,229



Like most Queue++ it simple and gets the job done.

What to do is go beyond and further.

Centralize one bot to handle all the scripts with other bots spiting the queue.

This are the bots you can assign
Master = Main bot with all the scripts
Slave = Split Queue of Master Bot
Client = Mimic the Master Bot
ClientSlave = Split Queue of Client bot

Have Features like
Auto Emote
Share Whisper
Forward Whisper
Merged Friends list
Moderation functionality (split queue for /ban /kick)
Mass Message Friends
Whisper List

Designed to handle a league in multiple channels

Probably going to use TextFile, Implement Database Later

This post has been edited by AbsoluteMSTR: Jun 12 2009, 01:51 PM


--------------------
I offer hosting for ghost hosting on a dedicated server. PM for info
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Ribose
post Jun 12 2009, 02:32 PM
Post #2


So, it's all about fame, huh?
*****

Group: Global Moderators
Posts: 2,950
Joined: 13-February 06
From: Connecticut, USA. (GMT -5:00)
Member No.: 74



Since you have the beta, you can use the Event_MessageQueued(ID, Message, Tag) event to accomplish splitting the queue more universally than having to modify several scripts to support splitting the queue.


--------------------
~Ribose
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
AbsoluteMSTR
post Jun 13 2009, 12:35 PM
Post #3


Full Member
***

Group: Beta Testers
Posts: 125
Joined: 5-August 07
Member No.: 27,229



should add, easy to implement with other scripts
long as it uses dsp, addq will work, just recommended you use dsp

Using a Text file was causing problems, probably going to switch to mysql


--------------------
I offer hosting for ghost hosting on a dedicated server. PM for info
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Jack
post Jun 13 2009, 12:40 PM
Post #4


Ultimate spammer.
********

Group: Sr. Members
Posts: 5,593
Joined: 28-January 06
Member No.: 28



QUOTE(AbsoluteMSTR @ Jun 13 2009, 01:35 PM) *

should add, easy to implement with other scripts
long as it uses dsp, addq will work, just recommended you use dsp

Using a Text file was causing problems, probably going to switch to mysql

Uh, AddQ does not cause problems at all. I've already made the best SplitQueue released and it's flawless. Either do what Awakening did (copy my script and claim it all for yourself and that my script had perma bugs in it), or just use my script.


--------------------
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
AwaKening
post Jun 13 2009, 12:50 PM
Post #5


Don't u know who I am
***

Group: Sr. Members
Posts: 764
Joined: 19-February 06
From: Utah
Member No.: 275



QUOTE(Jack @ Jun 13 2009, 12:40 PM) *

QUOTE(AbsoluteMSTR @ Jun 13 2009, 01:35 PM) *

should add, easy to implement with other scripts
long as it uses dsp, addq will work, just recommended you use dsp

Using a Text file was causing problems, probably going to switch to mysql

Uh, AddQ does not cause problems at all. I've already made the best SplitQueue released and it's flawless. Either do what Awakening did (copy my script and claim it all for yourself and that my script had perma bugs in it), or just use my script.


/signed lol

Jacks works great. I simply made my own, using a lot of Jack's code/ideas, before he fixed his (using my ideas), but whatever. I haven't given mine to anyone, and won't be since jack fixed his anyway. Point is, just use Jacks.


--------------------
Rival Nations Reborn Map Creator

Clan RnR.com
If you're looking for a "REAL" dota league script, aim or pm me.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Jack
post Jun 13 2009, 04:58 PM
Post #6


Ultimate spammer.
********

Group: Sr. Members
Posts: 5,593
Joined: 28-January 06
Member No.: 28



If you tell me what to add then I'll do it.


--------------------
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
AbsoluteMSTR
post Jun 17 2009, 12:00 PM
Post #7


Full Member
***

Group: Beta Testers
Posts: 125
Joined: 5-August 07
Member No.: 27,229



If Jack, or Awakening can add it. The feature I desire most is the /w and /ban and /kick also being queued.

I could try playing around with both your codes. I figure using a database would be better then a text file. Since i never bothered to play around with access and learned first hand with mysql. I prefure using mysql more.


--------------------
I offer hosting for ghost hosting on a dedicated server. PM for info
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Jack
post Jun 17 2009, 12:51 PM
Post #8


Ultimate spammer.
********

Group: Sr. Members
Posts: 5,593
Joined: 28-January 06
Member No.: 28



QUOTE(AbsoluteMSTR @ Jun 17 2009, 01:00 PM) *

If Jack, or Awakening can add it. The feature I desire most is the /w and /ban and /kick also being queued.

I could try playing around with both your codes. I figure using a database would be better then a text file. Since i never bothered to play around with access and learned first hand with mysql. I prefure using mysql more.

Ribose, or I doubt me, is going to be making a new version which connects to PyNet. It will be able to go across multiple computers. I'm sure that will fix this problem.


--------------------
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
AbsoluteMSTR
post Jun 23 2009, 04:58 PM
Post #9


Full Member
***

Group: Beta Testers
Posts: 125
Joined: 5-August 07
Member No.: 27,229



PyNet? what that?


--------------------
I offer hosting for ghost hosting on a dedicated server. PM for info
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Pyro
post Jun 23 2009, 06:29 PM
Post #10


huh?
********

Group: Root Administrators
Posts: 9,073
Joined: 23-February 07
From: Orlando, Florida
Member No.: 19,243



http://pynet.no-ip.org/


--------------------
Pyro
Chieftain of Clan BoT.
Host of pyro.no-ip.biz
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
AbsoluteMSTR
post Jul 10 2009, 03:35 PM
Post #11


Full Member
***

Group: Beta Testers
Posts: 125
Joined: 5-August 07
Member No.: 27,229



Not done, but the basic functionality is done.

MySQL structure is

CODE
CREATE TABLE `queue` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(15) NOT NULL,
  `message` varchar(255) NOT NULL,
  `queued` tinyint(1) NOT NULL DEFAULT '0',
  `sent` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM;


CODE
Script("Name") = "QueuePlusPlus"
Script("Author") = "AbsoluteMSTR"
Script("Major") = 2
Script("Minor") = 0
Script("Revision") = 1

Public Database
' Database Variables
Const DBServer = "127.0.0.1"
Const DBDatabase = "stealthbot"
Const DBUser = "root"
Const DBPass = "root"

' QueuePlusPlus Variables
Const QueueBot = "AbsoluteMSTR GameServer"
' Auto Add /me
Const AutoEmote = True
' Let other Bots use /w
Const ForwardWhisper = True
' Let other bots send pad queue
Const SendPadQueue = False
' Must have one bot as operator else it will hinder proformance
Const SendBanKick = False


Public Bots
Public BotCount
Public BotIndex
Public QueuePlusPlus

Sub Event_Load()
  Database_Load
  Set QueuePlusPlus = New QueuePlusPlusClass
  Bots = Split(QueueBot)
  BotCount = UBound(Bots)+1
  BotIndex = 0
  Set MessageTimer = CreateObj("Timer", "CheckMessage")
  MessageTimer.Enabled = true
  MessageTimer.Interval = 50
End Sub

Sub Event_MessageQueued(MessageID, Message, Tag)
  If Message = "%%%%%blankqueuemessage%%%%%" Or Message = "" AND Not SendPadQueue Then Exit Sub
  If Not ForwardWhisper AND Left(Message, 3) = "/w " OR Left(Message, 9) = "/whisper " Then Exit Sub
  If Not SendBanKick AND Left(Message, 6) = "/kick " OR Left(Message, 5) = "/ban " Then Exit Sub
  If Left(Message, 1) = "/" And Not Left(Message, 3) = "/w " AND Not Left(Message, 9) = "/whisper " AND Not Left(Message, 6) = "/kick " AND Not Left(Message, 5) = "/ban " AND Not Left(Message, 3) = "/me" Then Exit Sub
  If Tag = "" Then
    If AutoEmote AND Not Left(Message, 1) = "/" Then Message = "/me " & Message
    Queue.RemoveItemByID(MessageID)
    BotIndex = (BotIndex + 1) Mod BotCount
    Bot = Bots(BotIndex)
    If Not QueuePlusPlus.IsOnline(Bot) Then
      Call Event_MessageQueued(MessageID, Message, Tag)
      Exit Sub
    ElseIf QueuePlusPlus.IsOperator(Bot) Then
      Call Event_MessageQueued(MessageID, Message, Tag)
      Exit Sub
    End If
    Call QueuePlusPlus.QueueMessage(Bot,Message)
  ElseIf Tag = "NoEmote" Then
    Queue.RemoveItemByID(MessageID)
    BotIndex = (BotIndex + 1) Mod BotCount
    Bot = Bots(BotIndex)
    If Not QueuePlusPlus.IsOnline(Bot) Then
      Call Event_MessageQueued(MessageID, Message, Tag)
      Exit Sub
    ElseIf QueuePlusPlus.IsOperator(Bot) Then
      Call Event_MessageQueued(MessageID, Message, Tag)
      Exit Sub
    End If
    Call QueuePlusPlus.QueueMessage(Bot,Message)
  ElseIf Tag = "NoQueue" Then
    Exit Sub
  End If
End Sub

Sub Event_MessageSent(MessageID, Message, Tag)
  If Tag <> "NoQueue" Then QueuePlusPlus.MarkAsSent(Tag)
End Sub

Sub CheckMessage_Timer()
  QueueMessage = QueuePlusPlus.RecieveMessage
  QueueID = QueuePlusPlus.LastID
  If Not QueueMessage = "" Then
    AddQ QueueMessage,,QueueID
  End If
End Sub

'
' QueuePlusPlus Class
'
Class QueuePlusPlusClass

  Public LastID

  Function RecieveMessage()
    Set RecieveData = Database.GetRow("queue","queued",0)
    If RecieveData.BOF and RecieveData.EOF Then
      RecieveMessage = ""
    Else
      If CStr(RecieveData("name")) = Channel.Self.Name Then
        MessageID = CInt(RecieveData("id"))
        LastID = MessageID
        If NextInLine = MessageID Then
          RecieveMessage = CStr(RecieveData("message"))
          Call Database.UpdateData("queue","queued",1,"id",CInt(RecieveData("id")))
        End If
      Else
        RecieveMessage = ""
      End If
    End If
  End Function
  
  Function NextInLine()
    Set NextInLineData = Database.GetRow("queue","sent",0)
    If NextInLineData.BOF and NextInLineData.EOF Then
      NextInLine = 0
    Else
      NextInLine = CInt(NextInLineData("id"))
    End If
  End Function
  
  Function GetQueueSize()
    GetQueueSize = Database.GetRowsCount("queue","queued",0)
  End Function
  
  Sub QueueMessage(Bot, Message)
    Call Database.InsertData("queue",Array("name","message"),Array(Bot,Message))
  End Sub
  
  Sub MarkAsSent(QueueID)
    Call Database.UpdateData("queue","sent",1,"id",QueueID)
  End Sub
  
  Function IsOperator(Name)
    ChannelIndex = Channel.GetUserIndex(Name)
    If ChannelIndex = 0 Then
      IsOperator = False
    Else
      IsOperator = Channel.Users(ChannelIndex).IsOperator
    End If
  End Function
  
  Function IsOnline(Name)
    ChannelIndex = Channel.GetUserIndex(Name)
    If ChannelIndex = 0 Then
      IsOnline = False
    Else
      IsOnline = True
    End If
  End Function
  
End Class

'
' Database Load
'
Sub Database_Load
  Set Database = New DatabaseClass
End Sub

'
' Database Class
'
Class DatabaseClass

  Private ConnectionString
  Private DB

  Private Sub Class_Initialize
    Set DB = CreateObject("ADODB.Connection")
    ConnectionString = "DRIVER={MySQL ODBC 5.1 Driver};SERVER=" & DBServer & ";DB=" & DBDatabase & ";USER=" & DBUser & ";PASSWORD=" & DBPass & ";OPTION=3;"
  End Sub

  Private Sub Class_Terminate
    Close
    Set DB = Nothing
  End Sub
  
  Private Sub Connect
    If DB.ConnectionString = "" Then
      DB.ConnectionString = ConnectionString
    End If
  End Sub

  Public Sub Open
    If Not CBool(DB.State) Then
      Connect
      DB.Open
    End If
  End Sub

  Public Sub Close
    If CBool(DB.State) Then
      DB.Close
    End If
  End Sub

  Public Function Query(SQL)
    Open
    Set Query = DB.Execute(SQL)
  End Function

  Public Function Count(Table)
    Set Row = Query("SELECT COUNT(*) From `" &Table&"`")
    Count = CInt(Row(0))
  End Function
  
  Function GetRow(From,Where,Find)
    Set GetRow = Database.Query("SELECT * FROM `"&From&"` WHERE `"&Where&"`='"&Find&"' Limit 1")
  End Function
  
  Function GetRows(From,Where,Find,Limit)
    Set GetRows = Database.Query("SELECT * FROM `"&From&"` WHERE `"&Where&"`='"&Find&"' Limit "&Limit)
  End Function
  
  Function GetRowsCount(From,Where,Find)
    Set Result = Database.Query("SELECT Count(*) FROM `"&From&"` WHERE `"&Where&"`='"&Find&"'")
    If Result.BOF And Result.EOF Then
      GetRowsCount = 0
    Else
      GetRowsCount = CInt(Result(0))
    End If
  End Function
  
  Sub UpdateData(Table,Key,Value,Where,Find)
    Database.Query("UPDATE `"&Table&"` SET `"&Key&"`='"&Value&"' WHERE `"&Where&"`='"&Find&"' LIMIT 1")
  End Sub
  
  Sub InsertData(Table,Keys,Values)
    Database.Query("INSERT INTO `"&Table&"` (`"&Join(Keys,"`,`")&"`) VALUES('"&Join(Values,"','")&"')")
  End Sub
End Class


This post has been edited by AbsoluteMSTR: Jul 10 2009, 03:36 PM


--------------------
I offer hosting for ghost hosting on a dedicated server. PM for info
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Jack
post Jul 10 2009, 11:56 PM
Post #12


Ultimate spammer.
********

Group: Sr. Members
Posts: 5,593
Joined: 28-January 06
Member No.: 28



Your code is ugly. =(


--------------------
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
AbsoluteMSTR
post Jul 11 2009, 10:00 AM
Post #13


Full Member
***

Group: Beta Testers
Posts: 125
Joined: 5-August 07
Member No.: 27,229



Jack, its better then yours or to be fair it does more then yours right now.

QUOTE(Jack @ Jul 11 2009, 12:56 AM) *

Your code is ugly. =(


http://fiftytoo.no-ip.com:45000/websvn/fil...euePlusPlus.txt

more up to date


--------------------
I offer hosting for ghost hosting on a dedicated server. PM for info
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Jack
post Jul 11 2009, 11:25 AM
Post #14


Ultimate spammer.
********

Group: Sr. Members
Posts: 5,593
Joined: 28-January 06
Member No.: 28



QUOTE(AbsoluteMSTR @ Jul 11 2009, 11:00 AM) *

Jack, its better then yours or to be fair it does more then yours right now.

QUOTE(Jack @ Jul 11 2009, 12:56 AM) *

Your code is ugly. =(


http://fiftytoo.no-ip.com:45000/websvn/fil...euePlusPlus.txt

more up to date

Does more? How? Mine perfectly splits up a queue between multiple bots and in the perfect order, I don't see anywhere in your shitty code where it does that. You got a simple timer and AddQ's which I doubt gets anywhere close to in order after you paste long text.

Also mine isn't designed to split up bans because my clan has a plugin for that already.


--------------------
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
AbsoluteMSTR
post Jul 11 2009, 10:11 PM
Post #15


Full Member
***

Group: Beta Testers
Posts: 125
Joined: 5-August 07
Member No.: 27,229



are you saying this because you tried it out or you suck at reading code

yes my script does it in order
1
2
3
4
works fine


--------------------
I offer hosting for ghost hosting on a dedicated server. PM for info
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Jack
post Jul 11 2009, 11:54 PM
Post #16


Ultimate spammer.
********

Group: Sr. Members
Posts: 5,593
Joined: 28-January 06
Member No.: 28



QUOTE(AbsoluteMSTR @ Jul 11 2009, 11:11 PM) *

are you saying this because you tried it out or you suck at reading code

yes my script does it in order
1
2
3
4
works fine

OK I'll try it out and watch it fuck up. Let me try to set this piece of shit up.

Wow I turn it on and before I even get a chance to type I get IPBanned. Fail.


--------------------
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
AbsoluteMSTR
post Jul 12 2009, 02:41 PM
Post #17


Full Member
***

Group: Beta Testers
Posts: 125
Joined: 5-August 07
Member No.: 27,229



lol really funny.


--------------------
I offer hosting for ghost hosting on a dedicated server. PM for info
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Jack
post Jul 13 2009, 09:35 PM
Post #18


Ultimate spammer.
********

Group: Sr. Members
Posts: 5,593
Joined: 28-January 06
Member No.: 28



I slightly approve after the horrible setup.


--------------------
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Ice.Mage
post Jul 16 2009, 02:44 AM
Post #19


Jr. Member
**

Group: Beta Testers
Posts: 14
Joined: 18-August 08
Member No.: 40,831



I have worked on setups like this before. I have used dbs with it though haven't fully finished with many parts to it but I hate how even with my bots splitting workload between them, stuff still gets pretty delayed at times due to how the queue is different now then how it was in 2.6 Anyways, I am interested into seeing how others do theirs especially because i still haven't finished mine and have plenty of things I want to do with it anyway.


--------------------
Head Admin of DcL
Dota Central League
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
FoxInTheBox
post Aug 4 2009, 07:51 AM
Post #20


Foxxy
***

Group: Members
Posts: 271
Joined: 10-July 09
Member No.: 52,383



Can I use this? i just copy the text and put it in my bots plugin folder?


--------------------
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
AbsoluteMSTR
post Aug 5 2009, 09:30 AM
Post #21


Full Member
***

Group: Beta Testers
Posts: 125
Joined: 5-August 07
Member No.: 27,229



Instructions:

Need MySQL ODBC 5.1
http://dev.mysql.com/downloads/connector/odbc/5.1.html

Need a MySQL Server
Recommend Uniform Server
http://www.uniformserver.com/

Afterwards run the SQL
CODE
CREATE TABLE `queue` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(15) NOT NULL,
  `message` varchar(255) NOT NULL,
  `queued` tinyint(1) NOT NULL DEFAULT '0',
  `sent` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM;


Get the latest QueuePlusPlus Script at
http://fiftytoo.no-ip.com:45000/websvn/fil...euePlusPlus.txt

Put it in your bot, and configure the script.
Copy and paste it for each bot. Note this is for 2.7, not 2.6


--------------------
I offer hosting for ghost hosting on a dedicated server. PM for info
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
FoxInTheBox
post Aug 5 2009, 06:18 PM
Post #22


Foxxy
***

Group: Members
Posts: 271
Joined: 10-July 09
Member No.: 52,383



Ohh thanks anyways


--------------------
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 14th December 2019 - 01:41 AM
Skin by Andrea
Website Legal Information | Hosted by LunarPages