mIRC Home    About    Download    Register    News    Help

Print Thread
#215683 30/09/09 03:44 PM
Joined: Sep 2009
Posts: 2
D
Bowl of petunias
OP Offline
Bowl of petunias
D
Joined: Sep 2009
Posts: 2
OK so here is the deal. I need a bot that is set up to run/monitor a draft. First off I'll say what I mean by draft. I would have a pool of players who add and a set # of teams allowed each with a captain and a co-captain. Once the target # of players and teams has been reached, the bot will lock the player pool and the captains will begin a draft. Order is randomly picked and then they start down the line each adding one player to their team at a time until all rosters are full. Rosters are then locked (to all but ops) and kept by the bot for reference, and the secondary pool is opened to allow for anyone NOT on a team to add up to a certain amount. And I'm not sure if this matters, but it'll be for running on gamesurge.

I know that's a lot, and it get's better. Here's the commands I need.


Commands:

  • !start <players> <teamsize> - starts a draft; If the vars aren't met notifies the user who issued the command of the format to use.
  • !addteam <teamname> - adds the team to the teams list with the name the player sets, and adds the player issuing the command as captain of the team
  • !addco <teamname> - adds the player defined (<nick>) as co-captain of the team. Team must be in teams list, command must be made by the player wishing to be added to the team.
  • !removeteam <teamname> - removes the team from the list, can only be done by an op. Or by a captain of a team, but only if a) there is no co or b) the bot queries the co "<player> has requested that <teamname> be removed. However, you are the co-captain of this team. Do you wish to have the team removed as well? Reply with yes or no." and the co agrees to a removal (yes). IF the co does not agree (replies with no) then the captain is removed from the team and co is promoted to captain.
  • !removeco <nick> <teamname> - removes the co-captain from the team. Team must be in list, command must be made by either an op. The captain of the team, with query to co of team saying: "<player> (name of requesting player) has requested that you be removed as co-captain of <teamname>. Is something you agree to? Please reply with yes or no." If yes, remove co. If no, query requesting player "The player you have requested to remove has expressed that they do not agree with this decision. Your request has been denied." Or the co-captain
  • !add - adds a player to the player pool
  • !remove - removes player; IF player is a captain of a team AND no co-captain is assigned, also removes the team. If there is a co, then he/she is moved to captain of the team. If the player is a co-captain of a team, also removes him/her from the team
  • !addpool - adds a player to the secondary pool. This is only enabled IF the draft has been completed (draft_completed = true). Also need a check here to see if they player is assigned to a team. IF so, query the player "I'm sorry but you are already assigned to <teamname>. If there has been a conflict, or you wish to be removed from your team, you will need to speak with an op."
  • !removepool - remove a player from the secondary pool. This is only enabled IF the draft has been completed (draft_completed = true).
  • !removepool <player> - remove a player from the secondary pool. This is only enabled IF the draft has been completed (draft_completed = true). Only usable by op's.
  • !remove <player> - usable ONLY by op's! removes a player from the player pool. Again if player is a captain of a team AND no co is assigned, also removed the team. If there is a co then he/she is promoted to captain of the team. If the player is a co also removes them from the team.
  • !add <player> <teamname> - usable ONLY by op's. This is only enabled IF the draft has been completed (draft_completed = true). Adds specified player to the specified team ONLY after an op request AND a) the bot query's the team's captain and co-captain "An op has requested that <player> be added to the roster for your team <teamname>. Is this change something you have requested and/or are ok with?? Please reply with yes or no." AND query the player "An op has requested that you be added to the roster for <teamname>. Is this change something you have requested and/or are ok with? Please reply with yes or no." IF anyone says no, query the op "<player> (whoever said no) has indicated that this change is not something they have not requested or are not ok with. Your request has been denied." Also either the captain or co can reply with yes or no. So if co says yes/no first and capt. says no/yes after then ignore the 2nd reply.
  • !remove <player> <teamname> - usable ONLY by op's. This is only enabled IF the draft has been completed (draft_completed = true). Removes specified player from the specified team ONLY after an op requests AND the bot query's the player "An op has issued a command to remove you from <teamname>'s roster. Have you requested this action be taken? Please reply with yes or no." If yes, remove player. If no, query op "The player you specified has stated they do not wish to be removed. Your request has been denied."
  • !addserver <ip> <pw> - usable ONLY by op's!
  • !removeserver <ip> <pw> - usable ONLY by op's!
  • !servers - shows the ip ONLY of all servers that have been added via !addserver
  • !requestserver <teamname> <teamname> - will pick a server from the !server list and send ip/pw to all players on those two teams AND will remove that server from the list of request able servers for 2hours. Only usable by captains or co-captains of a team AND will only happen if a query to the alternate team's captain or co is answered with a yes. That query should be "<player> (name of player who issues the !requestserver cmd.) has requested that a server be reserved for their team of <teamname> (name of requesting player's team) and your team of <teamname>. Meaning you have a match that will take place in the next hour. Is this information correct? Please reply with yes or no."
  • !players <number> - sets/changes the number of players needed before the bot sorts. Usable ONLY by ops.
  • !teamsize <number> - sets/changes the number of teams. Usable ONLY by ops.
  • !pause - allows all commands (e.g. !add, !remove, etc), but keeps the bot from sorting players (so even if the !players value has been met, the bot will not sort until the !unpause command has been used). Usable ONLY by ops. Disabled once the draft has begun (draft_started = true) and once roll call has been successful
  • !unpause - unpauses the bot. Usable ONLY by ops. Disabled once the draft has begun (draft_started = true) and once roll call has been successful
  • !here - used for roll call during the draft. Usable only by a captain or co-captain of the team being called. Roll call will not move on until either the captain or co has used this command.
  • !rosters - shows a list of all the teams and below the rosters for each. This is only enabled IF the draft has been completed (draft_completed = true)
  • !roster <teamname> - just shows the roster for the specified team. This is only enabled IF the draft has been completed (draft_completed = true)
  • !teams - shows a list of the teams
  • !draft <player> - usable only by captain or co-captain and ONLY during the draft.
  • !commands - prints a list of available commands. Should change depending on if they are an op, capt. or co, or generic user.


