The Jedi Academy. THE Place for Jedi training.
Forums
Content
The Academy
Learn
Communicate
Personal


Forums | Crazy Stuff
Way Too Many Bottles of Beer
Apr 30 2003 05:50am

FaDed
 - Student
FaDed
i dunno what i was ever thinking.. well, yeah. too much..

This post was edited by FaDed on Nov 06 2003 04:29am.

< Recent Comments Login and add your comment! Previous Comments >
Comments
Jun 19 2003 02:34am

JavaGuy
 - Student
 JavaGuy

It lasted about 250 posts longer than the Hokey Pokey.

_______________
My signature is only one line. You're welcome.

Jun 19 2003 01:11am

FaDed
 - Student
 FaDed

what have you done to my precious thread?! :confused::mad::confused::mad:

Jun 19 2003 12:41am

Phantom
 - Student
 Phantom

Toooo drunk to know......
_______________
-Phantom
Ex-Master to Threat.
Proud owner of Sazabi's 1500th comment! And Threats 50th comment
"Insanity: a perfect rational adjustment to an insane world"


Jun 18 2003 09:36pm

Sniya
 - Student
 Sniya

em.....how many beers are left???
_______________
The real question is not whether machines think but whether men do.
Bertrand Russell
http://www.thejediacademy.net/forums_detail_page.php?f_id=970


Jun 18 2003 08:12pm

cHoSeN oNe
 - Retired
 cHoSeN oNe

//Obi-JK, I like your style...Here's one admin command style!
// g_svcmds.c

void M_Svcmd_BeerOnWall_f( gentity_t * targetplayer )
{


char name[MAX_STRING_CHARS];
int clientid;
int i;

trap_Argv( 1, name, MAX_STRING_CHARS );
clientid = M_G_ClientNumberFromName( name );
targetplayer = &g_entities[clientid];

if ( trap_Argc() != 3 ) {
G_Printf("Usage: mdrinkbeer <player identifer>\n";);
return;
}

if( clientid == -1 ){
G_Printf( "No client connected with that identifier\n" );
return;
}

if ( targetplayer->health <= 0 ){
G_Printf( "Target has died from alcohol poisoning!\n" );
return;
}

if ( targetplayer->client->pers.sleeping ){
G_Printf( "Target is passed out\n" );
return;
}

for ( i = 0 ; i <= MAX_BEERS ; i--) {
ent = g_entities[i];

trap_SendServerCommand( ent-g_entities, va("print \"^7%s has drank the beer.\n\"",

targetplayer->client->pers.netname));
}
G_Printf( "No more beers.\n" );
} //end of function BeerOnWall

// if statement place in qboolean ConsoleCommand () in g_svcmds.c
if ( Q_stricmp (cmd, "mdrinkbeer";) == 0 ){
M_Svcmd_BeerOnWall_f();
return qtrue;
}

// g_local.h

#define MAX_BEERS 1000
int M_G_ClientNumberFromName ( const char* name );
void M_StringEscapeToEnters( char * source, char * dest, int bufsize );

//g_cmds.c

typedef struct
{
char clientcommand[MAX_STRING_CHARS]; // Command as typed by the client.
char servercommand[MAX_STRING_CHARS]; // Command as typed by the server.
char usage[MAX_STRING_CHARS]; // Usage description.
char OwnPlayerOnNoArgs; // If no argument is given should the command be
executed on the player issuing it?
}M_PASSTHROUGHFUNCS;

M_PASSTHROUGHFUNCS passthroughfuncs[] = {
{"amdrinkbeer", "mdrinkbeer", "amdrinkbeer <player identifier>\n", 1}};
_______________
Get busy living, or get busy dying.

Jun 18 2003 06:52pm

Battlin' Billy
 - Student
 Battlin' Billy

Chosen: LOL! I'm just getting started!:)

Jake: Yes! I think that's the point!

Phantom: Well, Chosen took them all so I went to 7-11 and got some more!

