PDA

View Full Version : Pug Plugin



micr0c0sm
11-30-2008, 05:24 AM
Hate to hijack a thread, but I have sent a few PMs and gotten no reply - does anyone know where I could get the .sma for the captains plugin, I want to dissect it to get some work done on a new pugging plugin that people are interested in. Here is a rough outline of how I want it to work:



/************************************************** ***
Captains v0.1 2008
by micr0c0sm

$startpug // internal command
readyrooms everyone
disables jointeamone, jointeamtwo
enables tournament mode
.j[oin] // any player
calls $startpug if it hasn't been
join the players list
.c[aptain] // any player
calls $startpug if it hasn't been
volunteer as captain
when 2 are captain, calls .pick
.p[ick] // captain only
picks random second captain
mapstyle choosing of players
when 12 are chosen, runs $ok
.r[andom] // 5 person vote
autoassigns captains
autoassigns teams
calls $ok
$ok // 5 person vote
if teams are bad, amx_readyroomall
if teams are ok, start 10 minute ready timer
only captains can type ready
.n[ote] something // captain only
assign a note to someone on your team
.n[ote] something // any player
assign a note to yourself
.s[how] // any player
shows all notes
************************************************** ***/

blu.knight
11-30-2008, 07:42 PM
I wrote my own plugin for captains, if you're interested.

It handles the picking stuff, but doesn't have notes.

micr0c0sm
12-01-2008, 02:06 PM
I would love to see someone else's code on this blu.knight!

So far i have join/leave, captain/uncaptain, and auto working, and some of the team choosing. The code is a mess but it works.


/************************************************** ***
Captains v0.1 2008
by micr0c0sm

$startpug // internal command
readyrooms everyone
disables jointeamone, jointeamtwo
enables tournament mode
sends steam community event
.join | .leave // any player
calls $startpug if it hasn't been
joins / leaves the pugger list
.captain | .uncaptain // any player
calls $startpug if it hasn't been
(un)volunteer as captain
when 2 are captain, calls .auto
.auto // any pugger
fills out captains randomly
mapstyle choosing of players
starts 10 minute ready timer
.random // 5 person vote
randoms captains
randoms teams
if teams are bad, amx_readyroomall
runs $startround
$startround
start 10 minute ready timer
only captains can type ready (calls $on_ready)
.note [player] something
assign yourself a note
assign player a note // captain only
.show // any player
shows all notes
$on_ready
on player_leave, enables jointeam[one,two]
on jointeam[one,two], adds player to pug in correct slot
on round_end, disables jointeam[one,two]
switches teams
if any team is missing a player, enables jointeam[one,two]
************************************************** ***/

Pokerface
12-01-2008, 03:05 PM
I've alerted Wyz to this thread.

blu.knight
12-01-2008, 10:42 PM
I would love to see someone else's code on this blu.knight!

So far i have join/leave, captain/uncaptain, and auto working, and some of the team choosing. The code is a mess but it works.

I don't know if I sent this to Wyz way back when, i may have...

If I did, Wyz, could you post it?

Wyzcrak
12-08-2008, 01:25 AM
My apologies for not sharing this sooner. This code is very recent, if not the most recent.

http://pastebin.com/f335277a5

P.S. Look for me (steam://friends/add/76561197960426029) in L4D.