NOW some special things:

  • I need this to be a standalone bot so that I can use it with a shell provider.
  • the !players var must be a number divisible by the !teamsize var. IF an op attempts to change the !players var, and it is not, then query the requesting player "I'm sorry, but that number does not work with the current team size of <teamsize>. Please use a player number that is divisible by <teamsize>, or change the teamsize."
  • when an op changes the !teamsize, and IF it doesn't work with the !players var (i.e. they don't divide into a whole number), they will need to be queried with "You have successfully changed the team size. However, the current player size of <players var> produces a value of (<players> divided by <teamsize>) which is NOT A WHOLE NUMBER. Please change the players size using the !players command.
  • the !addteam <teamname> cmd. must only be usable if the number of captains/teams is less than the !teamsize var. IF the number of captians/teams is equal to the var, then query the requesting player "I'm sorry, but there the team size limit has been reached. If you wish to add another team, you will need to speak with an admin and request that the limits be raised."
  • the captains and co-captains of a team are automatically added as players in the pool (so they count toward the !players var). And once the draft starts, they are taken out of the list.
  • If the !players var is filled, but the !teamsize var is not, then the bot should notice the channel that a team or teams must be made before the draft can be started. IF after 8 hours (with a count down of notices every 30min) the !teamsize var has still not been met, the bot should take 2 random players and make them captain and co-captain of a generated team with the name "generatedx" where x is a sequential number starting at one. That way if there are multiple teams need, the bot can generate team 1,2,3, etc.
  • will need a var for 'rostersize' which will be <players> divided by <teamsize>. This must be a whole number. And cannot be changed manually.
  • once the player pool and team size has been filled, all ops, captains, and co-captains should be queried "The draft has filled and will begin in 24 hours." And once more at 1hour "1 Hour until the draft begins!"
  • If !pause has been used, the draft will not start until an op uses the !unpause command.
  • Once the draft begins, the bot needs to go into a roll call mode. In this mode, it will start with the first team and move down the list verifying that at least one of the captains is present (either capt. or co). Noticing the channel should be: "Starting roll call - when your team is called please state you are here by using the command !here." and then "<teamname> - <player> (captain) or <player> (co) please type the command !here." IF someone else does it, then ignore them. If they do not respond after 5min notice the channel and repeat the above line until the do. If after 2 attempts, no one from the team is present. Then the draft is !paused and all admins are queried "<teamname> is not present at the draft. The draft has been paused, you will need find <player> or <player> and !unpause the draft once they are present, or the draft will not continue."
  • during the draft, the bot will print a list of all the players in the pool in the channel with a msg of "The available players are: <insert list>. Please use the !draft <player> command to add a player to your roster. <teamname>, it is currently your pick." Each player is then removed as a capt. or co adds them with the !draft <player> cmd.
  • I would like for the topic to update automatically by on this too. The topic should look like this "Welcome to <channel>. The Draft is currently: Active/Inactive (if Inactive stop here). (If active)Players: x / y (x = total added / y = !players var) Teams: x / y (same as players). To join the pool use !add or (only if !teamsize has not been met) start a team with !addteam <teamname>. Or !commands for a list of commands you may use.
  • And finally, and I don't even know if this is possible, I would like for the client to not have to be present in the channel to stay on the list. Like to add yeah, they gotta be, but if they time out...I would like for them to not have to re-add.


