Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Beautiful and Dusty, small program to show what Wurmple will evolve into.
- Written by ProjectTitan313.
- == Changelog ==
- 5/29/2013: Seems to be fully working, unless people throw hex PIDs into
- decimal section and vice versa. Not sure how to idiotproof.
- Add Gen 3/4 support?
- '''
- # Sleep imported for the intro.
- from time import sleep
- # *** Function and Variable Setup ***
- # GetPID() function prompts user to enter a PID,
- # looping until entry is valid.
- def GetPID():
- loopy0 = 0
- CheckPID = '0x1234ABCD'
- while loopy0 == 0:
- print("Hex or Decimal format? enter 'hex' or 'dec'")
- CheckPID = input().lower()
- NewPID = CheckPID
- if CheckPID == 'hex':
- print("Enter hex PID:")
- NewPID = input()
- CheckPID = int(NewPID,16)
- return CheckPID
- loopy0 = 1
- elif CheckPID == 'dec':
- print("Enter the decimal PID:")
- NewPID = input()
- CheckPID = int(NewPID)
- return CheckPID
- loopy0 = 1
- # GetPID() seems to work just fine. Moving on.
- def GetEvolution(CheckPID):
- Evolution = int(((CheckPID >> 0x10) % 0xA))
- if Evolution >= 0 and Evolution <= 4:
- print("Your Wurmple will evolve into Silcoon (Beautifly)")
- elif Evolution >= 5 and Evolution <= 9:
- print("Your Wurmple will evolve into Cascoon (Dustox)")
- else:
- print("You somehow ended up with: " + Evolution + ", congrats.")
- # GetEvolution(CheckPID) seems to work.
- # Now that funtions are defined, time for the actual program.
- print("Beautiful and Dusty, by ProjectTitan313.")
- print("A small program to predict what Wurmple will evolve into. Gen 5 only.")
- print("") # blank line, just for spacing/looking better.
- sleep(2)
- # /intro. The actual execution of the program is quite massive, see below.
- GetEvolution(GetPID())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement