Log In
Fairy Weather Castform Don't have an account yet? Register now!
.

Forum Thread

old diary that might come in handy later

Forum-Index Diaries old diary that might come in handy later
BoomBoy
OFFLINE
Trainerlevel: 77

Forum Posts: 605
Posted: Tue, 02/02/2021 10:02 (3 Years ago)
testoo
BoomBoy
OFFLINE
Trainerlevel: 77

Forum Posts: 605
Posted: Tue, 02/02/2021 10:12 (3 Years ago)

Title: AUTOMATIC CLICKLIST GENERATOR

clues in the title. instructions are in the code. the only library required is subprocess, for copying to the clipboard, but if you cant be bothered put a # before line 1 and line 49. line 49 may throw an error on mac; i think you need to change the "clip" parameter to something but not sure what lol.

code:
Show hidden content
import subprocess
print("Below each of the prompts copy-paste the pokemon profile, page, interaction screen or something with its id in, it doesnt really matter lol. to compile the clicklist, type 'stop'.")

def get():
links = []
link = input("link to add to clicklist: ")
while link != "stop" and link != "":
links.append(link)
link = input("link to add to clicklist: ")
return links

def splicer(links):
IDs = []
for link in links:
print(link)
idPassed = False
start = 0
for i in range(0,len(link)):
char = link[len(link)-i-1]
if char in "1234567890" and not idPassed:
idPassed = True
end = i
if not char in "1234567890" and idPassed:
start = i
break
IDs.append(link[len(link)-(start):len(link)-(end)])
return IDs

def compiler(IDs):
clicklist = "https://pokeheroes.com/pokemon_lite?cl_type=custom"
ret = input("Whos profile would you like this clicklist to return you to? Leave blank for none: ")
if ret != "":
clicklist += "&ret=userprofile?name%3D"
clicklist += ret

count=0
for ID in IDs:
print(ID)
clicklist += "&id%5B%5D="
clicklist += ID
count +=1
print("Your clicklist has "+str(count)+" mons in it :)")
return clicklist

loop = "abc"
while loop != "":
links = get()
print("\nworking...")
IDs = splicer(links)
clicklist = compiler(IDs)
subprocess.run("clip", universal_newlines=True, input=clicklist)
print("Your custom clicklist has been created and copied to your clipboard.\n\nClicklist:" + clicklist)
loop = input("\nWould you like to create another clicklist? if you would like to exit the program just hit enter, otherwise type anything: ")

its fairly simple: get() takes a list from a series of inputs; splicer() takes the last run of numbers from the string - you can put the pokemon id eg. "30966933", the pokemon page eg. "https://pokeheroes.com/pokemon?id=30966933" or anything basically containing the pokemon id eg. "so this is a bunch of text that the program is gonna ignore and the id of the pokemon is 30966933 and then a bit more text just to prove the program's potency" and all three when put through splicer will return 30966933; and compiler() will take the list of pokemon IDs, create the clicklist, ask if you want to return to someone's profile and iterate through the list adding each one to the link. fairly simple ig. oh yeah then the main block takes the link, prints it, copies it to your clipboard, and asks you if you would like to create another (for QoL ig)

any queries dont hesitate to palpad me :D
BoomBoy
OFFLINE
Trainerlevel: 77

Forum Posts: 605
Posted: Sun, 28/02/2021 10:43 (3 Years ago)

Title: Hangman practisificationiser

uh yeah so this one requires quite a few files :) but its pretty cool
images are linked btw

Quote from filesHANGMAN
-> hangman.py
-> graphics.py
-> scores.txt
-> hangmen
|--> 0.png
|--> 1.png
|--> 2.png
|--> 3.png
|--> 4.png
|--> 5.png
|--> 6.png

inside scores.txt write this:
Quote from scores.txt
0 current streak
0 highest streak
0 total won
0 total won this run


um. fairly self-explanatory i think? this also requires the random module :)
Show hidden content
from graphics import *
import random as r

