Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function consoleCommandCheck(command)
- {
- if (command)
- {
- command = command.toLowerCase();
- commandExists = true;
- var __reg3 = command.split(" ");
- consoleCommand = __reg3[0];
- consoleParam = __reg3[1];
- if (0 != (consoleParam == undefined) | 0 != (consoleParam == ""))
- {
- consoleParam_isNum = false;
- }
- else
- {
- if (isNaN(consoleParam))
- {
- consoleParam_isNum = false;
- }
- else
- {
- consoleParam_isNum = true;
- consoleParam = new Number(consoleParam);
- }
- }
- if (consoleCommand == "zing")
- {
- extraTxt = "zzzing!";
- }
- else
- {
- if (consoleCommand == "cake")
- {
- extraTxt = "ZEH CAKE IZ A LIE";
- }
- else
- {
- if (consoleCommand == "tralala")
- {
- extraTxt = "have you touched my tralala?";
- }
- else
- {
- if (consoleCommand == "lolcopter")
- {
- extraTxt = "that\'s my ride home.";
- }
- else
- {
- if (consoleCommand == "roflcopter")
- {
- extraTxt = "that\'s the father of lolcopter.";
- }
- else
- {
- if (consoleCommand == "zingcraft")
- {
- extraTxt = "zzzzzzzzwish!~";
- }
- else
- {
- if (consoleCommand == "hello")
- {
- extraTxt = "why hello.";
- }
- else
- {
- if (consoleCommand == "shoopdawoop")
- {
- extraTxt = "IMAH CARCHING MAH LAZAR";
- }
- else
- {
- if (consoleCommand == "awesome")
- {
- extraTxt = "awesome indeed.";
- }
- else
- {
- if (consoleCommand == "thanks")
- {
- extraTxt = "anytime.";
- }
- else
- {
- if (consoleCommand == "zomgowned")
- {
- extraTxt = "lol.";
- }
- else
- {
- if (consoleCommand == "zomg")
- {
- extraTxt = "ZEUS OWNED MY GEODUDE.";
- }
- else
- {
- if (consoleCommand == "lol")
- {
- extraTxt = "lots of laughs?";
- }
- else
- {
- if (consoleCommand == "nonsense")
- {
- extraTxt = "exactly, it doesn\'t make any sense.";
- }
- else
- {
- if (consoleCommand == "wassup")
- {
- extraTxt = "wassuuuuuuuuuuuppp?";
- }
- else
- {
- if (consoleCommand == "console")
- {
- extraTxt = "that\'s me!";
- }
- else
- {
- if (consoleCommand == "brain")
- {
- extraTxt = "that\'d be Ido\'s.";
- }
- else
- {
- if (consoleCommand == "bla")
- {
- extraTxt = "try harder.";
- }
- else
- {
- if (consoleCommand == "bye")
- {
- extraTxt = "oh please, don\'t leave.";
- }
- else
- {
- if (consoleCommand == "ok")
- {
- extraTxt = "okie dokie!";
- }
- else
- {
- if (consoleCommand == "flash")
- {
- extraTxt = "it crashes a lot. And does problems with Vista x64 ):";
- }
- else
- {
- if (consoleCommand == "zund")
- {
- extraTxt = "זומג!";
- }
- else
- {
- if (consoleCommand == "iphone")
- {
- extraTxt = "don\'t even start.";
- }
- else
- {
- if (consoleCommand == "wecreatestuff")
- {
- extraTxt = "oh, we totally do.";
- }
- else
- {
- if (consoleCommand == "aloligotcomplexcockitandpullit")
- {
- extraTxt = "It\'s \'A loaded god complex, cock it and pull it\' goddammit!.";
- }
- else
- {
- if (consoleCommand == "orly")
- {
- extraTxt = "ya rly.";
- }
- else
- {
- if (consoleCommand == "gosh")
- {
- extraTxt = "GOSH!!";
- }
- else
- {
- if (consoleCommand == "hitler")
- {
- extraTxt = "HITL0R!?";
- }
- else
- {
- if (consoleCommand == "easteregg")
- {
- extraTxt = "you found it.";
- }
- else
- {
- if (consoleCommand == "gman")
- {
- extraTxt = "yes, you can find him, visualy, in this game...";
- }
- else
- {
- if (consoleCommand == "xbox")
- {
- extraTxt = "X BAWX!";
- }
- else
- {
- if (consoleCommand == "portal")
- {
- extraTxt = "now you\'re thinking with portals. no, nothing was activated.";
- }
- else
- {
- if (consoleCommand == "retarded")
- {
- extraTxt = "movie!";
- }
- else
- {
- if (consoleCommand == "4815162342")
- {
- extraTxt = "system failure system failure system failure system failure system failure system failure system failure";
- }
- else
- {
- if (consoleCommand == "crash")
- {
- extraTxt = "we\'re trying, but we\'ll never be good as Source";
- }
- else
- {
- if (consoleCommand == "messenger")
- {
- extraTxt = "Ido - dragy2005@hotmail.com Hen - henmazolski@gmail.com ):";
- }
- else
- {
- if (consoleCommand == "website")
- {
- extraTxt = "wecreatestuff.com";
- }
- else
- {
- if (consoleCommand == "lost")
- {
- extraTxt = "charlie\'s dead ):";
- }
- else
- {
- if (consoleCommand == "sneeze")
- {
- extraTxt = "bless you.";
- }
- else
- {
- if (consoleCommand == "eon8")
- {
- extraTxt = "oh you\'re fucked now.";
- }
- else
- {
- if (consoleCommand == "gmod")
- {
- extraTxt = "GMAN APPROVES.";
- }
- else
- {
- if (consoleCommand == "iwanttoplayagame")
- {
- extraTxt = "you are already.";
- }
- else
- {
- if (consoleCommand == "time")
- {
- extraTxt = "what\'s the point? you know the time, you\'re just teasing me.";
- }
- else
- {
- if (consoleCommand == "thisismadness")
- {
- killPlayer("crash");
- extraTxt = "madness?..\n This\n IS\n SPARTAAA!!!\n subject was kicked to his death.";
- }
- else
- {
- if (consoleCommand == "hl2")
- {
- extraTxt = "is awesome.";
- }
- else
- {
- if (consoleCommand == "hl2ep1")
- {
- extraTxt = "is truly awesome.";
- }
- else
- {
- if (consoleCommand == "hl2ep2")
- {
- extraTxt = "is a great looking game which I have not yet played. but by the time you read this I probably already have.";
- }
- else
- {
- if (consoleCommand == "tf2")
- {
- extraTxt = "well I liked the first...";
- }
- else
- {
- if (consoleCommand == "overlord")
- {
- extraTxt = "I like controling these goblins.";
- }
- else
- {
- if (consoleCommand == "pie")
- {
- extraTxt = "Not just a pie, me friends, an APPLE pie.";
- }
- else
- {
- if (consoleCommand == "speak")
- {
- extraTxt = "I don\'t speak.";
- }
- else
- {
- if (consoleCommand == "eat")
- {
- extraTxt = "Die.";
- }
- else
- {
- if (consoleCommand == "stop")
- {
- extraTxt = "();";
- }
- else
- {
- if (consoleCommand == "nightmarehouse")
- {
- extraTxt = "is an hl2 mod by us D:";
- }
- else
- {
- if (0 != (0 != (0 != (0 != (consoleCommand == "help") | 0 != (consoleCommand == "commandlist")) | 0 != (consoleCommand == "showlist")) | 0 != (consoleCommand == "showcommands")) | 0 != (consoleCommand == "showcommand"))
- {
- extraTxt = "Partial command database below.";
- extraTxt = extraTxt + "\ninfo - Information.";
- extraTxt = extraTxt + "\nkill - suicide.";
- extraTxt = extraTxt + "\nhelp/commandlist/showlist/showcommand - partial command database.";
- extraTxt = extraTxt + "\nsound - enable/disable sounds.";
- extraTxt = extraTxt + "\naim/space - allow [SPACE] dummy portal.";
- extraTxt = extraTxt + "\nquality 0-3 - set quality level.";
- extraTxt = extraTxt + "\neffects 0-2 - set effect level.";
- extraTxt = extraTxt + "\ngravity [0>#] - set map gravity level.";
- extraTxt = extraTxt + "\nprevlevel - go to next level.";
- extraTxt = extraTxt + "\nnextlevel - go to previous level.";
- extraTxt = extraTxt + "\nshowfps - visible/invisible fps and level name.";
- extraTxt = extraTxt + "\nOther commands (show<command>, create<command>, remove<command>, <command>) are hidden.";
- }
- else
- {
- if (0 != (consoleCommand == "kill") | 0 != (consoleCommand == "die"))
- {
- killPlayer("crash");
- extraTxt = "subject commited suicide with an invisible crowbar.";
- }
- else
- {
- if (consoleCommand == "noclip")
- {
- if (_root.noclip == false)
- {
- _root.noclip = true;
- extraTxt = "noclip enabled.";
- }
- else
- {
- _root.noclip = false;
- extraTxt = "noclip disabled.";
- }
- }
- else
- {
- if (consoleCommand == "god")
- {
- if (_root.god == false)
- {
- _root.god = true;
- extraTxt = "god enabled.";
- }
- else
- {
- _root.god = false;
- extraTxt = "god disabled.";
- }
- }
- else
- {
- if (0 != (consoleCommand == "portalproof") | 0 != (consoleCommand == "antiportal"))
- {
- if (_root.portalProof == false)
- {
- _root.portalProof = true;
- extraTxt = "Portal Proof enabled.";
- }
- else
- {
- _root.portalProof = false;
- extraTxt = "Portal Proof disabled.";
- }
- }
- else
- {
- if (0 != (consoleCommand == "dance") | 0 != (consoleCommand == "/dance"))
- {
- if (_root.dance_enabled == false)
- {
- _root.dance_enabled = true;
- extraTxt = "dance enabled.";
- }
- else
- {
- _root.dance_enabled = false;
- extraTxt = "dance disabled.";
- }
- }
- else
- {
- if (0 != (consoleCommand == "sounds") | 0 != (consoleCommand == "sound"))
- {
- if (sounds)
- {
- allsound.setVolume(0);
- sounds = false;
- extraTxt = "sounds disabled.";
- }
- else
- {
- allsound.setVolume(100);
- sounds = true;
- extraTxt = "sounds enabled.";
- }
- }
- else
- {
- if (consoleCommand == "crosshair")
- {
- if (crosshair)
- {
- crosshair = false;
- extraTxt = "crosshair disabled.";
- }
- else
- {
- crosshair = true;
- extraTxt = "crosshair enabled.";
- }
- }
- else
- {
- if (0 != (0 != (consoleCommand == "space") | 0 != (consoleCommand == "aim")) | 0 != (consoleCommand == "detectshot"))
- {
- if (spaceDummy)
- {
- spaceDummy = false;
- extraTxt = "Aim (space) disabled.";
- }
- else
- {
- spaceDummy = true;
- extraTxt = "Aim (space) enabled.";
- }
- }
- else
- {
- if (consoleCommand == "autoquality")
- {
- if (quality_auto)
- {
- quality_auto = false;
- extraTxt = "sounds disabled.";
- }
- else
- {
- quality_auto = true;
- extraTxt = "sounds enabled.";
- }
- }
- else
- {
- if (0 != (consoleCommand == "dynamiccam") | 0 != (consoleCommand == "dynamicam"))
- {
- if (playerCam)
- {
- playerCam = false;
- extraTxt = "playerCam disabled.";
- }
- else
- {
- playerCam = true;
- extraTxt = "playerCam enabled.";
- }
- }
- else
- {
- if (0 != (consoleCommand == "stopallsounds") | 0 != (consoleCommand == "stopsounds"))
- {
- stopAllSounds();
- extraTxt = "all sounds currently running were stopped";
- }
- else
- {
- if (consoleCommand == "info")
- {
- extraTxt = portalver;
- }
- else
- {
- if (consoleCommand == "showfps")
- {
- if (showfps == true)
- {
- showfps = false;
- extraTxt = "fps invisible.";
- }
- else
- {
- showfps = true;
- extraTxt = "fps visible.";
- }
- }
- else
- {
- if (consoleCommand == "showmapbox")
- {
- if (bg.ground._visible == true)
- {
- bg.ground._visible = false;
- bg.wall._visible = false;
- bg.antiportal._visible = false;
- bg.antiobject._visible = false;
- bg.kill._visible = false;
- bg.kill_ar2._visible = false;
- extraTxt = "mapbox invisible.";
- }
- else
- {
- bg.ground._visible = true;
- bg.wall._visible = true;
- bg.antiportal._visible = true;
- bg.antiobject._visible = true;
- bg.kill._visible = true;
- bg.kill_ar2._visible = true;
- extraTxt = "mapbox visible.";
- }
- }
- else
- {
- if (0 != (consoleCommand == "showdynamicbox") | 0 != (consoleCommand == "showdynamicboxes"))
- {
- if (maxphys > 1)
- {
- if (phybox1._visible == true)
- {
- phy = 1;
- while (phy < _root.maxphys)
- {
- _root["phybox" + phy]._visible = false;
- ++phy;
- }
- extraTxt = "dynamic physicboxes invisible.";
- }
- else
- {
- phy = 1;
- while (phy < _root.maxphys)
- {
- _root["phybox" + phy]._visible = true;
- ++phy;
- }
- extraTxt = "dynamic physicboxes visible.";
- }
- }
- else
- {
- extraTxt = "cannot show dynamic physicboxes.";
- }
- }
- else
- {
- if (consoleCommand == "showportalbox")
- {
- if (portal1._visible == true)
- {
- portal1._visible = false;
- portal2._visible = false;
- extraTxt = "portalbox invisible.";
- }
- else
- {
- portal1._visible = true;
- portal2._visible = true;
- extraTxt = "portalbox visible.";
- }
- }
- else
- {
- if (consoleCommand == "showportalhitbox")
- {
- if (wt1._visible == true)
- {
- wt1._visible = false;
- wt2._visible = false;
- extraTxt = "portalhitbox invisible.";
- }
- else
- {
- wt1._visible = true;
- wt2._visible = true;
- extraTxt = "portalhitbox visible.";
- }
- }
- else
- {
- if (consoleCommand == "showportalmask")
- {
- if (ht1._visible == true)
- {
- ht1._visible = false;
- ht2._visible = false;
- extraTxt = "portalmask invisible.";
- }
- else
- {
- ht1._visible = true;
- ht2._visible = true;
- extraTxt = "portalmask visible.";
- }
- }
- else
- {
- if (0 != (consoleCommand == "showsteps") | 0 != (consoleCommand == "showstep"))
- {
- if (step1._visible == true)
- {
- step1._visible = false;
- step2._visible = false;
- extraTxt = "steps invisible.";
- }
- else
- {
- step1._visible = true;
- step2._visible = true;
- extraTxt = "steps visible.";
- }
- }
- else
- {
- if (0 != (consoleCommand == "showshot") | 0 != (consoleCommand == "showshots"))
- {
- if (Target._visible == true)
- {
- Target._visible = false;
- extraTxt = "shots invisible.";
- }
- else
- {
- Target._visible = true;
- extraTxt = "shots visible.";
- }
- }
- else
- {
- if (consoleCommand == "gravity")
- {
- if (consoleParam_isNum)
- {
- if (consoleParam <= 0)
- {
- gravity = 0.05;
- }
- else
- {
- gravity = consoleParam / 600;
- }
- extraTxt = "gravity is set to " + gravity * 600;
- }
- else
- {
- extraTxt = consoleError_notParam;
- }
- }
- else
- {
- if (0 != (consoleCommand == "quality") | 0 != (consoleCommand == "_quality"))
- {
- if (consoleParam_isNum)
- {
- if (consoleParam == 0)
- {
- _quality = "LOW";
- }
- else
- {
- if (consoleParam == 1)
- {
- _quality = "MEDIUM";
- }
- else
- {
- if (consoleParam == 2)
- {
- _quality = "HIGH";
- }
- else
- {
- if (consoleParam == 3)
- {
- _quality = "BEST";
- }
- }
- }
- }
- extraTxt = "quality is set to " + _quality;
- }
- else
- {
- extraTxt = consoleError_notParam;
- }
- }
- else
- {
- if (consoleCommand == "effects")
- {
- if (consoleParam_isNum)
- {
- if (consoleParam == 0)
- {
- effects = 0;
- }
- else
- {
- if (consoleParam == 1)
- {
- effects = 1;
- }
- else
- {
- if (consoleParam == 2)
- {
- effects = 2;
- }
- }
- }
- extraTxt = "effects is set to " + effects;
- }
- else
- {
- extraTxt = consoleError_notParam;
- }
- }
- else
- {
- if (consoleCommand == "createbox")
- {
- createBox(p1._x, p1._y - p1._height);
- extraTxt = "object BOX has been spawned.";
- }
- else
- {
- if (0 != (0 != (0 != (consoleCommand == "companion") | 0 != (consoleCommand == "createcompanion")) | 0 != (consoleCommand == "createcompanioncube")) | 0 != (consoleCommand == "createcompanionbox"))
- {
- if (companionExists)
- {
- extraTxt = "object COMPANION BOX could not be deleted.";
- }
- else
- {
- createBox(p1._x, p1._y - p1._height, true);
- extraTxt = "object COMPANION BOX has been spawned.";
- }
- }
- else
- {
- if (consoleCommand == "removebox")
- {
- if (maxn > 2)
- {
- removeBox();
- extraTxt = "object BOX has been deleted.";
- }
- else
- {
- extraTxt = "object BOX could not be deleted.";
- }
- }
- else
- {
- if (consoleCommand == "createcam")
- {
- createCam(p1._x, p1._y);
- extraTxt = "object CAM has been spawned.";
- }
- else
- {
- if (consoleCommand == "removecam")
- {
- if (maxc > 1)
- {
- removeCam();
- extraTxt = "object CAM has been deleted.";
- }
- else
- {
- extraTxt = "object CAM could not be deleted.";
- }
- }
- else
- {
- if (consoleCommand == "createball")
- {
- createBall(p1._x, p1._y - p1._height * 2, "up");
- extraTxt = "object BALL has been spawned.";
- }
- else
- {
- if (consoleCommand == "removeBall")
- {
- if (maxb > 1)
- {
- removeLastBall();
- extraTxt = "object BALL has been deleted.";
- }
- else
- {
- extraTxt = "object BALL could not be deleted.";
- }
- }
- else
- {
- if (0 != (0 != (0 != (consoleCommand == "createturret") | 0 != (consoleCommand == "createturrent")) | 0 != (consoleCommand == "createturretr")) | 0 != (consoleCommand == "createturrentr"))
- {
- createTurret(p1._x, p1._y, "right");
- extraTxt = "object TURRENT has been spawned.";
- }
- else
- {
- if (0 != (consoleCommand == "createturretl") | 0 != (consoleCommand == "createturrenl"))
- {
- createTurret(p1._x, p1._y, "left");
- extraTxt = "object TURRENT has been spawned.";
- }
- else
- {
- if (consoleCommand == "removeturret")
- {
- if (maxt > 1)
- {
- removeTurret();
- extraTxt = "object TURRET has been deleted.";
- }
- else
- {
- extraTxt = "object TURRET could not be deleted.";
- }
- }
- else
- {
- if (0 != (consoleCommand == "restartlevel") | 0 != (consoleCommand == "restartmap"))
- {
- restartLevel();
- extraTxt = "Level (" + nextMap + ") restarted.";
- }
- else
- {
- if (0 != (consoleCommand == "gotolevel") | 0 != (consoleCommand == "gotoandplay"))
- {
- if (consoleParam_isNum)
- {
- if (consoleParam < 0)
- {
- restartLevel();
- extraTxt = "Level (" + nextMap + ") restarted.";
- }
- else
- {
- mapn = consoleParam;
- nextMap = ["level" + mapn];
- nextLevel = true;
- extraTxt = "level " + nextMap + " launched";
- }
- }
- else
- {
- extraTxt = consoleError_notParam;
- }
- }
- else
- {
- if (0 != (consoleCommand == "nextlevel") | 0 != (consoleCommand == "followinglevel"))
- {
- ++mapn;
- nextMap = ["level" + mapn];
- nextLevel = true;
- extraTxt = "Next level (" + nextMap + ") launched.";
- }
- else
- {
- if (0 != (consoleCommand == "prevlevel") | 0 != (consoleCommand == "previouslevel"))
- {
- if (mapn >= 0)
- {
- --mapn;
- nextMap = ["level" + mapn];
- nextLevel = true;
- extraTxt = "Previous level (" + nextMap + ") launched.";
- }
- else
- {
- extraTxt = "Cannot play previous level.";
- }
- }
- else
- {
- extraTxt = "";
- commandExists = false;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- console.consoleTxt = console.consoleTxt + ("] " + command + "\n");
- if (commandExists)
- {
- console.consoleTxt = console.consoleTxt + (extraTxt + "\n");
- }
- else
- {
- console.consoleTxt = console.consoleTxt + ("command \'" + command + "\' does not exist." + "\n");
- }
- console.consoleTxt.scroll = console.consoleTxt.scroll + 50;
- tempInsertTxt = command;
- console.insertTxt = "";
- }
- }
Add Comment
Please, Sign In to add comment