Author Topic: I made a script!  (Read 1219 times)

0 Members and 1 Guest are viewing this topic.

Offline Tophat

  • Peasant
  • *
  • Renown: 2
  • Infamy: 0
  • cRPG Player
    • View Profile
  • Faction: Nord-bro
I made a script!
« on: February 09, 2011, 04:42:05 pm »
0
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.
Code: [Select]
# 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)
_█_
ಠ_ರೃ

Offline Engine

  • Noble
  • **
  • Renown: 16
  • Infamy: 1
  • cRPG Player
    • View Profile
Re: I made a script!
« Reply #1 on: February 09, 2011, 04:48:11 pm »
0
Hey, good job. Stats are fun. How do you use it?

Offline krampe

  • Knight
  • ***
  • Renown: 29
  • Infamy: 4
  • cRPG Player A Gentleman and a Scholar
  • Count Palatine of the Rhine
    • View Profile
  • Faction: Pony
  • Game nicks: krampe and the moons
Re: I made a script!
« Reply #2 on: February 09, 2011, 04:52:38 pm »
0
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
« Last Edit: February 09, 2011, 05:04:22 pm by krampe »
Sacrum Romanum Imperium

Yeah, well you know, that's just like, your opinion, man.

Offline Tophat

  • Peasant
  • *
  • Renown: 2
  • Infamy: 0
  • cRPG Player
    • View Profile
  • Faction: Nord-bro
Re: I made a script!
« Reply #3 on: February 09, 2011, 04:55:24 pm »
0
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/
_█_
ಠ_ರೃ

Offline Tophat

  • Peasant
  • *
  • Renown: 2
  • Infamy: 0
  • cRPG Player
    • View Profile
  • Faction: Nord-bro
Re: I made a script!
« Reply #4 on: February 09, 2011, 05:02:02 pm »
0
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.
Code: [Select]
# 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
« Last Edit: February 09, 2011, 05:03:28 pm by Tophat »
_█_
ಠ_ರೃ

Offline krampe

  • Knight
  • ***
  • Renown: 29
  • Infamy: 4
  • cRPG Player A Gentleman and a Scholar
  • Count Palatine of the Rhine
    • View Profile
  • Faction: Pony
  • Game nicks: krampe and the moons
Re: I made a script!
« Reply #5 on: February 09, 2011, 05:05:24 pm »
0
It is per minute by the way ;D
Sacrum Romanum Imperium

Yeah, well you know, that's just like, your opinion, man.

Offline Tophat

  • Peasant
  • *
  • Renown: 2
  • Infamy: 0
  • cRPG Player
    • View Profile
  • Faction: Nord-bro
Re: I made a script!
« Reply #6 on: February 09, 2011, 05:11:42 pm »
0
Oh, thanks! I was wondering that.
_█_
ಠ_ರೃ

Offline Meow

  • Awesome Consulting Detective
  • King
  • **********
  • Renown: 1071
  • Infamy: 150
  • cRPG Player A Gentleman and a Scholar
    • View Profile
  • Faction: Fallen Brigade
Re: I made a script!
« Reply #7 on: February 09, 2011, 07:06:30 pm »
0
you sir have a very nice tophat  :mrgreen:

thx :P

Offline Vibe

  • Vibrator
  • King
  • **********
  • Renown: 2528
  • Infamy: 615
  • cRPG Player Madam White Queen A Gentleman and a Scholar
    • View Profile
Re: I made a script!
« Reply #8 on: February 11, 2011, 02:47:47 pm »
0
Fixed for command prompt viewing pleasures
Code: [Select]
# 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)
« Last Edit: February 11, 2011, 02:49:40 pm by Vibe »