Thread: number of lines of code and difficulty to make a certain cheat for a game.

  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    2

    number of lines of code and difficulty to make a certain cheat for a game.

    For those experts, how many lines of code and how hard is it to make a cheat from scratch where to activate the cheat I have to type a word in my keyboard and then an option appears where I press 0 for one option, 1 for another, and 2 for the third and soforth. For those who have played hexen from raven software would know what I mean.

  2. #2
    Registered User mrafcho001's Avatar
    Join Date
    Jan 2005
    Posts
    483
    Many
    My Website
    010000110010101100101011
    Add Color To Your Code!

  3. #3
    aoeuhtns
    Join Date
    Jul 2005
    Posts
    581
    You just need to record the last N keys pressed (in a circular array) and see if the last N letters match the cheat code.

    Then you have to make the menu, and how many lines that takes depends on whether you have already made generic subroutines for menus.

  4. #4
    Registered User
    Join Date
    Jul 2005
    Posts
    2
    oh man, I'll not bother with it anyway

  5. #5
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Let me bring the following quote from the forum announcements to your attention:
    6. Messages relating to cracking, (erroneously called "hacking" by many), copyright violations, or other illegal activities will be deleted. This includes all messages reguarding to keyloggers.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  6. #6
    He's trying.
    Join Date
    Apr 2005
    Location
    Missouri, US
    Posts
    70
    I believe he's talking about implementing this in his own program, not cracking someone else's.

    Apologies if I'm wrong, but that's what I got from it.

  7. #7
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Eh.. right. If that is the case, sorry for my mistake.

    Cheers
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  8. #8
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    well, here's what it could look like if your program's using some kind of console input like half-life does:
    Code:
    #include<iostream>
    #include<cstdlib>
    #include<string>
    
    int cheatMenu();
    
    int main()
    {
    	std::string line;
    	int choice;
    	while(getline(std::cin,line,'\n'))
    	{
    		if(line=="/cheat")
    		{
    			choice=cheatMenu();
    			
    			if(choice==1)
    			{
    				std::cout<<"You Win\n";
    			}
    			else if(choice==2)
    			{
    				std::cout<<"You Lose\n";
    			}
    		}
    		else if(line=="/exit")
    		{
    			std::cout<<"Press [ENTER] to exit\n";
    			std::cin.get();
    			break;
    		}
    	}
    	return 0;
    }
    
    int cheatMenu()
    {
    	char retval[2];
    	
    	std::cout<<"Pick a Cheat:\n"
    		<<" 0: Nothing\n"
    		<<" 1: Kill Everybody Else\n"
    		<<" 2: Kill Yourself\n";
    	std::cin.get(retval[0]);
    	std::cout<<std::endl;
    
    	return atoi(retval);
    }
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Issue w/ Guess My Number Program
    By mkylman in forum C++ Programming
    Replies: 5
    Last Post: 08-23-2007, 01:31 AM
  2. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM