Ns Dev Team Looking For A New Coder

CabooseCaboose title = name(self, handle) Join Date: 2003-02-15 Member: 13597Members, Constellation
<div class="IPBDescription">Post your code to help!!!</div> Ok, this is how the comm figures out he needs shirtguns...

<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->#include <iostream.h>
#include <cornmander.h> //will cause errors
#include <nub.h>  //more errors

int main() //main, WOW!
{
 int shirtgun; //defines number of shirtguns
 int lork;  //defines number of lorks
 shirtgun=random(15) //random number of shirtguns up to 15
 lork=random(16)  //random number of lorks up to 16
 cout<<shirtgun/n //display number of shirtguns
 cout<<lork/n  //display number of lorks

 if(shirtgun<lork) //if more lorks than shirtguns, OMG panic!!!
   {
     cout<<"There's a lork on the clorf!!! Give me a shirtgun!!!";
   }
   else //or else look for terrorists
   {
     cout<"OMG!!! terrorists!!! Fetch the AWP's!!!";
   }
 return 0;
}
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

Post some code of your own to help out the NS dev team!!!

[notice]JOKE[/notice]

Comments

  • GwahirGwahir Join Date: 2002-04-24 Member: 513Members, Constellation
    you are a sad, sad man
  • Marik_SteeleMarik_Steele To rule in hell... Join Date: 2002-11-20 Member: 9466Members
    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    //assorted code, including variable 'm' of type Mood
    protected void moderator(Thread tBeingRead)
    {
       if (tBeingRead.isSpam()) m.worsen();
       this.lock(tBeingRead);
    }
    <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

    See if you can spot the logic error <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
  • davidsansomedavidsansome Join Date: 2003-02-07 Member: 13228Members, Constellation
    I want to inherit Marik_Steele
  • GwahirGwahir Join Date: 2002-04-24 Member: 513Members, Constellation
    it locks whether it's spam or not.
  • esunaesuna Rock Bottom Join Date: 2003-04-03 Member: 15175Members, Constellation
    edited April 2004
    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->#include <iostream.h>
    #include <onos.h>
    #include <marine.h>
    #include <class_player.h>

    int main()
    {
     int iTime; // Round time in seconds
     int iOnos; // Onos count

     PLAYER marien;
     PLAYER commando;

     if (iTime <= 300 && iOnos >= 1)
     {
       cout << "OHNOES ONOS!! F4! F4!\n\n";
       marien.f4();
     }
     else if (iTime > 300 && iOnos >= 1)
     {
       cout << "OMGZ COMMANDO DROP HGM'S!!1\n\n";
       commando.dropweps(HMG, 2);
     }
     else
     {
       cout << "NUB COMMANDO!!11\n\n";
       marien.voteeject();
     }
     return 0;
    }<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
  • FamFam Diaper-Wearing Dog On A Ball Join Date: 2002-02-17 Member: 222Members, NS1 Playtester, Contributor
    <!--QuoteBegin-Gwahir+Apr 21 2004, 06:02 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Gwahir @ Apr 21 2004, 06:02 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> it locks whether it's spam or not. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    Perfect!
  • Nemesis_ZeroNemesis_Zero Old European Join Date: 2002-01-25 Member: 75Members, Retired Developer, NS1 Playtester, Constellation
    Was about to say - how's that a logic error?
  • DY357LXDY357LX Playing since day 1. Still can&#39;t Comm. England Join Date: 2002-10-27 Member: 1651Members, Constellation
    <!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->
    if(shirtgun<lork) //if more lorks than shirtguns, OMG panic!!!<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->


    Haha, nice.
  • BlackMageBlackMage [citation needed] Join Date: 2003-06-18 Member: 17474Members, Constellation
    edited April 2004
    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    #include <iostream.h>
    #include <class_player.h>
    #include <team1.h>
    #include <team2.h>

    void main()
    {
    int game_over = 0;
    int time = 0;
    while (game_over != 1) // loop until game over
    {
     if (team2.onos >= (.49 * team2.player.num))
     {
      team1.panic(f4); // onos, panic
      game_over = 1; // end game
     }
     else if (team2.fade > 1)
     {
      team1.drop(shirtgun, (2 * team2.fade.num)); //shotguns
     }
     else if (team2.lork > 1)
     {
      team1.getupgrade(1); // get weapons
     }
     if (time > 100)
     {
      team1.getupgrade(0); // get armor
     }
     time++;
    }
    }
    <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
  • NecroticNecrotic Big Girl&#39;s Blouse Join Date: 2002-01-25 Member: 53Members, NS1 Playtester
    I wish I was enough of a geek to know what you're all gabbling on about ;p
  • CyndaneCyndane Join Date: 2003-11-15 Member: 22913Members
    I am glad I did take at least one C++ programming class so I can understand some of it, especially since its a joke hehe
  • MonkfishMonkfish Sonic-boom-inducing buttcheeks of terrifying speed&#33; Join Date: 2003-06-03 Member: 16972Members
    <!--QuoteBegin-Necrotic+Apr 21 2004, 06:40 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Necrotic @ Apr 21 2004, 06:40 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> I wish I was enough of a geek to know what you're all gabbling on about ;p <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    You and me both mate <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
  • BlackMageBlackMage [citation needed] Join Date: 2003-06-18 Member: 17474Members, Constellation
    edited April 2004
    <!--QuoteBegin-sonic+Apr 21 2004, 01:45 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (sonic @ Apr 21 2004, 01:45 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--><!--QuoteBegin-Necrotic+Apr 21 2004, 06:40 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Necrotic @ Apr 21 2004, 06:40 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> I wish I was enough of a geek to know what you're all gabbling on about ;p <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    You and me both mate <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo--><!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    c reads like english .. sorta

    cout means "print"
    cin means "input"
    == checks for equality
    != checks for inequality
    >, <, <=, >= check for relative values
    = assigns a value


    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->team1.drop(shirtgun, (2 * team2.fade.num));<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
    for team one, drop something
    drop shotguns
    drop twice as many shotguns as team2's fades

    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->include #<something.h><!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
    ignore these

    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->int/void main();<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
    program starts here

    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->int time = 0;<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
    new variable time (integer), assign it a 0 to start

    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->time++;<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
    add one to time
    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    while (game_over != 1) // loop until game over
    {
    [stuff]
    }<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
    keep going over the stuff inside the braces until the statement is false
    (that means, loop until game_over is not not equal to 1, or when game_over is 1. ie: when the game ends)

    edit: sonic, the ][ in your name messes up the [quote] tags ^^
  • DOOManiacDOOManiac Worst. Critic. Ever. Join Date: 2002-04-17 Member: 462Members, NS1 Playtester
    It's been awhile since I've messed w/ the HL SDK, but I'll try my best. ;)

    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    void NSPLayer::Think(*p)
    {
     for(;;;)
     {
        if(rand() > .5)
           p->message = pPlayer->AskForGL();
        else
           p->message = pPlayer->AskForHA();
     }
    }
    <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
  • Har_Har_the_PirateHar_Har_the_Pirate Join Date: 2003-08-10 Member: 19388Members, Constellation
    ummmm i got this

    0|\/|F6 I35 |\/|4|} 1337 |-|4xZ0R
  • RobRob Unknown Enemy Join Date: 2002-01-24 Member: 25Members, NS1 Playtester
  • MonkfishMonkfish Sonic-boom-inducing buttcheeks of terrifying speed&#33; Join Date: 2003-06-03 Member: 16972Members
    BM , i lost you on the word "english" <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
  • RedWingateRedWingate Join Date: 2004-03-15 Member: 27349Members, Constellation
    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    void main() {
       clients.set( PING , ( clients.get( PING ) * 2 ) ); // remove fade-blink-bug

       for (;;; ) {
           if ( client.action == FIRE_SHOTGUN ) {
               kill ( clients.getClients( NOT_ON_TEAM , client.get( TEAM ) ) ); // remove shotgun-bug
           }
       }
    }
    <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

    Just sticked with some bugfixing :-)
  • Sniper_ChanceSniper_Chance Join Date: 2002-12-11 Member: 10549Members
    edited April 2004
    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->void CBasePlayer::Spawn(void)
    {
       pev->classname = MAKE_STRING("player");
       pev->health = 100;
       pev->armorvalue = 0;
       ...
       if( FBitSet(pev->flags, FL_NUB))
           pev->netname = MAKE_STRING("NSPlayer");
       ...
       if( pev->iuser3 == 6) // Fade
           pev->flags |= FL_GODMODE;
    }<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

    I figured out the iuser3 thing by messing around with metamod last year.
  • sawcesawce Join Date: 2002-12-14 Member: 10787Members
    It would be 'pev->netname = MAKE_STRING("NSPlayer");'.

    <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
  • CabooseCaboose title = name(self, handle) Join Date: 2003-02-15 Member: 13597Members, Constellation
    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    #include <iostream.h>
    #include <nub.h>

    struct resho
    {
     char name;
     int class;
     float res;
    };
    int main()
    {
     resho nub;
     nub.name="NSPlayer";
     nub.class=1; //Class is skulk
     nub.res=75;
     
     int resTowers;
       if(resTowers<=1 AND nub.name="NSPlayer" AND nub.class=1)
         {
           cout<<"NUB!!!";
           nub.class=1 //Changes from Onos to skulk. mwahahahaha
         }
         else
         {
           cout<<"Build a hive nub!!!";
         }
     return 0;
    }
    <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
  • SoulSkorpionSoulSkorpion Join Date: 2002-04-12 Member: 423Members
    edited April 2004
    Doomeh wins! <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo-->

    ...but I'll add something to it

    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    //csnub.cpp
    #include "nsplayer.h"
    #include "whine.h"
    #include "random.h"

    class CSNub:public NSPlayer
    {
    public:
    ?void Think(*p); //it is pev, isn't it?

    private:
    ?void OMG(WHINE msg);
    };

    void CSNub::Think(*p)
    {
    ?OMG(randInt(WALLHAX, WHEREBOMBSITE));
    }
    <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    //whine.h
    #ifndef WHINE_H
    #define WHINE_H
    enum WHINE
    {
    ?WALLHAX,
    ?AIMBOT,
    ?NEEDGUNZ,
    ?NEEDAWP,
    ?WHEREBOMBSITE,
    };
    #endif //WHINE_H
    <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
    ?
    ...

    <!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->cout<<shirtgun/n<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    Nice. Trying to use a control character outside a string? <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->

    Just thought of something <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->.
    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->class Meek:public Earth
    {
    //...
    };<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
  • CabooseCaboose title = name(self, handle) Join Date: 2003-02-15 Member: 13597Members, Constellation
    <!--QuoteBegin-SoulSkorpion+Apr 21 2004, 09:13 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (SoulSkorpion @ Apr 21 2004, 09:13 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Nice. Trying to use a control character outside a string? <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
    <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    Meh, I'm a n00b... <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo-->
  • moultanomoultano Creator of ns_shiva. Join Date: 2002-12-14 Member: 10806Members, NS1 Playtester, Contributor, Constellation, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Gold, NS2 Community Developer, Pistachionauts
    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    ...
    while (exists(babbler)){
       fork();
    }
    ...
    <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
Sign In or Register to comment.