database = ["concentration", "trainerpoints", "mew", "muk", "advent raffle ticket", "celadon city gym", "deep sea scale", "deep sea tooth", "dream world shop", "easter egg hunt", "egg radar chip", "elite four drake", "elite four glacia", "elite four phoebe", "ever grande city", "global trade station", "golden game chip", "golden game chips", "higher or lower", "ice cream cornet", "large candy bag", "mega easter lopunny", "mega mewtwo x", "mewton m meowth", "new bark town", "old amber fossil", "prof rowans lab", "red lunar wing", "roar of time", "suggest a word", "wonder trade station", "absorb bulb", "acid armor", "acro bike", "advanced path", "aerial ace", "aguav berry", "air balloon", "alpha sapphire", "amulet coin", "ancient cave", "anger point", "anniversary gift", "apicot berry", "armor fossil", "ash ketchum", "aspear berry", "aspertia city", "attack order", "auction house", "aura sphere", "aurora beam", "autumn abra", "autumn alakazam", "autumn kadabra", "babiri berry", "badge case", "badge set", "battle frontier", "battle shop", "battle team", "beginner path", "belue berry", "berry garden", "big mushroom", "big nugget", "big nuggets", "big root", "black kyurem", "blast burn", "blaze kick", "blue flute", "blue meteorite", "blue orb", "bluk berry", "brave bird", "bright beach", "brown sack", "bubble beam", "bug gem", "buried relic", "burn drive", "burn heal", "candy belly", "capture rate", "castform cast", "catch rate", "celadon city", "cerulean city", "cerulean gym", "champion alder", "champion cynthia", "champion diantha", "champion steven", "champion wallace", "charti berry", "cheri berry", "chesto berry", "chilan berry", "chill drive", "chople berry", "claw fossil", "coba berry", "colbur berry", "cornn berry", "cosplay pikachu", "cover fossil", "crystal crossing", "current weather", "cursed rapidash", "custap berry", "daily reward", "dark gem", "dark orb", "dark ponyta", "dawn stone", "day care", "daycare man", "daycare owner", "dazzling gleam", "desolate land", "dire hit", "discount coupon", "disguised exeggcute", "distortion world", "dome fossil", "doom desire", "double slap", "douse drive", "dowsing machine", "dowsing mchn", "draco meteor", "draco plate", "dragon ascent", "dragon dance", "dragon gem", "dragon rage", "dragon rush", "dragon scale", "dragon type", "draining kiss", "dread plate", "dream ball", "dream world", "drenched bluff", "drill rotom", "dubious disc", "durin berry", "dusk stone", "earth plate", "easter buneary", "easter bunnelby", "easter diggersby", "easter egg", "easter eggs", "easter event", "easter hunt", "easter lopunny", "egg hunt", "egg radar", "egg storage", "electric gem", "elite four", "emera bank", "emera beach", "emera mall", "emera square", "emera town", "endless path", "enigma berry", "enigma pearl", "enigma stone", "eon ticket", "eternal tower", "event distribution", "event egg", "event pass", "event pokemon", "event shop", "exp share", "explorer bag", "explorer kit", "fairy gem", "fan rotom", "fashion case", "festival gardevoir", "fiery furnace", "fiesta larvesta", "fighting gem", "figy berry", "fire blast", "fire fang", "fire gem", "fire punch", "fire stone", "fire type", "fist plate", "flame orb", "flame plate", "flame thrower", "flame wheel", "flare blitz", "flash fire", "flower boy", "flower girl", "flying gem", "foggy castform", "forum thread", "frenzy plant", "frost rotom", "full potion", "fury cutter", "fury swipes", "game center", "game chip", "game chips", "game freak", "gameboy advance", "ganlon berry", "gary oak", "gem collector", "gem cauldron", "gem exchange", "ghost gem", "giga impact", "giratina quest", "glacier palace", "glitch city", "golden pokeball", "golden slot", "gracidea flower", "grass gem", "great ball", "green orb", "grepa berry", "griseous orb", "ground gem", "gym badge", "haban berry", "halloween sweets", "harvest sprite", "hazy pass", "heal order", "heart scale", "heat rotom", "helix fossil", "helping hand", "hidden ability", "hidden power", "hoenn certificate", "hondew berry", "honey iar", "honey tree", "hydro cannon", "hydro pump", "hyper beam", "iapapa berry", "ice beam", "ice gem", "ice heal", "ice punch", "ice shard", "icicle plate", "indigo league", "insect plate", "iron defense", "iron plate", "iron tail", "item bag", "item delivery", "item shop", "jaboca berry", "jade orb", "jaw fossil", "johto certificate", "kalos certificate", "kanto certificate", "kanto league", "kasib berry", "kebia berry", "kee berry", "kelpsy berry", "key stone", "knight axew", "lake valor", "lansat berry", "lava cookie", "lavender town", "leaf stone", "leech life", "legendary dogs", "leppa berry", "liechi berry", "light ball", "light screen", "light stone", "lightstone cave", "link cable", "littleroot town", "lord salamance", "lum berry", "lunar wing", "mach bike", "machine part", "magical leaf", "mago berry", "magost berry", "maranga berry", "marine cave", "master ball", "max repel", "meadow plate", "medal rally", "mega able", "mega aggron", "mega alakazam", "mega audino", "mega banette", "mega charizard", "mega diancie", "mega evolution", "mega gallade", "mega garchomp", "mega gengar", "mega glalie", "mega lopunny", "mega mawile", "mega mewtwo", "mega pidgeot", "mega pokemon", "mega rayquaza", "mega ring", "mega sableye", "mega salamence", "mega scizor", "mega steelix", "mega stone", "mega yorebro", "metal coat", "meteorite castform", "mewtwonite y", "micle berry", "mind plate", "misc settings", "misdreavus cosplay", "mixer rotom", "moomoo milk", "moomoo ranch", "moon stone", "mossdeep city", "mossy forest", "mow rotom", "mr bagon", "mr mime", "mt moon", "mt silver", "mysterious tree", "mystery box", "mystery dungeon", "mystery egg", "mystery key", "nanab berry", "night slash", "nightmare munna", "nintendo ds", "nomel berry", "normal gem", "notification wall", "nurse ioy", "nuvema town", "oblivion wing", "occa berry", "odd incense", "officer ienny", "old amber", "omega ruby", "ominous wind", "oran berry", "orange islands", "oval stone", "pal pad", "pallet town", "pamtre berry", "paralyze heal", "pass orb", "passho berry", "payapa berry", "pecha berry", "permanent ban", "persim berry", "petal dance", "petaya berry", "pika pika", "pinap berry", "pixie plate", "plume fossil", "pocket monsters", "poison gem", "poke ball", "pokeheroes wiki", "pokemon amie", "pokemon league", "pokemon master", "pokemon movie", "pokemon ranger", "pokeradar chain", "poll manager", "pomeg berry", "power anklet", "power band", "power belt", "power bracer", "power lens", "power weight", "primal groudon", "primal kyogre", "primal reversion", "primordial sea", "princess smoochum", "prism scale", "prison bottle", "privacy policy", "private message", "prize exchange", "pro path", "prof birch", "prof rowan", "professor birch", "professor oak", "professor rowan", "psychic gem", "puzzle collection", "qualot berry", "queen iynx", "quick attack", "quick ball", "rabuta berry", "radio tower", "rain badge", "rain dance", "rainbow wing", "rambo rumble", "rare bone", "rare candy", "rawst berry", "razor claw", "razor fang", "razor leaf", "razz berry", "reaper cloth", "red meteorite", "red orb", "relic band", "relic copper", "relic crown", "relic gold", "relic silver", "relic statue", "relic vase", "resolute stone", "retro starters", "rindo berry", "rock blast", "rock gem", "rocky cave", "rodeo scraggy", "root fossil", "roseli berry", "rowap berry", "royal tunnel", "ruby valley", "rumble area", "rumble mission", "rumble missions", "run away", "sacred ash", "safari ball", "safari zone", "sail fossil", "salac berry", "santa birb", "santa bird", "scary glasses", "scope lens", "secret base", "seed bomb", "seller clothes", "shiny chaining", "shiny charm", "shiny ditto", "shiny hunt", "shiny sprite", "shiny stone", "shoal shell", "shock drive", "shuca berry", "silent forest", "silph co", "silver wing", "sinnoh certificate", "sir haxelot", "sir shelgon", "sitrus berry", "skull fossil", "sky pillar", "sky plate", "sky uppercut", "slow start", "small nugget", "snowy castform", "snowy mountains", "soda pop", "solar beam", "soothe bell", "space spinda", "spear pillar", "speed click", "spelon berry", "splash plate", "spooky manor", "spooky plate", "spray duck", "spring ampharos", "spring flaaffy", "spring mareep", "spring update", "ss anne", "ss aqua", "ss tidal", "star piece", "starf berry", "steam eruption", "steel gem", "steven stone", "stone plate", "string shot", "strong earthquakes", "sugar shock", "summer ampharos", "sun stone", "super breloomio", "super honey", "super rod", "super shroom", "super training", "surfing pikachu", "sweet heart", "swords dance", "tail whip", "tall grass", "tamato berry", "tanga berry", "team aqua", "team flare", "team magma", "team plasma", "team rocket", "technical machine", "terra cave", "thunder punch", "tiny mushroom", "tom nook", "toxic orb", "toxic plate", "trainer red", "treasure hunt", "twinleaf town", "ultra ball", "union cave", "union room", "unova certificate", "van bagon", "vaniville town", "vine whip", "viridian city", "volt absorb", "volt switch", "volt tackle", "vs seeker", "wacan berry", "wailmer pail", "wash rotom", "water gem", "water gun", "water stone", "watmel berry", "weather balloon", "weather channel", "weather forecast", "wepear berry", "whipped dream", "white hand", "white kyurem", "wide lens", "wiki berry", "windy prairie", "winter camerupt", "winter numel", "wonder guard", "wonder trade", "wood hammer", "x attack", "x defense", "x speed", "yache berry", "yellow forest", "yellow meteorite", "zap cannon", "zap plate", "zero isle", "abra", "aqua", "aron", "axew", "bold", "chef", "iynx", "natu", "onix", "sawk", "seel", "uxie", "xatu", "absol", "aipom", "almia", "anime", "azelf", "badge", "bagon", "beach", "berry", "black", "brock", "bugsy", "candy", "catch", "cilan", "clair", "curse", "deino", "ditto", "doduo", "eevee", "ekans", "ember", "emera", "ether", "event", "fairy", "fiore", "flare", "flash", "forum", "ghost", "gible", "gloom", "golem", "goomy", "grass", "growl", "hatch", "hoenn", "hoggy", "honey", "inkay", "iames", "iohto", "kalos", "kanto", "klang", "klink", "lance", "level", "lotad", "lugia", "luxio", "mimic", "minun", "misty", "mouse", "muggy", "munna", "nappy", "nessy", "numel", "omega", "paras", "party", "pichu", "quest", "ralts", "retro", "riolu", "rival", "rotom", "round", "route", "rowan", "royal", "rules", "salon", "shinx", "shiny", "snivy", "spore", "staff", "staid", "swift", "tepig", "throh", "timid", "toxic", "trade", "types", "unova", "unown", "users", "wally", "water", "yanma", "zorua", "zubat", "adaptability", "aromatherapy", "casteliacone", "crabominable", "deepseascale", "deepseatooth", "flamethrower", "interactions", "notification", "slowpoketail", "thundershock", "thunderstone", "tinymushroom", "trainerlevel", "trainerpoint", "undiscovered", "buttercream", "cocktaillon", "electirizer", "ferrerocoal", "fletchinder", "frustration", "gemcauldron", "gemexchange", "interaction", "lucarionite", "pachirisnow", "sandcrustle", "scattercube", "synchronize", "thunderbolt", "acrobatics", "aerodactyl", "applewoodo", "aromatisse", "barbaracle", "bellsprout", "bonemerang", "bouffalant", "butterfree", "carracosta", "catercream", "chandelure", "charmander", "charmeleon", "chesnaught", "cofagrigus", "conkeldurr", "crabhammer", "crabrawler", "darmanitan", "dirndltank", "earthquake", "eelektross", "electabuzz", "electivire", "escavalier", "feraligatr", "ferrothorn", "fletchling", "forretress", "friendship", "galvantula", "gamecenter", "generation", "gingergoat", "gothitelle", "groomicott", "helioptile", "herowalker", "hippopotas", "hitmonchan", "honeycombs", "ikkakugong", "incineroar", "iigglypuff", "kangaskhan", "karrablast", "kricketune", "krookodile", "lickilicky", "lillibride", "magmarizer", "masquerain", "misdreavus", "moderators", "playground", "pokedollar", "pokeheroes", "pokewalker", "roggenrola", "sandwebble", "scatterbug", "seismitoad", "spewbrella", "talonflame", "tentacruel", "togedemaru", "typhlosion", "valenfloon", "victreebel", "weepinbell", "whimsicott", "whirlipede", "wigglytuff", "abomasnow", "aegislash", "aggronite", "alomomola", "amoonguss", "awakening", "azumarill", "bastiodon", "beautifly", "bellossom", "blastoise", "blossomly", "bulbasaur", "cacophony", "carnivine", "charizard", "charjabug", "chikorita", "chingling", "clauncher", "clawfairy", "clawitzer", "clicklist", "combusken", "community", "constrict", "cosmoneon", "cottonblu", "crawdaunt", "cresselia", "cryogonal", "cuddlithe", "cyndaquil", "decidueye", "derpatung", "diggersby", "discharge", "dragonair", "dragonite", "druddigon", "dunsparce", "eelektrik", "electrike", "electrode", "everstone", "evolution", "excadrill", "exeggcute", "exeggutor", "ferroseed", "frogadier", "gardevoir", "girafarig", "gothorita", "gourgeist", "growlithe", "heliolisk", "heracross", "hippowdon", "hitmonlee", "hitmontop", "honchkrow", "honeycomb", "honeytree", "hydreigon", "igglybuff", "infernape", "iellicent", "iudgement", "klinklang", "kricketot", "larviprop", "latiasite", "leftovers", "legendary", "lepreowth", "lickitung", "lightblim", "lilligant", "lovemeter", "machotide", "magmortar", "magnemite", "magnezone", "mamoswine", "mandibuzz", "manectric", "marshtomp", "metacream", "metagross", "metronome", "mightyena", "mismagius", "missingno", "nidoqueen", "ninetails", "ninetales", "octazooka", "octillery", "pachirisu", "palossand", "palpitoad", "paralysis", "paralyzed", "pidgeotto", "piloswine", "pokeblock", "pokeradar", "pokeworld", "poliwhirl", "poliwrath", "poochyena", "probopass", "professor", "protector", "pumpkaboo", "quilladin", "rampardos", "regigigas", "registeel", "relicanth", "reuniclus", "rhyperior", "salamence", "sandshrew", "sandslash", "sandstorm", "sandygast", "scolipede", "serperior", "shiinotic", "shroomish", "spiritomb", "sprayduck", "staraptor", "stoutland", "sudowoodo", "tangrowth", "teddiursa", "telepathy", "tentacool", "terrakion", "thundurus", "toucannon", "toxicroak", "tranquill", "trevenant", "tyranitar", "tyrantrum", "valentine", "vanillish", "vanillite", "vanilluxe", "venoshock", "vespiquen", "vileplume", "volcarona", "wartortle", "wobbuffet", "zebstrika", "zigzagoon", "accelgor", "alakazam", "ampharos", "antidote", "apricorn", "arcaddly", "arcanine", "archeops", "articuno", "barboach", "beachamp", "beedrill", "beheeyem", "bergmite", "berrydex", "blaziken", "braviary", "bronzong", "bunnelby", "cacturne", "camerupt", "candaria", "carvanha", "castform", "caterpie", "champion", "chatquiz", "chimchar", "chimecho", "chinchou", "chocoluv", "cinccino", "clamperl", "clefable", "clefairy", "cloyster", "cobalion", "coinflip", "contrary", "corphish", "cottonee", "cranidos", "croagunk", "croconaw", "darumaka", "database", "delcatty", "delibird", "delivery", "doublade", "dragalge", "dralucha", "drifblim", "driflamp", "drifloon", "ducklett", "dusclops", "dusknoir", "electric", "empoleon", "eviolite", "fennekin", "floatzel", "frillish", "froslass", "gambling", "gametime", "garbodor", "garchomp", "genesect", "geomancy", "gigalith", "giratina", "glaciate", "gomaseel", "gorebyss", "gracidea", "granbull", "graveler", "greninja", "gumshoos", "gyarados", "hariyama", "hawlucha", "heartomb", "herochat", "hoothoot", "houndoom", "houndour", "illumise", "illusion", "interact", "iesterig", "iumpluff", "kabutops", "krokorok", "landorus", "larvesta", "larvitar", "leavanny", "lemonade", "lillipup", "ludicolo", "lumineon", "lunatone", "magcargo", "magikarp", "magneton", "makuhita", "maractus", "mareanie", "medicham", "meditite", "meganium", "meloetta", "meowstic", "mienshao", "mikoshao", "minccino", "monferno", "morelull", "mudsdale", "munchlax", "musharna", "mushroom", "nidoking", "nidorina", "nidorino", "nintendo", "nosepass", "oshawott", "overheat", "parasect", "pawniard", "pelipper", "perchaun", "phantump", "pokeball", "pokegear", "pokehero", "polestar", "politoed", "primeape", "prinplup", "purrloin", "quagsire", "qwilfish", "raitoshi", "ranklist", "rapidash", "raticate", "rayquaza", "regirock", "remoraid", "reshiram", "ribombee", "roleplay", "roserade", "rumbling", "samurott", "sapphire", "sceptile", "settings", "sewaddle", "sharpedo", "shedinja", "shellder", "shieldon", "shipping", "sigilyph", "simipour", "simisage", "simisear", "skarmory", "skiploom", "skuntank", "slowking", "slowpoke", "slowyore", "slurpuff", "smeargle", "smoochum", "snowbuck", "snowling", "snubbull", "spinarak", "spritzee", "squirtle", "stantler", "staravia", "stardust", "starters", "strength", "struggle", "stunfisk", "sunflora", "swadloon", "swampert", "tirtouga", "togekiss", "tornadus", "torracat", "torterra", "totodile", "training", "trapinch", "treasure", "trubbish", "trumbeak", "tsareena", "unfezant", "ursaring", "userlist", "username", "vaporeon", "venipede", "venomoth", "venusaur", "vigoroth", "virizion", "vivillon", "whiscash", "yoreking", "zangoose", "zweilous", "agility", "altaria", "ambipom", "anorith", "ariados", "armaldo", "auction", "aurorus", "avalugg", "azurill", "banette", "bayleef", "beartic", "begging", "bibarel", "binacle", "bisharp", "blissey", "blitzle", "boldore", "braixen", "breloom", "brionne", "bronzor", "buneary", "calcium", "carbink", "cascoon", "chansey", "cherrim", "cherubi", "chespin", "claydol", "contest", "corsola", "cosmoem", "cradily", "crustle", "cubchoo", "cynthia", "darkrai", "dartrix", "daycare", "dedenne", "defense", "delphox", "dewgong", "diancie", "diglett", "donphan", "drapion", "dratini", "drilbur", "drowzee", "dugtrio", "dungeon", "duosion", "duskull", "dwebble", "element", "emerald", "exploud", "fainted", "finneon", "fishing", "flaaffy", "flareon", "foongus", "fraxure", "froakie", "furfrou", "gallade", "gameboy", "geodude", "ghetsis", "glaceon", "glameow", "gliscor", "gloweon", "goldeen", "golduck", "gothita", "groudon", "grovyle", "grubbin", "grumpig", "gurdurr", "hangman", "happiny", "harvest", "hashtag", "haunter", "haxorus", "heatmor", "heatran", "herdier", "honedge", "huntail", "ivysaur", "iirachi", "iolteon", "iuniper", "kadabra", "kecleon", "ketchum", "kinesis", "kingdra", "kingler", "koffing", "lampent", "lanturn", "leafeon", "liepard", "linoone", "litwick", "lopunny", "lottery", "loudred", "lucario", "lumiday", "luvdisc", "machamp", "machoke", "malamar", "manaphy", "mantine", "mantyke", "marowak", "mesprit", "metapod", "mienfoo", "mikofoo", "milotic", "miltank", "mission", "moltres", "mudbray", "murkrow", "nincada", "ninjask", "noctowl", "noivern", "nuzleaf", "omanyte", "omastar", "pancham", "pangoro", "panpour", "pansage", "pansear", "persian", "petilil", "pidgeot", "pignite", "pikachu", "plushie", "pokedex", "pokemon", "pokerus", "poliwag", "porygon", "protein", "psychic", "psyduck", "pupibot", "pupitar", "purugly", "quilava", "rattata", "raylong", "remakes", "rhyhorn", "roselia", "rufflet", "sableye", "sandile", "satochu", "scanner", "scrafty", "scraggy", "scyther", "seaking", "seatran", "sentret", "servine", "seviper", "shaymin", "shelgon", "shelmet", "shiftry", "shinies", "shuckle", "shuppet", "silcoon", "skorupi", "slaking", "slakoth", "sliggoo", "slowbro", "sneasel", "snorlax", "snorunt", "solosis", "solrock", "spearow", "spriter", "starmie", "starter", "steelix", "steenee", "suicune", "sunkern", "surskit", "swagger", "swellow", "swirlix", "swoobat", "sylveon", "taillow", "tangela", "timburr", "togetic", "toraros", "torchic", "torkoal", "toxapex", "trading", "trainer", "treecko", "tropius", "turtwig", "tympole", "tyrogue", "umbreon", "venonat", "vibrava", "victini", "vitamin", "volbeat", "volkner", "voltorb", "vullaby", "wailmer", "wailord", "walrein", "watchog", "weather", "weavile", "weezing", "whismur", "wingull", "wurmple", "xerneas", "yanmega", "yorebro", "yveltal", "zomppet", "zoroark", "zygarde", "aggron", "amaura", "arceus", "archen", "attack", "audino", "aurora", "avatar", "baltoy", "battle", "beldum", "bidoof", "bonsly", "bubble", "buizel", "cacnea", "carbos", "celebi", "chatot", "clawfa", "cleffa", "combee", "crobat", "cubone", "deoxys", "dewott", "dialga", "dodrio", "dragon", "drampa", "durant", "dustox", "eggdex", "elekid", "elgyem", "emboar", "emolga", "espeon", "espurr", "fearow", "feebas", "flygon", "flying", "fossil", "frozen", "furret", "gabite", "gaming", "gastly", "gengar", "glalie", "gligar", "glitch", "gogoat", "golbat", "golett", "golurk", "goodra", "grimer", "grotle", "ground", "gulpin", "harden", "helper", "hoppip", "horsea", "impish", "joltik", "kabuto", "kakuna", "keldeo", "kirlia", "klefki", "komala", "krabby", "kyogre", "kyurem", "lairon", "lapras", "latias", "latios", "ledian", "ledyba", "legend", "lileep", "litleo", "lombre", "luxray", "machop", "magmar", "mankey", "mareep", "marill", "master", "masuda", "mawile", "meowth", "metang", "mewtwo", "milker", "mothim", "mudkip", "noibat", "normal", "nugget", "oddish", "palkia", "palpad", "patrat", "phanpy", "phione", "pickup", "pidgey", "pidove", "pineco", "pinsir", "piplup", "plusle", "poison", "ponyta", "potion", "primal", "puzzle", "pyroar", "raffle", "raichu", "raikou", "regice", "rescue", "revive", "rhydon", "rokkyu", "rumble", "sachet", "safari", "scizor", "seadra", "sealeo", "seedot", "serena", "sinnoh", "skiddo", "skitty", "skrelp", "skugar", "slugma", "snover", "spewpa", "spheal", "spinda", "spoink", "sprite", "starly", "staryu", "steven", "stunky", "summon", "swablu", "swalot", "swanna", "swinub", "tackle", "tauros", "togepi", "truant", "tunnel", "tynamo", "tyrunt", "uproar", "vulpix", "weedle", "woobat", "wooper", "wynaut", "yamask", "zapdos", "zekrom"]