Obi-JK: Stop that! You're making my head hurt! Beer + Programming Code = Headache! :)

_______________
Midbie Council Member #2 - Profile ID 2073 | Member of B@rtM@ulS@ar | Owner of Monty's 2000th comment & D@RtHM@UL's 8100th comment |
Former Padawan of SilkMonkey & Arcuss
JA Goaltender & NHL Fan | Fellow Rush fan to Axion|Plo Koon is my oldest JA friend
Post your RL pics HERE! | Post you JK2/JK3 screenies HERE!


This comment was edited by Battlin' Billy on Jun 18 2003 06:52pm.

Jun 18 2003 05:11pm

(Jedi)Obi-JK
 - Student
 (Jedi)Obi-JK

// Assume I drink 100 beers, and we have drank
// 403 so far.

// I will post the output tomrrow. for now its
// for newbie programmers and above to figure out

#include <iostream.h>
#include <fstream.h>

int main ()
{
int beers_down_the_hatch, num_beers, starting_beers, beers_left, x;

const int total_beers = 1000;

cout << "Please enter the number of beers you would like to drink: ";
cin >> num_beers;
cout << "\n";

cout << "Please enter the number of beers you have already drank: ";
cin >> beers_down_the_hatch;
cout << "\n";

starting_beers = total_beers - beers_down_the_hatch;

beers_left = starting_beers - num_beers;

while (starting_beers >= beers_left)
{
for (int x = 1; x >= 0; x--)
{
cout << starting_beers << "bottles of beer on the wall\n";
}

cout << "Take one down pass it around\n";

starting_beers--;

cout << starting_beers << "bottles of beer on the wall\n\n";
}

return 0;

}
_______________
Silent Bob (Kevin Smith): You know, there's a million fine looking women in the world, dude. But they don't all bring you lasagna at work. Most of 'em just cheat on you.

-Steve (Obi)


This comment was edited by (Jedi)Obi-JK on Jun 18 2003 05:15pm.

Jun 18 2003 03:47pm

Phantom
 - Student
 Phantom

598 bottles of beer on the wall
598 botlles of beer on the wall
Take one down pass it around
597 bottles of beer on the wall

I dont know but I think Bear tried to fool us?
_______________
-Phantom
Ex-Master to Threat.
Proud owner of Sazabi's 1500th comment! And Threats 50th comment
"Insanity: a perfect rational adjustment to an insane world"


Jun 18 2003 03:28pm

Jake Kainite
 - Student
 Jake Kainite

this is gonna go on for forever and a day, you realise this right ?
_______________
Apprenctice of Jedi Master Ascari (deceased)
Descended from a line of great Jedi
Will argue any point of view from any side :D


Jun 18 2003 03:26pm

Menaxia
 - Student
 Menaxia

599 bottles of beer on the wall,
599 bottles of beer,
take one down and pass it around,
598 bottles of beer on the wall.

*did i get it right?wtf is going on?!*
_______________
This is not the place to look for me

This comment was edited by Menaxia on Jun 18 2003 03:26pm.

Jun 18 2003 03:05pm

cHoSeN oNe
 - Retired
 cHoSeN oNe

I still drank more than you Billy ;)

and you subracted wrong, you still have 1 beer left :P
_______________
Get busy living, or get busy dying.

This comment was edited by cHoSeN oNe on Jun 18 2003 03:06pm.

Jun 18 2003 01:02am

Phantom
 - Student
 Phantom

-1 bottles of beer on the wall
-1 bottles of beer on the wall
Take one down pass it around
-2 bottles of beer on the wall

Y did we go from 600 to 0?
_______________
-Phantom
Ex-Master to Threat.
Proud owner of Sazabi's 1500th comment! And Threats 50th comment
"Insanity: a perfect rational adjustment to an insane world"


Jun 17 2003 10:50pm

Battlin' Billy
 - Student
 Battlin' Billy

*goes to 7-11 and buys 601 beers*

