![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Apr 2005
Location: Uk
Posts: 68
Rep Power: 4
![]() |
Ok, so i was sat playing the ps2 (san andreas) when i start shuffling through sheets and sheets of cheats that i had for the game.. and thought to my self, now wouldn't it be easier, i i just had to type in the game name, and the cheat i wanted, so thats exactly what this program does!! ok, you'll need to add your own directory of cheats, just browse the net, find the cheats, and then..
make a new folder, and in that older save a txt file with the cheats.. for example. grand thet auto <-- folder name / game to search in first part of prog walkthrough.txt <--- walk through san andreas.txt <---- cheats for san andreas.. etc etc.. you get the idea!! they need to be in lower case in order for it to work.. Now for the code. Change the CAPS section for the root path.. and enjoi.. It ain't perfect, and there is alot that can be improved, but it was just a quick mock up.. enjoi. import sys, fileinput, os
print """
Cheat Console Search Engine
In depth search engine,
Will search via game name,
Then Give a list of game sets!!
Then Choose To Search All, Or Search Via A Match!
SaturN Cheat Search Engine
"""
def Main():
search = raw_input("Search For A Game? Or Add Cheats N will exit!(Y/N/A)? ")
if search.lower() == "n":
exit = raw_input("Press Enter To Close \n")
elif search.lower() == "a":
print "Unable To Add At This Time"
Main()
elif search.lower() == "y":
game = raw_input("Enter Game Name_ \n")
Search(game)
else:
print "Wrong Command!!"
Main()
def Search(game):
num = 1
cheatlistpath = "ENTER ROOT DIRECTORY FOR CHEATS FOLLOWED BY \\"
if game.lower() == "all":
for file in os.listdir(cheatlistpath):
print "Game",num ,"\n",file,"\n"
num +=1
print "End Of List"
num = 1
Main()
else:
cheatlist = ["ENTER ROOT DIRECTORY FOR CHEATS FOLLOWED BY \\"]
if game in os.listdir(cheatlistpath):
cheatlist.append(game)
gameview = cheatlist
cheatlist = "".join(cheatlist)
for file in os.listdir(cheatlist):
print "Cheat Set" ,num, "\n",file,"\n"
num +=1
num = 1
print "End Of List \n"
view = [raw_input("Enter Game Set To View? ")]
view.append(".txt")
view = "".join(view)
gameview.append("\\")
gameview.append(view)
gameview = "".join(gameview)
if view in os.listdir(cheatlist):
cheats = open(gameview, 'r').readlines()
search = raw_input("Match Cheat or View All? \n Please Note, On Walkthroughs It's best to view all! \n (M/A)? ")
if search.lower() == "a":
for line in cheats:
print line
if search.lower() == "m":
match = raw_input("Enter Word To Match? \n List Can Be Execesive! \n >> ")
for line in cheats:
if line.find(match) >= 0:
print line
else:
print "Set Not Found! \nGoing to main menu"
Main()
else:
print "Game Not Found"
Main()
Main()
__________________
while me is alive: make(life,simple) |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|