def main(prev=0):
mainWin = GraphWin("",800,200)
bg = Rectangle(Point(0,0),Point(200,200))
bg.setFill("#FF3333")
bg.draw(mainWin)
if prev==1: text = Text(Point(100,100),"PLAY SINGLEPLAYER
AGAIN")
else: text = Text(Point(100,100),"PLAY SINGLEPLAYER")
text.setTextColor("#0000FF")
text.setStyle("bold")
text.draw(mainWin)

bg = Rectangle(Point(200,0),Point(400,200))
bg.setFill("#FF33FF")
bg.draw(mainWin)
if prev==2: text = Text(Point(300,100),"PLAY MULTIPLAYER
AGAIN")
else: text = Text(Point(300,100),"PLAY MULTIPLAYER")
text.setTextColor("#FFFF00")
text.setStyle("bold")
text.draw(mainWin)

bg = Rectangle(Point(400,0),Point(600,200))
bg.setFill("#3333FF")
bg.draw(mainWin)
text = Text(Point(500,100),"EXIT GAME")
text.setTextColor("#00FFFF")
text.setStyle("bold")
text.draw(mainWin)

bg = Rectangle(Point(600,0),Point(800,200))
bg.setFill("#000000")
bg.draw(mainWin)
text = Text(Point(700,100),"VIEW SCORES")
text.setTextColor("#FFFFFF")
text.setStyle("bold")
text.draw(mainWin)

click = 600
while click >= 600:
click = mainWin.getMouse().x
if click < 200:
mainWin.close()
choose(1)
elif click < 400:
mainWin.close()
choose(2)
elif click < 600: mainWin.close()
else: showScores()

def choose(players):
if players == 1:
word = database[r.randint(0,len(database)-1)]
#print(word)
guess(word,players)
else:
chooseWin = GraphWin("choose",600,100)
text = Text(Point(300,30),"CHOOSE A WORD FOR YOUR OPPONENT TO GUESS (make it hard :'P ) NO CAPS PLEASE")
text.setSize(12)
text.draw(chooseWin)
entry = Entry(Point(245,70),30)
entry.setFill("#CCCCCC")
entry.setText(database[r.randint(0,len(database))])
entry.draw(chooseWin)
button = Rectangle(Point(495,55),Point(595,95))
button.setFill("#00FF00")
button.draw(chooseWin)
text = Text(Point(545,75),"CHOOSE")
text.setSize(15)
text.setStyle("bold")
text.draw(chooseWin)

click = chooseWin.getMouse()
clickX,clickY = click.x,click.y

while clickX < 495 or clickX > 595 or clickY < 55 or clickY > 95:
click = chooseWin.getMouse()
clickX,clickY = click.x,click.y
chooseWin.close()
guess(entry.getText(),players)

def guess(word,players):
guessed = ""
for i in word:
if i == " ": guessed += " "
elif i in "abcdefghijklmnopqrstuvwxyz": guessed += "_"
else:
choose(players)
# print(guessed)
lives = 6
guessWin = GraphWin("guess",800,290)

Word = Text(Point(300,240),guessed)
Word.setSize(30)
Word.setFace("courier")
Word.draw(guessWin)

img = Image(Point(700,145),"hangmen/0.png")
img.draw(guessWin)
text = Text(Point(300,100),"TYPE A LETTER ON THE KEYBOARD")
text.draw(guessWin)

Guessed = False
while not Guessed and lives > 0:
guess = guessWin.getKey()
if not guess in "abcdefghijklmnopqrstuvwxyz": pass
else:
temp = ""

loseLife = True
Guessed = True
for i in range (len(word)):
# guessed += " "
if word[i] == " ": temp += " "
elif word[i] == guess:
temp += guess
loseLife = False
elif not (guessed[i] == "_"):
temp += guessed[i]
else:
temp += "_"
Guessed = False

if loseLife: lives -= 1
guessed = temp
Word.setText(temp)
Word.undraw()
Word.draw(guessWin)

img.undraw()
img = Image(Point(700,145),"hangmen/"+str(6-lives)+".png")
img.draw(guessWin)

scores = open("scores.txt","r")
curStreak = int(scores.readline()[0])
highStreak= int(scores.readline()[0])
totalWon = int(scores.readline()[0])
wonToday = int(scores.readline()[0])
scores.close()

if Guessed and players==1:
curStreak+=1
totalWon+=1
wonToday+=1
if curStreak > highStreak: highStreak = curStreak

elif lives==0 and players==1: curStreak=0

c = str(curStreak)
h = str(highStreak)
t = str(totalWon)
w = str(wonToday)

scores = open("scores.txt","w")
scores.write(c+" current streak
"+h+" highest streak
"+t+" total won
"+w+" total won this run")
scores.close()

guessWin.close()

main(players)


def showScores():
scores = open("scores.txt","r")
for i in scores:
print(i[2:len(i)-1]+": "+i[0])
scores.close()

#SCORES ARE ONLY FOR SINGLEPLAYER
scores = open("scores.txt","r")
curStreak = scores.readline()[0]
highStreak= scores.readline()[0]
totalWon = scores.readline()[0]
scores.close()

if curStreak > highStreak: highStreak=curStreak
scores = open("scores.txt","w")
scores.write(curStreak+" current streak
"+highStreak+" highest streak
"+totalWon+" total won
0 total won this run")
scores.close()
main()


i could explain all of this or i could go do something else.... i think ill pick the latter :) basically: i have a menu with 4 options in squares. it picks up your mouse click on each of the windows and runs the corresponding function, passing all the relevant parameters so the function knows which function to call next :) the main fuctions are main() which is the menu, choose() which either randomly chooses a word or creates a window for the second player to choose a word in, and guess() which is where the player guesses. annoyingly, if you type the same incorrect letter twice it counts both of those and continues drawing the hangman so its not perfect....

*me realising it doesnt show indentations in [code] blocks.... um... problem xD if you know how to fix that please let me know :D