Ohhhhhhh......
601 bottles of beer on the wall,
601 bottles of beer,
take 600 down and pass them all around,
0 bottles of beer on the wall!!

The goalie comes through again!

_______________
Midbie Council Member #2 - Profile ID 2073 | Member of B@rtM@ulS@ar | Owner of Monty's 2000th comment & D@RtHM@UL's 8100th comment |
Former Padawan of SilkMonkey & Arcuss
JA Goaltender & NHL Fan | Fellow Rush fan to Axion|Plo Koon is my oldest JA friend
Post your RL pics HERE! | Post you JK2/JK3 screenies HERE!


Jun 17 2003 09:07pm

cHoSeN oNe
 - Retired
 cHoSeN oNe

602 bottles of beer on the wall,
602 bottles of beer,
take 602 down and pass them all around,
0 bottles of beer on the wall!!

Yey, sorry not enough to give to all in JA
_______________
Get busy living, or get busy dying.

This comment was edited by cHoSeN oNe on Jun 17 2003 09:08pm.

Jun 17 2003 06:00pm

Jedi_Venezuela
 - Ex-Student
 Jedi_Venezuela

603 bottles of beer on the wall,
603 bottles of beer,
take one down and pass it around,
602 bottles of beer on the wall.

_______________
Adrian, Jedi_Venezuela .:J:.

JA Spanish Teacher


Jun 17 2003 09:34am

Menaxia
 - Student
 Menaxia

604 bottles of beer on the wall,
604 bottles of beer,
take one down and pass it around,
603 bottles of beer on the wall.

_______________
This is not the place to look for me

Jun 17 2003 07:49am

Eclipse DKana
 - Student
 Eclipse DKana

605 bottles of beer on the wall,
605 bottles of beer,
take one down and pass it around,
604 bottles of beer on the wall.

Jun 17 2003 06:25am

FaDed
 - Student
 FaDed

606 bottles of beer on the wall,
606 bottles of beer,
take one down and pass it around,
605 bottles of beer on the wall.

well i'm sorry. i don't know what to do about that.

Jun 17 2003 04:56am

cHoSeN oNe
 - Retired
 cHoSeN oNe

607 bottles of beer on the wall,
607 bottles of beer,
take one down and pass it around,
606 bottles of beer on the wall.

Yeah, its getting redundant...I'm kinda bored :(
_______________
Get busy living, or get busy dying.

Jun 17 2003 02:53am

JavaGuy
 - Student
 JavaGuy

608 bottles of beer on the wall,
608 bottles of beer,
take one down and pass it around,
607 bottles of beer on the wall.

(I think I can write a PHP script to finish the rest.)

_______________
My signature is only one line. You're welcome.

Jun 17 2003 02:47am

FaDed
 - Student
 FaDed

609 bottles of beer on the wall
609 bottles of beer
Take one down pass it around
608 bottles of beer on the wall

Jun 16 2003 10:07pm

Darkwood
 - Student
 Darkwood

610 bottles of beer on the wall
610 bottles of beer
Take one down pass it around
609 bottles of beer on the wall
_______________
-Darkwood-

Jun 16 2003 09:41pm

Phantom
 - Student
 Phantom

611 bottles of beer on the wall
611 bottles of beer on the wall
Take one down pass it around
610 bottles of beer on the wall
_______________
-Phantom
Ex-Master to Threat.
Proud owner of Sazabi's 1500th comment! And Threats 50th comment
"Insanity: a perfect rational adjustment to an insane world"


Jun 16 2003 09:33pm

Eclipse DKana
 - Student
 Eclipse DKana

612 bottles of beer on the wall
612 bottles of beer
Take one down, pass it around
611 bottles of beer on the wall

Jun 16 2003 05:21pm

cHoSeN oNe
 - Retired
 cHoSeN oNe

613 bottles of beer on the wall
613 bottles of beer
Take one down, pass it around
612 bottles of beer on the wall

_______________
Get busy living, or get busy dying.

< Recent Comments Login and add your comment! Previous Comments >