cRPG
cRPG => General Discussion => Topic started by: Tophat on February 09, 2011, 04:42:05 pm
-
Hello forums! I made a pretty basic script in python that tells you how much gold/xp you need to buy an item/level up based on your multiplier.
# Hi forums!
a = raw_input("Gold or XP?")
if a == "xp":
b = input("How much xp until next level?")
c = input("How much xp do you have?")
d = input("1000, 2000, 3000, 4000, or 5000 per round?")
print ((b - c) / d)
if a == "gold":
b = input("How much does it cost?")
c = input("How much do you have?")
d = input("50 per round, 100 per round, 150 per round, 200 per round, or 250 per round?")
print ((b - c) / d)
-
Hey, good job. Stats are fun. How do you use it?
-
get Python at http://www.python.org/download/
install
write in commandbox: python nameofscript.py
:P
visitors can't see pics , please register or login
-
You need Python, so as soon as you get that installed copy the code into notepad and save it as a .py file. Then all you have to do is double click it.
You can download it here http://www.python.org/download/
-
Oops, I forgot one thing.
It exits as soon as it's done, so this will make it stay open, although be it's pretty crude, so be warned.
# Hi forums!
a = raw_input("Gold or XP?")
if a == "xp":
b = input("How much xp until next level?")
c = input("How much xp do you have?")
d = input("1000, 2000, 3000, 4000, or 5000 per round?")
e = ((b - c) / d)
f = input (e)
if a == "gold":
b = input("How much does it cost?")
c = input("How much do you have?")
d = input("50 per round, 100 per round, 150 per round, 200 per round, or 250 per round?")
e = ((b - c) / d)
f = input (e)
EDIT: Forgot some stuff
-
It is per minute by the way ;D
-
Oh, thanks! I was wondering that.
-
you sir have a very nice tophat :mrgreen:
thx :P
-
Fixed for command prompt viewing pleasures
# Hi forums!
a = raw_input("Gold or XP? ")
if a == "xp":
b = input("How much xp until next level? ")
c = input("How much xp do you have? ")
d = input("1000, 2000, 3000, 4000, or 5000 per round? ")
e = ((b - c) / d)
f = input (e)
if a == "gold":
b = input("How much does it cost? ")
c = input("How much do you have? ")
d = input("50 per round, 100 per round, 150 per round, 200 per round, or 250 per round? ")
e = ((b - c) / d)
f = input (e)