To start a new discussion, join us on Discord. The DontCamp.com read-only forum archives are below.

DontCamp.com
No, but really, you should join us on Discord.

DontCamp Code
Goto page 1, 2, 3  Next
 
   DontCamp.com Forum Index -> Community Discussion and News
View previous topic :: View next topic  
Author Message
Butter
CH Administrator


Joined: 18 Apr 2004
Posts: 7520
Location: New York, NY

PostPosted: Sun Jul 10, 2005 3:08 pm    Post subject: DontCamp Code

We've just added a new section to our website called DontCamp Code. You can see it on our frontpage menu right now.

This section will provide the public with the basic classes we use to do our various admin tasks here at DontCamp.com. These classes are live, in that as we edit and update them you'll see the changes right away on the code pages.

Enjoy!
_________________
EDT sucks.


Last edited by Butter on Fri Jan 02, 2015 7:18 pm; edited 2 times in total
Blue
Forum Veteran


Joined: 12 Jun 2004
Posts: 1643

PostPosted: Sun Jul 10, 2005 5:15 pm    Post subject:

Aw you guys are so nice Very Happy
Butter
CH Administrator


Joined: 18 Apr 2004
Posts: 7520
Location: New York, NY

PostPosted: Thu Aug 04, 2005 2:06 pm    Post subject:

Until we get our new BF2 python code all setup in DontCamp Code, dst and I are posting most of our stuff here. At the time of this posting we have scripts that:

1. Randomize map selection and dynamically choose an appropriate map size.

2. Dynamically adjust the teamratios to be inversely proportional to the tickets of each team with the specific intention of putting new players on the losing team regardless of team balance.

3. Provide an in-game chat based admin system a la BFSM.
_________________
EDT sucks.
+DNC+ Bongsquad
Active Forum User


Joined: 13 Jul 2004
Posts: 119

PostPosted: Thu Aug 04, 2005 2:54 pm    Post subject:

That is pretty cool of you guys to share the code.
Kapak
Old Fogies


Joined: 05 Jul 2004
Posts: 3288
Location: Quebec, Canada

PostPosted: Thu Aug 04, 2005 5:21 pm    Post subject:

Quote:
Thanks to the guy that was willing to sell me a T40 ThinkPad on eBay for that insanely low price!


Oh ya? How much?
_________________

you dont know the power of this button
Pneumatic[SWE]
Forum Veteran


Joined: 29 May 2004
Posts: 599
Location: Sweden

PostPosted: Thu Aug 04, 2005 6:51 pm    Post subject:

50 bucks, but since it was stolen it was all profit for the guy who sold it. Wink

On a serious note though, I think it's pretty cool what you do. Did any of you have any programming experience before you started this place, or have you taken classes or read books or something?
_________________
Asked about his gauntlets-to-gargoyles style, Lars responds, "LARS HAS A REPUTATION OF STRENGTH OF WHICH HE NEEDS TO BE DOING THE UPHOLDING!"
Butter
CH Administrator


Joined: 18 Apr 2004
Posts: 7520
Location: New York, NY

PostPosted: Thu Aug 04, 2005 10:44 pm    Post subject:

I knew next to nothing before needing to write DCLP. I've learned almost everything from books but I've got a several friends that know how to code as well.
_________________
EDT sucks.
DogShxtTaco
CH Administrator


Joined: 19 Apr 2004
Posts: 8201
Location: Cary, NC

PostPosted: Thu Aug 04, 2005 11:22 pm    Post subject:

http://www.oreilly.com/
Butter
CH Administrator


Joined: 18 Apr 2004
Posts: 7520
Location: New York, NY

PostPosted: Thu Aug 04, 2005 11:25 pm    Post subject:

Thanks to pear.php.net we've now got highlighted python code up in the Code section. I love PEAR!!!
_________________
EDT sucks.
Crazy Taxi
Forum Veteran


Joined: 20 Feb 2005
Posts: 789
Location: Wilmington, NC

PostPosted: Sun Aug 07, 2005 1:49 am    Post subject:

