QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

C++ Bot

This is a discussion on C++ Bot within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; i Want to make a bot to continue learning c++. I can do this but there is one thing stopping ...

Reply
 
LinkBack Thread Tools
Old 07-11-2007, 08:33 AM   #1
 
altunozara's Avatar
 
Join Date: Feb 2006
Location: www.ultimatetalkforums.com Games, RPG, quickchat and more!
Posts: 531
Trader Feedback: 0
Default C++ Bot

i Want to make a bot to continue learning c++. I can do this but there is one thing stopping me. I know how to make him reply to when you input a number. With int. and i know that there is float. but what do i say to make it so you can input a word and it will reply?
__________________
[CENTER][COLOR=black][COLOR=black][URL="http://forums.qj.net/f-psp-firmware-discussion-253/t-psp-firmware-30-get-it-58053.html"][COLOR=cyan]would you upgrade?[/COLOR][/URL] [/COLOR][FONT=Times New Roman][COLOR=navy][URL="http://www.mindistortion.net/iwantyoursoul/?i_am=altunozara"]OMG ITS REAL![/URL][/COLOR][/FONT][COLOR=black] [URL="http://forums.qj.net/showthread.php?t=61756&page=1&pp=10"][COLOR=lime]Sony vs Nintendo[/COLOR][/URL][/COLOR][/COLOR][/CENTER]
[CENTER] [/CENTER]
[CENTER][URL="http://www.ultimatetalkforums.com"][IMG]http://i94.photobucket.com/albums/l82/Altunozara/userbar2.jpg[/IMG][/URL][/CENTER]
[CENTER][SIZE=3]i [/SIZE][URL="http://forums.qj.net/www.gamingwell.com"][SIZE=3]wonder what could be under this hyperlink..hmm[/SIZE][/URL][/CENTER]
[CENTER][SIZE=3][COLOR=green][B][I]Maniakc is awsome!!![/I][/B][/COLOR][/SIZE][/CENTER]
[CENTER][FONT=Arial Black][SIZE=3][COLOR=#660099][I][U][URL="http://forums.qj.net/member.php?u=58299"]The Brain Pwns!!![/URL][/U][/I][/COLOR][/SIZE][/FONT][/CENTER]

[COLOR=sienna]Creator of:[/COLOR][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-go-go-go-beta-66652.html"][COLOR=sienna]GO GO GO![/COLOR][/URL]
altunozara is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-11-2007, 08:43 AM   #2
 
 
My Mood: Bored
Join Date: Apr 2006
Location: England ~¦¦¦|+|¦¦¦~
Posts: 1,112
Trader Feedback: 0
Default

this may answer your question:

Code:
#include <string.h>
#include <iostream>
using namespace std;
int main()
{
char text[20];
cin>> text;
cin.ignore();
if(strcmp(text, "Hello") == 0)
    cout<<"Hello!";
cin.get();
return 0;
}
the computer will answer: "Hello!" if you type "Hello".
__________________
...Just Returned To The Scene...
JaSo PsP is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-11-2007, 08:49 AM   #3
 
altunozara's Avatar
 
Join Date: Feb 2006
Location: www.ultimatetalkforums.com Games, RPG, quickchat and more!
Posts: 531
Trader Feedback: 0
Default

is that c...or c++?
__________________
[CENTER][COLOR=black][COLOR=black][URL="http://forums.qj.net/f-psp-firmware-discussion-253/t-psp-firmware-30-get-it-58053.html"][COLOR=cyan]would you upgrade?[/COLOR][/URL] [/COLOR][FONT=Times New Roman][COLOR=navy][URL="http://www.mindistortion.net/iwantyoursoul/?i_am=altunozara"]OMG ITS REAL![/URL][/COLOR][/FONT][COLOR=black] [URL="http://forums.qj.net/showthread.php?t=61756&page=1&pp=10"][COLOR=lime]Sony vs Nintendo[/COLOR][/URL][/COLOR][/COLOR][/CENTER]
[CENTER] [/CENTER]
[CENTER][URL="http://www.ultimatetalkforums.com"][IMG]http://i94.photobucket.com/albums/l82/Altunozara/userbar2.jpg[/IMG][/URL][/CENTER]
[CENTER][SIZE=3]i [/SIZE][URL="http://forums.qj.net/www.gamingwell.com"][SIZE=3]wonder what could be under this hyperlink..hmm[/SIZE][/URL][/CENTER]
[CENTER][SIZE=3][COLOR=green][B][I]Maniakc is awsome!!![/I][/B][/COLOR][/SIZE][/CENTER]
[CENTER][FONT=Arial Black][SIZE=3][COLOR=#660099][I][U][URL="http://forums.qj.net/member.php?u=58299"]The Brain Pwns!!![/URL][/U][/I][/COLOR][/SIZE][/FONT][/CENTER]

[COLOR=sienna]Creator of:[/COLOR][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-go-go-go-beta-66652.html"][COLOR=sienna]GO GO GO![/COLOR][/URL]
altunozara is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-11-2007, 08:52 AM   #4
Banned for LIFE
 
Join Date: Oct 2006
Location: East London, England
Posts: 2
Trader Feedback: 0
Default

stop moose. Go read some more. Jaso, how would that code look in C ?

currently i only use #define hello 1 and go along like that which i'm sure is a terrible way to do it.
eldiablov is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-11-2007, 08:52 AM   #5

Developer
 
Raphael's Avatar
 
Join Date: Jan 2006
Location: Germany
Posts: 919
Trader Feedback: 0
Default

Both actually.
__________________
Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
Raphael is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-11-2007, 09:20 AM   #6
 
altunozara's Avatar
 
Join Date: Feb 2006
Location: www.ultimatetalkforums.com Games, RPG, quickchat and more!
Posts: 531
Trader Feedback: 0
Default

how do you guys think im doing? so far i ahve this for my bot...

#include <string.h>
#include <iostream>
using namespace std;
int main()
{
char text[20];
int number;
char sup[20];
char text2[20];
cout<<"Botty: Hey there! Im botty. Whats your name?\n";
cin>> text;
cin.ignore();
cout<<"Botty: Hey "<< ( text ) <<"! How old are you?\n";
cin>> number;
cout<<"Botty: "<< ( number ) <<"... I remember being "<< ( number ) <<". Yeh... those were the days. So whats going on?\n";
cin>> sup;
cout<<"Botty: Oooh! That sounds fun! :-)\n";
cin>> text2;
}

except how do i make it so if they dont say something that i want them to say like...test then it sais sorry i dont know how to respond to that...?
__________________
[CENTER][COLOR=black][COLOR=black][URL="http://forums.qj.net/f-psp-firmware-discussion-253/t-psp-firmware-30-get-it-58053.html"][COLOR=cyan]would you upgrade?[/COLOR][/URL] [/COLOR][FONT=Times New Roman][COLOR=navy][URL="http://www.mindistortion.net/iwantyoursoul/?i_am=altunozara"]OMG ITS REAL![/URL][/COLOR][/FONT][COLOR=black] [URL="http://forums.qj.net/showthread.php?t=61756&page=1&pp=10"][COLOR=lime]Sony vs Nintendo[/COLOR][/URL][/COLOR][/COLOR][/CENTER]
[CENTER] [/CENTER]
[CENTER][URL="http://www.ultimatetalkforums.com"][IMG]http://i94.photobucket.com/albums/l82/Altunozara/userbar2.jpg[/IMG][/URL][/CENTER]
[CENTER][SIZE=3]i [/SIZE][URL="http://forums.qj.net/www.gamingwell.com"][SIZE=3]wonder what could be under this hyperlink..hmm[/SIZE][/URL][/CENTER]
[CENTER][SIZE=3][COLOR=green][B][I]Maniakc is awsome!!![/I][/B][/COLOR][/SIZE][/CENTER]
[CENTER][FONT=Arial Black][SIZE=3][COLOR=#660099][I][U][URL="http://forums.qj.net/member.php?u=58299"]The Brain Pwns!!![/URL][/U][/I][/COLOR][/SIZE][/FONT][/CENTER]

[COLOR=sienna]Creator of:[/COLOR][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-go-go-go-beta-66652.html"][COLOR=sienna]GO GO GO![/COLOR][/URL]
altunozara is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-11-2007, 11:17 AM   #7
 
 
My Mood: Bored
Join Date: Apr 2006
Location: England ~¦¦¦|+|¦¦¦~
Posts: 1,112
Trader Feedback: 0
Default

if you want it to dynamically answer questions, your going the wrong way about it, if you want a bot to work that way you want it, you will need to include a while loop. That, my friend, is the next thing you shall learn in C++.
__________________
...Just Returned To The Scene...
JaSo PsP is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
bot

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 12:40 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us