I know this is a big thing, and I'm sorry if I come off as arrogant or anything b/c of they way I said things or whatever. I'm just very particular and have a very finite sense of what I want/need. Also I would do this all myself if I could...but I have absolutely no knowledge of mIRC scripting and have no clue where to even begin.

Thanks in advance,
Satan

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
No offense, but if you expect someone to write the entire thing for you, it probably won't happen-- certainly not for free.

I understand people in this forum usually are more open to writing code, but the requests are never of this ridiculous magnitude. So let's be clear: if you have no intention of learning any scripting, you're in the wrong place.

If you *are* interested in learning, you can start by typing /help ON TEXT in mIRC to learn about ON TEXT events and how to use them.

I'm sure someone can provide a few example snippets to get you started, but to think you would come here and attempt to recruit people to do a ton of work for you with zero reward is insulting. Admitting your arrogance is hardly a justification.



- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
In addition to the reply you have already received, I refer you to New to the forums ?? where it includes
Quote:
e) Realize YOU have to do work to solve the problem you are having. People here can offer ideas/suggestions/input and maybe even solve things entirely, but it's up to YOU to do the work.


Joined: Aug 2006
Posts: 183
T
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2006
Posts: 183
Check out www.rentacoder.com if this is something you want done for you. I won't rehash what's already been said, except to say that the people ate that site will do exactly what you want, but it'll cost you some cash.

If you're willing to learn, you can DO all of what you want to do. It won't even be terribly hard. It's just a LOT of code.

Last edited by Thrull; 01/10/09 12:51 AM.

Yar
Joined: Sep 2009
Posts: 2
D
Bowl of petunias
OP Offline
Bowl of petunias
D
Joined: Sep 2009
Posts: 2
Well firstly, I didn't come here it insult someone or to be an ass, I just don't know how these things work (obviously), or that simply requesting that someone help me would end up being taken so negatively. However, I'm not planning on paying someone to do this for me...

I am very willing to learn, but as I said, I have no clue where to start. If you could provide me with some relevant snippets, and just a quick explanation of what they do, I can go from there. I'll probably end up posting a lot of stuff I need help with, but I'm completely willing to work on this on my own.

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
I'll do it for $500.

Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Quote:
I am very willing to learn, but as I said, I have no clue where to start

Quote:
If you *are* interested in learning, you can start by typing /help ON TEXT in mIRC to learn about ON TEXT events and how to use them.

In addition, there's a lot of irc channels where a lot of people can help you, where you can ask for some exemples.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jul 2008
Posts: 236
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Jul 2008
Posts: 236
In addition to argv0's initial response, read these in this order:
/help aliases
/help variables
/help if then else
/help while loops
/help events (and select remote)

some other things you might need:
/help hash tables
/help $eval
/help $read
/help /timer

Please understand, many of us get this sort of request on a regular basis. If we were going to spend days writing a script for someone, we'd do it for someone we chat to often enough to have established a platonic e-rapport with (and many of them already know how to script). Since we get alot of these requests, as a result, we probably wouldn't be here to tell you (and others like you) where to start learning.

Last edited by s00p; 11/10/09 03:43 PM.

Link Copied to Clipboard