Never thought I'd get my daily T & A at dontcamp.
Butter
CH Administrator


Joined: 18 Apr 2004
Posts: 7520
Location: New York, NY

PostPosted: Mon Aug 08, 2005 1:00 am    Post subject:

Just added the TeamSpeak monitor code.
_________________
EDT sucks.
GForce®
Helpful Forum User


Joined: 08 Aug 2005
Posts: 21

PostPosted: Mon Aug 08, 2005 9:47 am    Post subject:

Any chance on getting a code snippet for the "sayNextMap" phthon function that you refrence in your dc_ass.py script? I am new to Python and am having trouble figuring that out.

PS: The script rocks!!!
_________________
GForce®
Butter
CH Administrator


Joined: 18 Apr 2004
Posts: 7520
Location: New York, NY

PostPosted: Mon Aug 08, 2005 10:41 am    Post subject:

I'm glad you like it! Do you have it running already on a server? If so, how is that working out?

We actually haven't yet written a sayNextMap function to use as a dc_ass extension. We likely will however, and I wouldn't be surprised if dst could spit the function right out of his head.
_________________
EDT sucks.
GForce®
Helpful Forum User


Joined: 08 Aug 2005
Posts: 21

PostPosted: Mon Aug 08, 2005 10:58 am    Post subject:

I am running the script on our server and it works great!!! Many thanks! I am all over this new Python interface for BF2. We also have a BF1942 server which I had to write and entire VB app to admin it from in-game chat. This inerface is much nicer and has huge potential.
_________________
GForce®
GForce®
Helpful Forum User


Joined: 08 Aug 2005
Posts: 21

PostPosted: Mon Aug 08, 2005 11:10 am    Post subject:

Oh yeah, my BF1942 admin app has some cool commands that I will most likely be trying to mimic for the BF2 server.

One command that I will be working on right away is a "Kick on next TK". So when you issue the command it puts the offender in a list and kicks him on his next tk.

Another command will be "Switch teams or be kicked" countdown. When this command is issued the player is added to a list and a message flashes on the screen every second... "Player X, switch teams or be kicked in 10 seconds" ... "9 seconds" ... "8 seconds", etc. The script will need to check and see if the player has switched and if he doesn't then he is kicked after 10 secs. If he does switch then he is removed from the list and the coundown is aborted. We got this command working on our BF1942 server and it works great! I think it is much better the autobalance because I personally hate being switched automatically. This method lets you control who you want to switch.

It would also be cool to have a manual abort command for both of the examples above incase the admin changes his mind or uses the incorrect player number.

Just some ideas for the script and I would be glad to help figure out the code.
_________________
GForce®
Butter
CH Administrator


Joined: 18 Apr 2004
Posts: 7520
Location: New York, NY

PostPosted: Mon Aug 08, 2005 11:22 am    Post subject:

That's pretty fancy! Clearly I need a place for people to post cool extensions for dc_ass! dst has written some pretty cool extensions already.
_________________
EDT sucks.
GForce®
Helpful Forum User


Joined: 08 Aug 2005
Posts: 21

PostPosted: Mon Aug 08, 2005 12:44 pm    Post subject:

That would be cool! I'd love to see some of his code!
_________________
GForce®
Austin007
Old Fogies


Joined: 12 Aug 2004
Posts: 2606
Location: Ontario

PostPosted: Mon Aug 08, 2005 1:29 pm    Post subject:

Kick on next TK sounds pretty risky considering the ease with which TKs are had with arty and the vehicles in this game. Neat ideas tho Gforce.
_________________
GForce®
Helpful Forum User


Joined: 08 Aug 2005
Posts: 21

PostPosted: Mon Aug 08, 2005 1:43 pm    Post subject:

Austin007,

Thats the beauty of being able to issue a command. As an admin you can judge if someone is being a tard.. like if you got some guy with like a -10 score.
_________________
GForce®
drew
Forum Veteran


Joined: 05 Sep 2004
Posts: 499
Location: Raleigh, NC

PostPosted: Mon Aug 08, 2005 5:22 pm    Post subject:

How do you show the code like you do in that window?