Saturday 25 July 2009

code to the firefox background and title script

note that the inequality signs isn't aviable to write so i will replace them with other symbols
<=(
>=)

-------------------------------------------google.html---------------------------------------------
(html)(head)(title)Brom8305 Rocks(/title)(/head)
(body background="yourpicture.jpg/.gif/.bmp" vlink="white" alink="white" link="white">(div align="center")(a href="http://www.google.com")Google(/a)(/div>(iframe name="middle" src="google2.html" align="center" width="1000" height="575")
(/iframe)
(/body)
(/html)
-------------------------------------------------------------------------------------------------

-------------------------------------------google2.html-----------------------------------------
(html)(head)(title)Brom8305 Rocks(/title)(/head)
(body)(div align="center")(a href="http://www.google.com")Google(/a)(/div)
(/body)(/html)
-------------------------------------------------------------------------------------------------

Monday 13 July 2009

hide script

#define _WIN32_WINNT 0x0500
#include windows.h // don't forget to add the >< to the headers
#include iostream
int main()
{
HWND hWnd = GetConsoleWindow();
ShowWindow( hWnd, SW_HIDE );
return 0;
}

Sunday 5 July 2009

choosable pyramid with random color and fill

#include iostream //you need to use >< on the headers, I can't use them at this page
#include windows.h
#include time.h

using namespace std;
//*******************************************************
//*made by brom8305, visit at www.youtube.com/brom8305 *
//* *
//*******************************************************
HANDLE SetColor (
HANDLE console,
int fg = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY,
int bg =0)

{
if(console == NULL)
console = GetStdHandle(STD_OUTPUT_HANDLE);

SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
NULL | NULL | NULL);

return console;

}

int main()
{
start:
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY);
double number;
char value;
double random;
cout << "what character do you want to fil the pyramid with? >> ";
cin >> value;
cout << "\nHow many lines shall the pyramid be? >> ";
cin >> number;
cout << "\n";
int i =0;
int a = number;
a--;
int y = number;
while(i < number) {
srand(time(NULL));
random = rand() % 5 + 1;
if(random == 1) {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
FOREGROUND_RED | FOREGROUND_INTENSITY | FOREGROUND_GREEN);
}
if(random == 2){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
FOREGROUND_RED | FOREGROUND_INTENSITY | FOREGROUND_BLUE);
}
if(random == 3){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
NULL | FOREGROUND_INTENSITY | FOREGROUND_GREEN);
}
if(random == 4){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
FOREGROUND_RED | FOREGROUND_INTENSITY | NULL);
}
if(random == 5) {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
FOREGROUND_BLUE | FOREGROUND_INTENSITY | NULL);
}
cout.width(y);
cout.fill(' ');
cout << "";
y--;
cout.width(number-a);
cout.fill(value);
cout << "" << endl;
++number;
i++;
i++;
a--;

}
cin.get();
cin.get();
goto start;
return 0;
}

Friday 26 June 2009

c++ Tic Tac Toe script

#include //you need to use >< on the headers, I can't use them at this page
#include
#include
#include
#include
#include
using namespace std;
HANDLE SetColor(
HANDLE console,
int fg = FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY,
int bg = 0)

{
if(console == NULL)
console = GetStdHandle(STD_OUTPUT_HANDLE);

SetConsoleTextAttribute(console, fg | bg);
return console;
}


int main()
{
char Csquare1('1');
char Csquare2('2');
char Csquare3('3');
char Csquare4('4');
char Csquare5('5');
char Csquare6('6');
char Csquare7('7');
char Csquare8('8');
char Csquare9('9');
int PlayerTurn(1);
bool GameOverWin(false);
bool GameOver(false);

do {
HANDLE console = SetColor(NULL, FOREGROUND_RED, FOREGROUND_INTENSITY);
cout << playerturn ="=" cplayermark =" 'X';" cplayermark =" 'O';">> NextMove;
bValidMove = true;

if(NextMove == '1' && Csquare1 == '1') {
Csquare1 = cPlayerMark;
} else if (NextMove == '2' && Csquare2 == '2') {
Csquare2 = cPlayerMark;
} else if (NextMove == '3' && Csquare3 == '3') {
Csquare3 = cPlayerMark;
} else if (NextMove == '4' && Csquare4 == '4') {
Csquare4 = cPlayerMark;
} else if (NextMove == '5' && Csquare5 == '5') {
Csquare5 = cPlayerMark;
} else if (NextMove == '6' && Csquare6 == '6') {
Csquare6 = cPlayerMark;
} else if (NextMove == '7' && Csquare7 == '7') {
Csquare7 = cPlayerMark;
} else if (NextMove == '8' && Csquare8 == '8') {
Csquare8 = cPlayerMark;
} else if (NextMove == '9' && Csquare9 == '9') {
Csquare9 = cPlayerMark;
} else {
cout << "Invalid move, try again" << bvalidmove =" false;" csquare2 ="="" csquare3 ="="" gameoverwin =" true;" csquare4 ="="" csquare7 ="="" gameoverwin =" true;" csquare5 ="="" csquare9 ="="" gameoverwin =" true;" csquare6 ="="" csquare9 ="="" gameoverwin =" true;" csquare5 ="="" csquare7 ="="" gameoverwin =" true;" csquare2 ="="" csquare8 ="="" gameoverwin =" true;" csquare4 ="="" csquare6 ="="" gameoverwin =" true;" csquare8 ="="" csquare7 ="="" gameoverwin =" true;" gameover =" true;" playerturn ="="" playerturn =" 2;" playerturn =" 1;">

C++ color script

#include iostream //you need to use >< on the headers, I can't use them at this page
#include windows.h

using namespace std;

HANDLE SetColor(
HANDLE console,
int fg = FOREGROUND_RED| FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY,
int bg = 0)

{
if(console == NULL)
console = GetStdHandle(STD_OUTPUT_HANDLE);

SetConsoleTextAttribute(console, fg | bg);

return console;
}


int main()
{
HANDLE console = SetColor(NULL, FOREGROUND_GREEN, FOREGROUND_RED);
cout << "Hello World" << console =" SetColor(NULL," console =" SetColor(NULL,">