The lol script?

Discussions about Coding and Scripting
Post Reply
Myth
Inhuman
Posts: 988
Joined: Tue Feb 12, 2008 5:57 pm
Personal rank: Low Poly Freak

The lol script?

Post by Myth »

yes yes, the topic is quite dumb, but why not?
Post a cute, special, nice, extremely dumb, cute piece of code. Thing that you come over in your project or on other internet forums.
Well any language. Preferably those that can be read, I don't want binary here.
So any high level language/pseudo code/widely known language is fine.

So gere we go:

Code: Select all

// a nice, fair random number generator

int randomx(int x) 
 {
 int y;
 while y != 42
    y=random(1000*x);        
 return (y);
 }
User avatar
Creavion
Godlike
Posts: 4497
Joined: Sun Feb 17, 2008 7:23 pm
Personal rank: About to be non-act.
Location: Germany, Lower Saxony

Re: The lol script?

Post by Creavion »

Whats your problem you master of disaster? :roll:
About to be non-active
My very last UT map project: CTF-FacePalm (tropical CTF-Face remake)
Why do I leave? click here
What I want to do next: Joining an UDK team (uncertain however) and improve 3D modelling and texture editing skills
Thanks to those who visibly supported me until/at the end!
My reactivated account on indiedb.com.
Myth
Inhuman
Posts: 988
Joined: Tue Feb 12, 2008 5:57 pm
Personal rank: Low Poly Freak

Re: The lol script?

Post by Myth »

If I'd start to make a list of problems, especially nowadays when some rather big ones are threatening me I wouldn't finish the list in my lifetime.

Also, you are also rather a problem in my eye, Creavion. Do you really hate me that much?
NinjaNali
Average
Posts: 30
Joined: Fri Mar 07, 2008 10:33 pm

Re: The lol script?

Post by NinjaNali »

#include <iostream>
using namespace std;

int main()
{

int a = 0;
int b = 1;
int c;

c = b / a;

cout << c; //Oh fuck

return 0;
}
User avatar
Feralidragon
Godlike
Posts: 5493
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: The lol script?

Post by Feralidragon »

Code: Select all

//////////////////////////////////////////////////////////////
//Title: Mom's/Dad's worst nightmare in a car
//////////////////////////////////////////////////////////////

var byte X;
X = 0;
While (X < 1)
{
       Kid.DisplayMessage("Are we there yet?");
}
Myth
Inhuman
Posts: 988
Joined: Tue Feb 12, 2008 5:57 pm
Personal rank: Low Poly Freak

Re: The lol script?

Post by Myth »

@Ninja Nali: a division by 0 which is that obvious isn't lol at all.
@Feralidragon: reminds me of shrek 2.

Code: Select all

//////////////////////////////////////////////////////////////
//Title: Mom's/Dad's worst nightmare in a car #2
//We assume that the kid has an IQ of 0.1, 
//otherwise the code won't work properly 
//(we can always change his IQ if it's not suitable)
//////////////////////////////////////////////////////////////

While (Kid.IQ < 1)
{
       Kid.DisplayMessage("Are we there yet?");
}
User avatar
rohitggarg
Adept
Posts: 400
Joined: Wed Mar 12, 2008 7:18 am
Personal rank: The name is Bu||et
Location: India
Contact:

Re: The lol script?

Post by rohitggarg »

Code: Select all

****************************************
* I dont want my machine to hang around like others.
* Do some work damn it!!!
****************************************
function process(boolean processed) {
	//do some whaky stuff
	//do some more whaky stuff
	if(!processed)
		process(processed);
}
*************
*Invocation point
*************
function main() {
	process(false);
}
Regards,
Rohit

CATCH ME IF YOU CAN.............
Image

My website : http://www.appointmentagent.com
User avatar
Saya-chan
Adept
Posts: 446
Joined: Mon Jun 02, 2008 10:46 am
Personal rank: Former UT99 modder
Location: Vigo, Galicia
Contact:

Re: The lol script?

Post by Saya-chan »

Code: Select all

// Very, very realistic baby AI!
class RealBaby extends Pawn;

var bool balive;
...

...
function PostBeginPlay()
{
  balive = true;
  SetTimer(300, true);  // every 5 minutes...
}
...

...
function timer()
{
  local int whattodo;

  if ( balive == true )
  {
    whattodo = Rand(3);
    if ( whattodo == 0 )
      crap();
    else if ( whattodo == 1 )
      hungry();
    else
      cryfornodamnreason();
  }
}
...
Image
  ~♥~ Bless the Cute Emperor ~♥~
User avatar
zacman
Adept
Posts: 412
Joined: Wed Apr 15, 2009 5:36 am
Personal rank: M-M-M-MONSTER KILL

Re: The lol script?

Post by zacman »

Code: Select all

//===========================================================
//LOLARENA: Nothing But Armor allowed :P
//===========================================================
class LOLARENA expands Mutator;
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{ 
if ( Other.IsA('Weapon') && Other.class!=class'Botpack.armor2' ) {
ReplaceWith(Other, "Botpack.Armor2");
return False;
} else if ( Other.IsA('Ammo') && Other.class!=class'Botpack.thighpads' ) {
ReplaceWith(Other, "botpack.thighpads");
return False;
}
return true;
}
:loool:
Haven't tested it yet, though...
Image[url=steam://friends/add/76561198048595886]Image[/url]
Post Reply