Jump to content

Lightness

Banned
  • Posts

    155
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Lightness

  1. L2Cartel, today or tomorrow server online? (i see in announcement 2-3h down)
  2. Hi guys... -------------------------- Text clan crest: TW Text ally crest: Nothing Size: 24x12 -------------------------- EDIT: i find one :). Close this topic!
  3. Dont bla bla... Wait some hours and see guys :).
  4. [ES] Hola :) Bienvenido! (aunque yo también soy nuevo :P)
  5. Slab, when open project with new name?
  6. You feel good? You sh1t people, and much ppl want some fun with this server... are you happy for attack and ppl cant play? ??? hmmm, u dont have good life (my opinion) unhappy :(
  7. You attack becaouse need money? Well you do it :P.
  8. Welcome :).
  9. Download sXeMu By Karman Credits: Karman and BloodSharp
  10. Maybe tomorrow. I'm glad you liked it :).
  11. Barça
  12. EasyConfig C++ Class Config files such as *.ini You'll see it's not hard at all to use it. Please note that there are 2 constructors, an empty one that doesn't require any argument and another one that takes the file name. If you declare an object without any file name, you'll have to use the SetFileName method. Here's an exemple: ( cpp): #include "stdafx.h" using namespace std; int main(int argc, char* argv[]) { ConfigFile myIni; myIni.SetFileName("C:\\Hax.txt"); cout << myIni.ReadStringValue("LOL", "value1").c_str() << endl; cout << "Writing int into value2..." << endl; myIni.WriteValue("LOL", "value2", 1337); cout << myIni.ReadIntValue("LOL", "value2") << endl; cout << "Writing float into value3..." << endl; myIni.WriteValue("LOL", "value3", 3.14f); cout << myIni.ReadFloatValue("LOL", "value3") << endl; return 0; } WriteValue is an overloaded function that works with float, int and strings which is actually what I needed. The code launches a ConfigFileException when shit happens. For exemple: (cpp): ConfigFile myIni; cout << myIni.ReadStringValue("LOL", "value1").c_str() << endl; In this code, we didn't set a file name. The code will launch an exception that contains, The file name (In this case, it's ) And the error description To avoid unhandled... Exceptions: (cpp): ConfigFile myIni; try { cout << myIni.ReadStringValue("LOL", "value1").c_str() << endl; } catch( ConfigFileException e ) { cout << "*** EXCEPTION CAUGHT ***"<< endl; cout << e.fileName << endl; cout << e.errMessage<< endl; } I added the exceptions stuff today, so if you find anything i could add/correct, just say And now, the file you're all waiting for: EasyCfg.cpp: (cpp): #pragma once #define FILE_NOT_EXISTING "The file you tried to open doesn't exist" #define FILENAME_NOT_DEFINED "You didn't declare a file name" #define NO_FILE_NAME "<no File Name>" class ConfigFileException { public: std::string errMessage; std::string fileName; ConfigFileException( std::string tmpErrMessage, std::string tmpFileName ) { fileName = tmpFileName; errMessage = tmpErrMessage; } }; class ConfigFile { std::string FileName; public: //////////////////////////////////// ConfigFile( std::string strFile ) { this->FileName = strFile; if(!FileExists()) { ConfigFileException e(FILE_NOT_EXISTING, this->FileName); throw e; } } ConfigFile( ) { } ~ConfigFile( ) { } //////////////////////////////////// //////////////////////////////////// void SetFileName( std::string newFileName ) { this->FileName = newFileName; if(!FileExists()) { ConfigFileException e(FILE_NOT_EXISTING, this->FileName); throw e; } } std::string GetFileName() { if(this->FileName.size() < 1 ) { ConfigFileException e(FILENAME_NOT_DEFINED, NO_FILE_NAME); throw e; return false; } return this->FileName; } bool FileExists() //If no file specified, just check if the FileName file exists { if(this->FileName.size() < 1 ) { ConfigFileException e(FILENAME_NOT_DEFINED, NO_FILE_NAME); throw e; return false; } bool retVal = false; std::fstream tmpFile; tmpFile.open(this->FileName.c_str(), std::ios::in); if( tmpFile.is_open() ) retVal = true; tmpFile.close(); return retVal; } bool FileExists( std::string fileName ) { bool retVal = false; std::fstream tmpFile; tmpFile.open(fileName.c_str(), std::ios::in); if( tmpFile.is_open() ) retVal = true; tmpFile.close(); return retVal; } int ReadIntValue( std::string section, std::string option ) { if(!FileExists()) { ConfigFileException e(FILE_NOT_EXISTING, this->FileName); throw e; //Have fun } return GetPrivateProfileIntA(section.c_str(), option.c_str(), -1, this->FileName.c_str()); } float ReadFloatValue( std::string section, std::string option ) { if(!FileExists()) { ConfigFileException e(FILE_NOT_EXISTING, this->FileName); throw e; //Have fun } char tmpStr[16] = {'\0'}; GetPrivateProfileStringA(section.c_str(), option.c_str(), NULL, tmpStr, 15, this->FileName.c_str()); return (float)atof(tmpStr); } std::string ReadStringValue( std::string section, std::string option ) { if(!FileExists()) { ConfigFileException e(FILE_NOT_EXISTING, this->FileName); throw e; } char tmpStr[256] = {'\0'}; GetPrivateProfileStringA(section.c_str(), option.c_str(), NULL, tmpStr, 255, this->FileName.c_str()); return std::string(tmpStr); } void WriteValue( std::string section, std::string option, std::string val ) { if(this->FileName.size() < 1 ) { ConfigFileException e(FILENAME_NOT_DEFINED, NO_FILE_NAME); throw e; } WritePrivateProfileStringA(section.c_str(), option.c_str(), val.c_str(), this->FileName.c_str()); } void WriteValue( std::string section, std::string option, int val ) { if(this->FileName.size() < 1 ) { ConfigFileException e(FILENAME_NOT_DEFINED, NO_FILE_NAME); throw e; } char tmpResult[10] = {'\0'}; _itoa_s (val, tmpResult, 9, 10); WritePrivateProfileStringA(section.c_str(), option.c_str(), tmpResult, this->FileName.c_str()); } void WriteValue( std::string section, std::string option, float val ) { if(this->FileName.size() < 1 ) { ConfigFileException e(FILENAME_NOT_DEFINED, NO_FILE_NAME); throw e; } char tmpResult[16] = {'\0'}; sprintf(tmpResult, "%f", val); WritePrivateProfileStringA(section.c_str(), option.c_str(), tmpResult, this->FileName.c_str()); } }; "Download" EasyCfg.cpp by Lightness
  13. EasyConfig C++ Class Config files such as *.ini You'll see it's not hard at all to use it. Please note that there are 2 constructors, an empty one that doesn't require any argument and another one that takes the file name. If you declare an object without any file name, you'll have to use the SetFileName method. Here's an exemple: WriteValue is an overloaded function that works with float, int and strings which is actually what I needed. The code launches a ConfigFileException when shit happens. For exemple: In this code, we didn't set a file name. The code will launch an exception that contains, The file name (In this case, it's ) And the error description To avoid unhandled... Exceptions: I added the exceptions stuff today, so if you find anything i could add/correct, just say And now, the file you're all waiting for: EasyCfg.cpp Download: EasyCfg.cpp
  14. Thanks Cr1MsOn, Yes i see your pm and i help u but now i cant. I will send to you via PM when I can do it. Thanks dude and wait for me!
  15. Well folks, I guess many people know about the program but here I bring the source code, the code is largely done in Delphi. Cheat-Engine 5.6.1 Source-Code: Download Cheat-Engine 5.5 Source-Code: Download
  16. Visual Basic 6.0 Portable U want photo from program send me PM please. The tools in Visual Basic: ▪ The user interface control to improve a large number. ▪ Program a number of tools for compiling and debugging. ▪ Access to different databases. ▪ Active X ™ technology that allows other applications to use the functions. ▪ Produce and distribute the application as the EXE file. ▪ Reporting tools. ▪ Data structure tools. What can we do with Visual Basic? ▪ A simple and general-purpose applications. ▪ Developed custom applications for companies. ▪ Commercial programs, sales systems, database applications. ▪ Package programs for commercial purposes. ▪ Web applications..! Download You need Virus Scan from this send me PM.
  17. Media Player The List Box will be the place for Files that you will add ... for the list box the code is: (vb): WindowsMediaPlayer1.URL = List1 The Command Button rename with " ADD File " and the code for it: (vb): Dim sFile As String With CommonDialog1 .[color=green]DialogTitle[/color] = [color=red]"Open Media..."[/color] .[color=green]CancelError[/color] = False .[color=green]Filter [/color]= [color=red]"All Suported Files"[/color] .[color=green]ShowOpen[/color] If Len[color=green](.FileName)[/color] = 0 Then Exit Sub End If sFile = .FileName With List1 .[color=green]AddItem[/color] sFile End With End With - Its been a while since Ive been here - Well i made this today when i was board - Its a media player using API - It play's mp3\wma\wmv - For now maybe i will add divex to it later on - Well for now the source stays with me till its a complete project..! # a command button # a list Box Source Code: Download You need Virus Scan from application PM me and i give u via PM.
  18. Please Move the post to Coding Tutorials/Guides and sorry for error and delete this reply.
  19. Please Move the post to Coding Tutorials/Guides and sorry for error and delete this reply.
  20. [C++] Calculator (cpp): #include <iostream> using namespace std; //addition float addition( float num1, float num2) { return num1 + num2; } //subtraction float subtraction(float num1, float num2) {return num1-num2;} //multiplication float multiplication(float num1, float num2) {return num1*num2;} //division float division(float num1, float num2) {return num1/num2;} //main function int main() { float number1; float number2; int choice; cout<<"What would you like to do?(1=add, 2=subtract, 3=multiply, 4=divide)"<<endl; cout<<"Choice:"<<endl; cin>>choice; if(choice==1) {//addition cout<<"What is your first number?(addition)"<<endl<<"Number:"; cin>>number1; cout<<"What would you like to add?"<<endl<<"Number:"; cin>>number2; cout<<"Your Answer is:"<<addition(number1, number2)<<endl;} else if(choice==2) {//subtraction cout<<"What is your first number(subtraction)?"<<endl<<"Number:"; cin>>number1; cout<<"What number would you like to subtract?"<<endl<<"Number:"; cin>>number2; cout<<"Your Answer is:"<<subtraction(number1, number2)<<endl;} else if(choice==3) {//multiplication cout<<"What is your first number(Multiplication)?"<<endl<<"Number:"; cin>>number1; cout<<"What number would you like to multiply?"<<endl<<"Number:"; cin>>number2; cout<<"Your Answer is:"<<multiplication(number1, number2)<<endl;} else //division cout<<"What is your first number(Divide)?"<<endl<<"Number:"; cin>>number1; cout<<"What number would you like to Divide by?"<<endl<<"Number:"; cin>>number2; cout<<"Your Answer is:"<<division(number1, number2)<<endl; system("PAUSE"); return 0; } Source code: Download Calculator-2 (cpp): #include <iostream> #include <iomanip> using namespace std; int main() { int left, right; // Operands char oper; // Operator int result; // Resulting value while (cin >> left >> oper >> right) { switch (oper) { case '+': result = left + right; break; case '-': result = left - right; break; case '*': result = left * right; break; case '/': result = left / right; break; default : cout << "Bad operator '" << oper << "'" << endl; continue; // Start next loop iteration. } cout << result << endl << endl; } return 0; }
  21. [C++] The "Matrix" in C++ (Win32 Console) main.cpp (cpp): #include <iostream> #include <vector> #include "Matrix.h" int main() { RemoveCursor(); // Set the console title and double the consoles height #if (_WIN32_WINNT == _WIN32_WINNT_WINXP) if (!SetConsoleTitle("Matrix - Win32 Console")) { std::cout << "SetConsoleTitle returned an error: " << GetLastError(); } SMALL_RECT windowSize = { 0, 0, 79, 49 }; if (!SetConsoleWindowInfo(GetStdHandle(STD_OUTPUT_HANDLE), TRUE, &windowSize)) { std::cout << "SetConsoleWindowInfo returned an error: " << GetLastError(); } #else // Windows Vista/7 have disabled FULL SCREEN ShowWindow(GetConsoleWindow(), SW_MAXIMIZE); #endif std::vector<Matrix>matrix; /* matrix.push_back(Matrix(0, 0, 5, 15)); matrix.push_back(Matrix(65, 0, 5, 15)); matrix.push_back(Matrix(0, 0, 5, 15)); matrix.push_back(Matrix(65, 0, 5, 15)); matrix.push_back(Matrix(0, 0, 5, 15)); matrix.back().setErase(true); matrix.push_back(Matrix(65, 0, 5, 15)); matrix.back().setErase(true); matrix.push_back(Matrix(0, 0, 5, 15)); matrix.back().setErase(true); matrix.push_back(Matrix(65, 0, 5, 15)); matrix.back().setErase(true); */ for (int y = 0; y < 15; y++) { matrix.push_back(Matrix()); } for (int z = 0; z < 5; z++) { matrix.push_back(Matrix()); matrix.at(z).setErase(true); } while (1) { Sleep(1); for (int x = 0; x < matrix.size(); x++) { matrix.at(x).display(); } } return 0; } Matrix.cpp (cpp): #include "Matrix.h" using std::cout; Matrix::Matrix() { // The initial seed value of the object srand(static_cast<unsigned int>(getpid()) ^ static_cast<unsigned int>(clock()) ^ static_cast<unsigned int>(time(NULL))); // Default constructor (no arguments) setDefault(true); // Default state for 'matrix lines' setErase(false); // 80 wide, 25 tall setPosition((rand() % 80 + 0), (rand() % 22 + 0)); // Based on position Y setLength((rand() % (getPosition().Y + 1) + 0)); // Speed of each letter being displayed setSpeed((rand() % 50 + 50), (rand() % 100 + 100), (rand() % 150 + 150)); // Time between each iteration of a new color loopWhite_ = GetTickCount(); loopLgreen_ = GetTickCount(); loopDgreen_ = GetTickCount(); lenCnt_ = 0; }; Matrix::Matrix(const SMALL_RECT box) { // The initial seed value of the object srand(static_cast<unsigned int>(getpid()) ^ static_cast<unsigned int>(clock()) ^ static_cast<unsigned int>(time(NULL))); // Copy the argument to class member attribute setMatrixBox(box); // Default constructor (no arguments) setDefault(false); // Default state for 'matrix lines' setErase(false); // 80 wide, 25 tall setPosition((rand() % getMatrixBox().Right + getMatrixBox().Left), (rand() % getMatrixBox().Bottom + getMatrixBox().Top)); // Based on position Y setLength((rand() % (getPosition().Y + 1) + 0)); // Speed of each letter being displayed setSpeed((rand() % 50 + 50), (rand() % 100 + 100), (rand() % 150 + 150)); // Time between each iteration of a new color loopWhite_ = GetTickCount(); loopLgreen_ = GetTickCount(); loopDgreen_ = GetTickCount(); lenCnt_ = 0; }; Matrix::Matrix(const unsigned __int8 left, const unsigned __int8 top, const unsigned __int8 bottom, const unsigned __int8 right) { // The initial seed value of the object srand(static_cast<unsigned int>(getpid()) ^ static_cast<unsigned int>(clock()) ^ static_cast<unsigned int>(time(NULL))); // Copy the argument to class member attribute setMatrixBox(top, bottom, left, right); // Default constructor (no arguments) setDefault(false); // Default state for 'matrix lines' setErase(false); // 80 wide, 25 tall setPosition((rand() % getMatrixBox().Right + getMatrixBox().Left), (rand() % getMatrixBox().Bottom + getMatrixBox().Top)); // Based on position Y setLength((rand() % (getPosition().Y + 1) + 0)); // Speed of each letter being displayed setSpeed((rand() % 50 + 50), (rand() % 100 + 100), (rand() % 150 + 150)); // Time between each iteration of a new color loopWhite_ = GetTickCount(); loopLgreen_ = GetTickCount(); loopDgreen_ = GetTickCount(); lenCnt_ = 0; }; void Matrix::randLength() { setLength((rand() % (getPosition().Y + 1) + 5)); } void Matrix::randSpeed() { setSpeed((rand() % 50 + 50), (rand() % 100 + 100), (rand() % 150 + 150)); //setSpeed(0); } Matrix.h (cpp): #pragma once #include <time.h> #include <process.h> #include <iostream> #include "TextControl.h" class Matrix { private: bool isDefault_; // Flag to signal using default "0 to 80" width, and "0 to 25" height bool erase_; // Flag to signal erasing of text (black matrix lines) // Timers for each color (no alternative) unsigned __int32 loopWhite_; unsigned __int32 loopLgreen_; unsigned __int32 loopDgreen_; unsigned __int16 speed_[3]; // Delay between printing a new line unsigned __int8 length_; // Max. length before it quits unsigned __int8 lenCnt_; // Counter for length COORD position_; // Position on the console SMALL_RECT matrixBox_; // Box for the "Matrix" to be in public: Matrix::Matrix(); Matrix::Matrix(const SMALL_RECT); Matrix::Matrix(const unsigned __int8, const unsigned __int8, const unsigned __int8, const unsigned __int8); void display(); void setErase(const bool); bool getErase(); void setSpeed(const unsigned __int16, const unsigned __int16, const unsigned __int16); unsigned __int16 getSpeed(const unsigned __int8); private: void randLength(); void randSpeed(); void randPos(); void setDefault(const bool); bool getDefault(); void setLength(const unsigned __int8); unsigned __int8 getLength(); void setPosition(const COORD); void setPosition(const unsigned __int8, const unsigned __int8); COORD getPosition(); void setMatrixBox(const SMALL_RECT); void setMatrixBox(const unsigned __int8, const unsigned __int8, const unsigned __int8, const unsigned __int8); SMALL_RECT getMatrixBox(); }; TextControl.cpp (cpp): #include "TextControl.h" void RemoveCursor() { /* Remove the cursor (does not work in full screen) */ HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_CURSOR_INFO CursoInfo; CursoInfo.dwSize = 1; /* The size of caret */ CursoInfo.bVisible = false; /* Caret is visible? */ SetConsoleCursorInfo(hConsole, &CursoInfo); return; } void SetColor(const int foreground) { HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hConsole, foreground); return; } void PlaceCursor(const int x, const int y) { HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); COORD PlaceCursorHere; PlaceCursorHere.X = x; PlaceCursorHere.Y = y; SetConsoleCursorPosition(hConsole, PlaceCursorHere); return; } TextControl.h (cpp): #pragma once #include <windows.h> enum COLORS { BLACK = 0, DARK_BLUE = 1, DARK_GREEN = 2, TEAL = 3, DARK_RED = 4, DARK_PURPLE = 5, GOLD = 6, GREY = 7, DARK_WHITE = 8, BLUE = 9, GREEN = 10, CYAN = 11, RED = 12, PURPLE = 13, YELLOW = 14, WHITE = 15 }; void RemoveCursor(); void SetColor(const int); void PlaceCursor(const int, const int); by Lightness
  22. Lightness Info's - Real Name: Nasif - Place: Argentina - Age: 18 - Skype: lightness.1 - Msn: Lightness.-@hotmail.com
  23. Hello. I've been reading this forum for 1 year, my real brother reg here... and now me :).
×
×
  • Create New...